"Session log could not be read" error when using "Show Log" button on web app

7 views (last 30 days)
I have the development version of MATLAB Web App Server successfully installed and configured on my machine. I am able to successfully deploy apps to the server and run them as expected.
However, when I attempt to open the session log from an app session using the "Show Log" button, I receive the following error message:
Session log could not be read.
This occurs with all apps.
The log files can be successfully viewed and accessed on the system as expected. The webapps log contains the following lines:
0x00002d74 agent::mdwas W Failed to prepare logs dir: fl:filesystem:AccessDenied
0x00002d74 agent::mdwas E setWindowsPermissionCurrentUserOnly:: Error code: 5 Unknown error while getting file/folder security descriptor
0x00002d74 agent::mdwas W Failed to prepare sessions home dir: fl:filesystem:AccessDenied
How can I resolve this issue?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 24 Sep 2025 at 0:00
Edited: MathWorks Support Team on 24 Sep 2025 at 16:13
The error message from the webapps log indicates that the webapps services are unable to properly access the necessary directories for session logging. Specifically, this is most likely an issue with the "USR" directory, which can be found in the same folder as the "apps" and "logs" directories. (This directory is hidden by default on most machines.)
Refer to the following troubleshooting steps to resolve the most common access issues regarding this directory:
  1. Version control can place temporary locks on files, preventing them from being properly accessed by server operations. If you are using version control on this folder, temporarily disable it and confirm if the issue is resolved. 
  2. Confirm that the server and apps service accounts for the version of MATLAB Web App Server you are using have read and write permissions on this directory.
  3. Reset the "USR" directory. You can do this by stopping your Web App Server, then clearing the "USR" directory, and then restarting the server. If the server fails to start after completing these steps, this may indicate an issue with the service accounts used by your server -- refer to the next bullet for next steps.
  4. Reset the server setup. This can resolve a number of potential issues related to the server configuration, service accounts, and folder permissions. You can do this by stopping your server, then running webapps-uninstall. Then, run webapps-setup and any additional webapps-config commands to set up your server again. Note that you may want to run the command webapps-config get beforehand and record the output to note any configurations from your previous server setup. 

More Answers (0)

Categories

Find more on MATLAB Web App Server in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!