vscode-jupyter: Unable to connect to Kernel of updated remote Jupyter Server without restarting VSCode

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

Hey,

I have implemented the interface IJupyterUriProvider to connect my remote Jupyter servers.

Whenever I update my remote Jupyter server than in that case I’m unable to connect to the new remote kernels The connection to the new remote Jupyter server seems to be successful as I don’t get any errors (which I do when I tried with wrong server uri) and getServerUri method is successfully resolved.

The only way I’m able to connect to the kernel of the updated remote Jupyter server is by restarting (closing and reopening) the VSCode.

Attaching the verbose logs for both the cases

without restart.txt After restart.txt

The difference I notice in the logs is that the After restart.txt logs contains

18:35:56.349 [debug] Disposing session manager

which doesn’t happen without restart once both have logged No controller, hence notebook communications cannot be initialized

VS Code Version

Visual Studio Code (1.78.1, undefined, desktop)

Jupyter Extension Version

Jupyter Extension Version: 2023.4.1011241018.

Jupyter logs

Attached the Logs in the Issues Description

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

None

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (9 by maintainers)

Most upvoted comments

Looks like there is nothing to verify here @DonJayamanne ?

Thanks for using the API and filing this issue.

If the Uri changes, are you triggering the onDidChangeHandles event in the IJupyterUriProvider? If not, then I would suggest doing that