Unable to Login to SystemLink Server

Updated May 30, 2024

Reported In

Software

  • SystemLink

Issue Details

After I click the Log in button of my SystemLink Server web interface, the button becomes grayed out and it does not log in to the server:
 
grayedout.PNG

This happens with multiple usernames, including the administrator user.

Solution

This issue is caused when the default (inherited) folder permissions get changed on the SQLite database folder that Apache uses to track user sessions for SystemLink log in. If Apache can't write to the SQLite database file, then it fails to allow the SystemLink login. Resetting these folder permissions enable you to log in to the server normally.
 
  • Check the error.log files located in the C:\ProgramData\National Instruments\Web Server\logs folder in the server. If you see logs similar to the following ones, it will be a confirmation of the loss of permissions:
[session_dbd:error] [pid 7764:tid 1368] (1)Operation not permitted: [client ::1:50026] AH01859: query execution error inserting session 'a65c3f8a-b8be-794a-9cdd-d6f0b18b2864' in database with 'insertsession': attempt to write a readonly database, referer: http://localhost:9090/
[session:error] [pid 7764:tid 1368] (20014)Internal error (specific information not available): [client ::1:50026] AH01822: error while saving the session, session not saved: /niauth/v1/auth, referer: http://localhost:9090/

 
  • To reset the permissions you can follow these steps:
1. Open Windows Command Line (cmd) as administrator.
2. Execute the icacls command to reset the permissions of the Web Server folder (keep the quotes in the path):
icacls "C:\Windows\ServiceProfiles\LocalService\AppData\Local\National Instruments\Web Server" /reset
3. Restart the NI Web Server from the NI Web Server Configuration app:
 
restartwebserver.png
 
4. Login to the SystemLink Server after restarting the NI Web Server.

Additional Information

The session database is stored in the C:\Windows\ServiceProfiles\LocalService\AppData\Local\National Instruments\Web Server folder. This location is not accessible to non-admin user accounts, if you try to navigate to it in Windows File Explorer, it will prompt you to gain access. You should not accept that dialog, or it will modify the permissions of the directory and reduce the security of your system. Instead, you should open an admin command prompt and perform operations in the mentioned location.