The connector is a component common to different products and tools. It is simply an HTTP server started locally and acting as a proxy to manage OS related operations and functional tasks:
- extract and process the data (Polyspace results, and so on…).
- serve static content (web content, context sensitive help, and so on…)
- execute Polyspace analyzers binaries
It is widely used by the desktop UIs, CLIs and PAYC plugins. Communication with the client apps is based on a REST API using JSON
data formatting.
To investigate a problem with this connector, the procedure is the following:
Check the port used by the connector
The port used by the connector can appear in the error message, for example:
The server returned the status 503 with message "Service Unavailable" in response to the request to URL URL http://localhost:9254/metadata
To check this port, the command Telnet or any command that allows verifying that a separate process can open the port that the polyspace-connector is using, can be used.
For example under Linux, in a bash console, launch this command (replace 9091 with the actual port number the connector is using):
(echo >/dev/tcp/localhost/9091) &>/dev/null && echo "open" || echo "close"
If the port is not open then you need to find out why it is not accessible - a firewall or http proxy could be preventing communication between the two processes.
Check that the connector is reachable
Polyspace-connector is reached through a TCP port 9090 to 10100. A proxy or a firewall may block communication with the connector from Polyspace UI or from Polyspace Report Generator. Please check the network settings, especially the proxy server, this can be a root cause of the behavior.
To check if the connector is reachable, open a shell window on the machine where the connector is supposed to be running and execute:
<polyspaceroot>/polyspace/bin/<OS>/polyspace-connector
where <OS> is: glnx64, maca64, maci64, win32 or win64, depending on the OS of the machine.
This command returns a URL similar to
Upstream target http://127.0.0.1:9093
Then, in another Shell window, type
curl http://127.0.0.1:9093/metadata
You will get a successful status like:
{"status":{"statusCode":"SUCCESS","message":"Succeeded","sqlDuration":-1,"computeDuration":35},"payload":{"Release":"R2023a Update 6", ...
or a Connection refused:
curl: (7) Failed to connect to 127.0.0.1 port 9093: Connection refused
Debugging the connector
Here is the procedure to create a dump file:
Before R2025a:
Create a file named connector.properties with the following line:
You can add the line
application.debug.console=true
if you need to have a console window, for example with PolyspaceAsYouCode.
If you want to debug the connector in the context of the Report Generator, copy this file into the Polyspace preferences folder:
- %APPDATA%\MathWorks\MATLAB\R2023b\Polyspace (for Windows)
- $home/.matlab/R2023b/Polyspace (for Linux)
- $home/Library/Application Support/MathWorks/MATLAB (for mac)
Please adapt the version number to the version you are using.
For PolyspaceAsYouCode, copy it to the working folder of the project.
Re-run the same command to reproduce the issue. When the command is done, two dump files will be created into the preferences folder (above):
1) dmp_%number%@%pc_name%.txt
2) connectorj4eva_log_%id%.txt
Please send us these two files (the most recent ones if there are many) to the MathWorks Technical Support.
After R2025a:
Create a file named connector_driver.json in %APPDATA%\MathWorks\MATLAB\R<version>\Polyspace
In that file add:
{
"debug": true,
"reverseproxy": true
}
Send us the console log as well as the log file generated thanks to the debug mode: %APPDATA%\MathWorks\MATLAB\R<version>\Polyspace\polyspace_connector_log_<PID>.txt