Applies to: COMSOL Server™ Versions: 5.3

Problem Description

In Windows®:

I have a COMSOL Server™ License with LiveLink™ for MATLAB®. When attempting to launch LiveLink™ for MATLAB® using the desktop icon COMSOL Server 5.3 with MATLAB, COMSOL Server™ starts listening correctly to a port, but MATLAB® cannot establish a connection to the server and shows the following error message:

Failed to connect to server
Bad response status 404 Not Found

In Linux® and macOS:

I have a COMSOL Server™ License with LiveLink™ for MATLAB®. When attempting to launch LiveLink™ for MATLAB® using the command comsol appserver matlab, COMSOL Server™ starts listening correctly to a port, but MATLAB® cannot establish a connection to the server and shows the following error message:

Failed to connect to server
Bad response status 404 Not Found

Solution

To resolve this issue you will need to replace a file in the COMSOL Server™ installation directory. The procedure is as follows:

  1. Make sure you are using COMSOL Server™ 5.3 Update 3 (Build: 316). If you need to install the update, please go to https://www.comsol.com/product-update/5.3 and follow the instructions under Updating COMSOL Server™. This page also contains instructions on how to check which version of COMSOL Server™ you are running.

  2. Before you proceed, make sure to stop any running COMSOL Server™ processes:

    In Windows®: Stop the server by either typing close, if COMSOL Server™ is running in a command window, or by running the Stop COMSOL Server shortcut from the COMSOL Launchers folder in the Start menu, if COMSOL Server™ is installed as a Windows® service.

    In Linux®: If you configured COMSOL Server™ using the systemd service, stop it by typing systemctl stop comsolserver53; otherwise, kill the COMSOL Server™ process.

    In macOS: Kill the COMSOL Server™ process.

  3. Replacing the file:

    In Windows®:

    After updating COMSOL Server™ to version 5.3 Update 2, download the file com.comsol.webbridge.jar found under Related Files below and use it to replace the file with the same name in the directory C:\Program Files\COMSOL\COMSOL53\Server\bin\servers\webbridge\webapps\webbridge\WEB-INF\lib or any other installation directory replacing C:\Program Files\COMSOL\COMSOL53\Server in the path. To move the file to the directory you need administrative privileges. You will need to confirm moving the file by approving it.

    In Linux®:

    After updating COMSOL Server™ to version 5.3 Update 2, download the file com.comsol.webbridge.jar found under Related Files below and use it to replace the file with the same name in the directory /usr/local/comsol/comsol53/server/bin/servers/webbridge/webapps/webbridge/WEB-INF/lib or any other installation directory replacing /usr/local/comsol/comsol53/server in the path. To move the file to the directory you need root privileges.

    In macOS:

    After updating COMSOL Server™ to version 5.3 Update 2, download the file com.comsol.webbridge.jar found under Related Files below and use it to replace the file with the same name in the directory /Applications/comsol/comsol53/server/bin/servers/webbridge/webapps/webbridge/WEB-INF/lib or any other installation directory replacing /Applications/comsol/comsol53/server in the path. To move the file to the directory you need root privileges.

  4. Start COMSOL Server™ again.

    In Windows®: Start COMSOL Server™ by using the COMSOL Server shortcut in the Start menu. Alternatively, if COMSOL Server™ was installed as a Windows® service, start it by using the Start COMSOL Server shortcut.

    In Linux®: If you configured COMSOL Server™ using the systemd service, start it by typing systemctl start comsolserver53; otherwise, type /bin/comsol server to start COMSOL Server™.
    An example of a typical is /usr/local/comsol53/server

    In macOS: Type /bin/comsol server to start COMSOL Server™. An example of a typical is /Applications/COMSOL53/Server

Related Files

com.comsol.webbridge.jar 72 KB