Troubleshoot Issues with the Polyspace Connector
Issue
You run a Polyspace® command and the command fails with an error message that contains something similar to this:
polyspace:pscore:noPortForConnectorError
Possible Solutions
Polyspace uses an internal server (Polyspace connector) to handle communications between different Polyspace components. An instance of the connector starts on a random port assigned by your system when you start Polyspace.
To check that the connector can to connect to an open port and is reachable:
Close all Polyspace processes.
Start the Polyspace connector manually at the command line by navigating to
and running thepolyspaceroot
/polyspace/bin/ARCH
polyspace-connector
binary. For example, type these commands on Linux:Here,cd polyspaceroot/polyspace/bin/ARCH ./polyspace-connector
polyspaceroot
is your Polyspace installation folder, for instance/usr/local/Polyspace
andARCH
is a platform-specific subfolder, such asglnxa64
for Linux.Once the connector starts, you see a message similar to this:
whereStarted ServerConnector@123a456b{HTTP/1.1, (http/1.1)}{0.0.0.0:portNum}
portNum
corresponds to the port on which the connector started, for example, 9991.Run this command to check that the port is open.
(echo >/dev/tcp/localhost/portNum) &>/dev/null && echo "open" || echo "closed"
If the
(echo > ...)
command returnsclosed
, check for possible reasons why the port is not open. For example, your firewall is configured to not allow traffic on portportNum
, or system variablehttp_proxy
orHTTP_PROXY
is set when it should be unset.If the
(echo > ...)
command returnsopen
, check that the connector is reachable by running the command:If the connector is reachable, the command returns a JSON output that containscurl http://127.0.0.1:portNum/metadata
{"statusCode":"SUCCESS"
.If you can reach the connector, try running the Polyspace command that was failing previously.
If any of the following are true, enable debug mode for the connector, rerun the Polyspace command that failed previously and then create a MathWorks® service request.
The connector is not reachable when you run the
curl
command.The connector is reachable but the command still fails.
.
To enable the debug mode:
open a text editor, create a file named
connector.properties
, and save this line in the file:application.debug=true
Copy the file to your Polyspace preferences folder, for example:
Windows® —
%Appdata%\MathWorks\MATLAB\R2024b\Polyspace
Linux® —
~/.matlab/R2024b/Polyspace
Rerun the Polyspace command that failed previously. After you run the command, the connector created a dump file in the Polyspace preferences folder name
dmp_
After you rerun the Polyspace command, the connector created a dump file
in the Polyspace preferences folder name dmp_$number@$hostname.txt
,
for example, dmp_12345@workstation.example.txt
. Attach this file to
your service request.
The preferences folder might contain multiple dump files, check that you select the most recently created one.