Main Content

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:

  1. Close all Polyspace processes.

  2. Start the Polyspace connector manually at the command line by navigating to polyspaceroot/polyspace/bin/ARCH and running the polyspace-connector binary. For example, type these commands on Linux:

    cd polyspaceroot/polyspace/bin/ARCH
    ./polyspace-connector
    Here, polyspaceroot is your Polyspace installation folder, for instance /usr/local/Polyspace and ARCH is a platform-specific subfolder, such as glnxa64 for Linux.

  3. Once the connector starts, you see a message similar to this:

    Started ServerConnector@123a456b{HTTP/1.1, (http/1.1)}{0.0.0.0:portNum}
    where portNum corresponds to the port on which the connector started, for example, 9991.

  4. 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 returns closed, check for possible reasons why the port is not open. For example, your firewall is configured to not allow traffic on port portNum, or system variable http_proxy or HTTP_PROXY is set when it should be unset.

    • If the (echo > ...) command returns open, check that the connector is reachable by running the command:

      curl http://127.0.0.1:portNum/metadata
      If the connector is reachable, the command returns a JSON output that contains {"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:

  1. open a text editor, create a file named connector.properties, and save this line in the file:

    application.debug=true

  2. Copy the file to your Polyspace preferences folder, for example:

    • Windows®%Appdata%\MathWorks\MATLAB\R2024b\Polyspace

    • Linux®~/.matlab/R2024b/Polyspace

  3. 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.