How can I get more information when MATLAB Web App Server fails to start with no logs or limited log information written?

11 views (last 30 days)
When I attempt to start my MATLAB Web App Server using the webapps-start utility, I get the following error:
MATLAB Web App Server service failed to start. No logs were written. Check that "logs_path" is writable by the service users.
In another test environment, I get log files. But the relevant information from the log only shows like below. The services are stopping right after they are started.
00000078 2025-03-21 14:26:01 0x00007f59a43ff1c0 agent::agentcore V All services started. 00000079 2025-03-21 14:26:01 0x00007f59a43ff1c0 agent::agentcore V Stopping all services...
I would like to troubleshoot this further, but I am having difficulty identifying the exact issue as there are no helpful logs for this startup failure. How can I get more information on this issue?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 26 Mar 2025
Edited: MathWorks Support Team on 26 Mar 2025
Note that the majority of issues that trigger this message can be quickly resolved by running webapps-uninstall and then setting up the server again with webapps-setup and any necessary webapps-config commands. Consider this option before pursuing more in-depth troubleshooting.
This error indicates that the webapps service(s) was unable to start due to some dependency issue prior to logging. In this case, you can often find more detailed error information in the system logs for the service. This article describes how to check this information.
Windows
Prior to checking the service logs, attempt to start the webapps service manually from the Services app:
  1. Open Services from the Windows start menu.
  2. Right-click the MATLAB Web Apps service for your release and select "Start."
Then, use Windows Event Viewer to check the service logs:
  1. Open Event Viewer from the Windows start menu. 
  2. Create a new Custom View for with the following parameters:
     
  3. In the resulting view, look for events regarding the mw-webapps-R20XXx service for your release. For example, in the case of service account password expiry, you may see an error with the following description: 
    The mw-webapps-R2023a service failed to start due to the following error: The service did not start due to a logon failure.
Linux
  1. Attempt to start the server from a command line using ./webapps-start.
  2. In the same command line, use the following command (adjusted to your release) to get systemd logs on the startup failure: 
    sudo journalctl -u mw-webapps-R2024a.service
    Note that you may need to press "Enter" several times to see the most recent output.
    For example, in the case of the logs directory not being writeable, you may see the following error: 
    Oct 23 11:09:46 ah-edgubu2204-l systemd[1]: Started MATLAB Web Apps (R2024a). Oct 23 11:09:46 ah-edgubu2204-l webapps[1356759]: Failed to set permissions on /local/MathWorks/webapps/R2024a/logs/webapps_service_start.out:> Oct 23 11:09:46 ah-edgubu2204-l webapps[1356759]: Failed to set permissions on /local/MathWorks/webapps/R2024a/logs/webapps_service_start.out:> Oct 23 11:09:46 ah-edgubu2204-l systemd[1]: mw-webapps-R2024a.service: Main process exited, code=killed, status=6/ABRT Oct 23 11:09:46 ah-edgubu2204-l systemd[1]: mw-webapps-R2024a.service: Failed with result 'signal'. Oct 23 11:09:47 ah-edgubu2204-l systemd[1]: Stopped MATLAB Web Apps (R2024a).
  3. In addition, use the following command (adjusted to your release) to get status of the web app server service:
    sudo systemctl status mw-webapps-R2024b.service
  4. After getting above information, try launching services manually and then check status again.
    >>sudo systemctl start mw-webapps-R2024b.service >>sudo systemctl status mw-webapps-R2024b.service >>sudo systemctl start mw-webapps-launcher-R2024b.service >>sudo systemctl status mw-webapps-launcher-R2024b.service
macOS
  1. Run the following command (adjusted to your release) to manually load the webapps service:  
    sudo launchctl load /Library/LaunchDaemons/com.mathworks.mw-webapps-R2024b.plist
    The output of this command should contain three columns, with the second column containing an error code. For example:  
    - 1 com.mathworks.mw-webapps-R2024b
  2. Use the following command to get more information on the specific error for a given error code:  
    launchctl error <code>
    For example, for error code 1 in the example above, run: 
    launchctl error 1

More Answers (0)

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!