Error 401 Unauthorized in SystemLink Jupyter Notebook

Updated Aug 27, 2024

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>


Image.png
 

Solution

This error can occur when your log in session to the SystemLink server goes stale (e.g. because it has be left inactive for some time).
To rectify the issue:
  1. Close your browser tabs.
  2. Launch the NI SystemLink Server Configuration application.
  3. Restart the services.
  4. Once all services have restarted, you can execute the Jupyter Notebook from a browser again.

Restart Services.PNG