Error 401 Unauthorized in SystemLink Jupyter Notebook

Updated Jul 15, 2025

Reported In

Software

  • SystemLink Server
  • SystemLink Jupyter Notebook Add-On

Issue Details

  • When running a Jupyter Notebook in a browser, I receive error 401 from the Test Monitor API.
  • After leaving a browser open on the SystemLink Jupyter utility overnight, I receive the below error when running a Notebook. The Notebook was working prior to this.

 

ApiException: (401)
Reason: Unauthorized
HTTP response headers: <header information>
HTTP response body: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.</p>
</body></html>

Solution

This error can occur when your log in session to the SystemLink server goes stale (e.g. because it has been left inactive for some time), due to TCP/IP port exhaustion under heavy load, or server resource limitations. To rectify this issue, try the following approaches:

 

Restart Services to Clear Stale Sessions

  1. Close all browser tabs connected to SystemLink.
  2. Open the NI SystemLink Server Configuration application.
  3. Restart all SystemLink services.
  4. Once the services have restarted, reopen the tabs and try executing the Jupyter Notebook again.


Restart Services.PNG

 

Check for TCP/IP Port Exhaustion

  1. Run the following command on the server: netstat -anob
  2. Look for a high number of TIME_WAIT entries associated with a single PID (often an Erlang process).
  3. If port exhaustion is suspected:

 

Ensure Server Meets Minimum System Requirements

If your server is supporting a growing number of users or test nodes, ensure it still meets or exceeds the recommended specifications highlighted in the resource SystemLink Server Requirements. Servers with lower specs may experience performance degradation or intermittent authentication issues under load.