question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jupyter notbook server cannot connect to VSCode replacing stale connection

See original GitHub issue

Hey! I am not able to connect VSCode with a jupyter notebook which runs in a docker container on another server in the same network. Opening a notebook via browser works without any problem.

Environment data

  • VS Code version: 1.33.1
  • Extension version: 2019.4.12954
  • OS: WIN 10 + Server: Linux running a docker container with jupyter inside
  • Python version: Anaconda3

Expected behaviour

  • connecting to the remote server via the entered URI http://servername:8887?token=<token>

Actual behaviour

  • it is not able to connect to the server

Logs

in the docker container:

[I 12:01:37.825 NotebookApp] Creating new notebook in /
[I 12:01:37.871 NotebookApp] Kernel started: 183edfd8-3562-4335-bb87-4ec01a53821d
[I 12:01:39.316 NotebookApp] Adapting to protocol v5.1 for kernel 183edfd8-3562-4335-bb87-4ec01a53821d
[W 12:01:39.318 NotebookApp] 400 GET /api/kernels/183edfd8-3562-4335-bb87-4ec01a53821d/channels?session_id=d26e290b-5184-427b-97b1-949d4242a616&token=<token> (195.37.229.10) 1440.63ms referer=None
[W 12:01:40.327 NotebookApp] Replacing stale connection: 183edfd8-3562-4335-bb87-4ec01a53821d:d26e290b-5184-427b-97b1-949d4242a616

in VSCode: console.log

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jschbrtcommented, Jul 9, 2019
  1. Yes, I am operating in a corporate network.
  2. Yes, that’s correct. - It works using the browser.

But it was not the corporate firewall blocking the connetions to the server it was following entry in the Windows 10 firewall settings that blocked somehow the websocket connection for VSCode.

I just had to switch off the setting Automatically detect settings under “Proxy - Automatic proxy setup”.

proxy-setup

I found it out because another server application was not working on Chrome based browser but on Firefox. That was the case, because Chrome uses the Proxy settings by the system as well.

Thanks for your help! - I think the issue can be closed if you don’t have any further questions.

0reactions
IanMatthewHuffcommented, Jul 9, 2019

Awesome. Glad that it’s working for you, these can sometimes be really hard to track down as proxies and networks can vary quite a bit. I’ll close down the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter notebook and vscode - Stack Overflow
in remote connected vscode go to terminal > new terminal, this will open an "ec2 instance" terminal. while there, cd to the folder...
Read more >
Working with Jupyter Notebooks in Visual Studio Code
Connect to a remote Jupyter server. You can offload intensive computation in a Jupyter Notebook to other computers by connecting to a remote...
Read more >
Jupyter notebook can't connect to the kernel - MongoDB
When I open the notebook your_first_read (or create a new notebook) in the mflix environment, it doesn't connect to the kernel.
Read more >
Remote Jupyter Kernel - Paperspace Docs
This guide explains how to connect to remote Jupyter kernels through allternative ... search for Specify local or remote Jupyter server for connections...
Read more >
Jupyter Notebook Setup on a Remote Server Then in Visual ...
I then show how to copy the link into Visual Studio Code, so that the Jupyter Notebook could be eddited inside it.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found