jupyter notebook keeps CONNECTING TO KERNEL - python

The Jupyter notebook keeps saying Connecting to kernel, which never reaches finally popping an error,
A connection to the notebook server could not be established. The notebook will continue
trying to reconnect. Check your network connection or notebook server
configuration.
So the asterisk on the command line stays forever.
The strange part is, iPython on terminal works FINE.
Here are what I tried:
Change the browser from Chrome to Firefox
Change port number into something else than '8888'
Uninstalled the Jupyter and re-installed it
Anybody with similar issues?

I had a similar issue. It was caused by the tornado-package and I had to downgrade it.
sudo pip3 uninstall tornado
sudo pip3 install tornado==5.1.1
See Jupyter notebook: No connection to server because websocket connection fails

I have found this same issue, and identified it only happens with Chrome standard browser. Incognito Chrome or Firefox does not have the same issue of ipykernel not connecting.
For now I open jupyter in firefox using the following command from Terminal:
jupyter lab --browser Firefox
Not sure what the difference is with the browsers, but recently I have had an issue of not being able to access local files from chrome, so will look into this issue and see if that resolves it for Chrome standard browser.

Related

How to reconnect to an existing Jupyter notebook session in VS code?

I remember I was able to reconnect to an existing Jupyter notebook session in VS code before by changing the kernel for a notebook. Now the option to reconnect to an existing session is gone, see:
How do I reconnect to an existing Jupyter notebook session in VS code?
To be clear, the sessions were never shut down. In fact, I can still see them running in the Running tab of my browser version of jupyter notebook, although clicking on them results in a 404 error:
The jupyter kernel is running on a remote server. I use a SSH session to connect back to it when I work.
Current versions: VS code is v1.68.1 and the Jupyter extension on remote machine is v2022.5.1001601848, if that helps.
If you would like to connect to an existing jupyter server can you do so by going into the command Jupyter: Specify Jupyter Server for Connections and selecting the appropriate remote server from the list. If the required server is not on that list, then you can select it.

Error when open Jupyter Notebook from putty

I'am trying to open Jupyter Notebook from Putty. I have a server where is installed Python and Jupyter. I followed all the steps from this post Remote access Jupyter notebook from Windows but it doesn't work. I got the error: This site can't be reached.
Any idea?
Thx
edit: I added a photo with the ps from putty and the error from browser. It's said:
This site can't be reached
.
The good old logout/reboot mechanisms work in this case too!
You can try closing the jupyter connection in the tunnel's connection, logout from the remote server, re-connect and try. Has worked a few times for me today.
If that doesn't work, there might be stale jupyter notebook processes on the remote server. Query for them and kill them and then logout-log back in and try.
If that still does not work, try implementing your code through ipython to check if Jupyter is working at all, even if its user interface isn't loading on your browser.

Jupyter notebook error: The port 8888 is already in use, trying another port

I just installed Anaconda on y windows 10, but when I try to run the jupyter notebook or jupyter lab by the icon, nothing happend.
Tried to run the jupyter by anaconda prompt and got the error: The port 8888 is already in use, trying another port.
Tried to run in several different ports and the error is the same.
Tried to kill the task by PID and when I run the jupyter again by promp and it lasts forever and nothing happens
Tried to change the browser by manual config and everything is the same
Tried to uninstall anaconda and install again several times and boom: Same errors
I checked also proxy stuff but everything related to this is unable on my pc
Checked firewall and antivirus and also everything seems to be normal
Any other recommendation is welcome :)
As mentioned here you may just change port to other, for example:
jupyter notebook --port 8889

Jupyter Notebook: "unable to connect to Kernel"

I have just started to use virtual environment and tried to create one for Jupyter Notebook, and almost succeeded but when I tried to open a new notebook it gave the error "unable to connect to kernel or server":
Refreshing the browser, clearing the browser cache , restarting anaconda etc also did't fix the problem!
Can you tell me how to fix it?
This happens most times, try restarting anaconda it should fix the server issues, also clear browser cache.

IPython in Safari: websocket connection failure

Despite being listed in the ipython-notebook doc as one of the supported browsers, Safari 5.1.10 running on OSX 10.6.8(64bit) can not run IPython-notebook fully functionally. ipython version 2.2.0, in anaconda python environment.
Safari displays the list of notebooks OK. Every aspects seem to be fine until one opens (or creates a new) notebook. A error message shows up:
"A WebSocket connection could not be established.
You will NOT be able to run code.
Check your network connection or notebook server configuration."
Basically the cell shows up alright, but you can't run them.
Firefox 32.0.3 can, however, fully functions with IPython notebook. Therefore it is not a IPython notebook problem. Therefore there is no error message in the terminal, i.e:
6600sls-Mac-Pro:~ bio101sl$ ipython notebook --no-browser
2014-11-11 12:23:39.339 [NotebookApp] Using existing profile dir: u'/Users/bio101sl/.ipython/profile_default'
2014-11-11 12:23:39.369 [NotebookApp] Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
2014-11-11 12:23:39.541 [NotebookApp] Serving notebooks from local directory: /Users/bio101sl/IPython_NB
2014-11-11 12:23:39.542 [NotebookApp] 0 active kernels
2014-11-11 12:23:39.542 [NotebookApp] The IPython Notebook is running at: http://localhost:8888/
2014-11-11 12:23:39.542 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Seems to be a Safari - websocket related problem. Is there any settings in Safari has to be changed to get it work? Unfortunately ipython-notebook doc doesn't provide any hint on that.
Turns out not to be a browser issue either. It has to do with the tornado 4.0.2 shipped with anaconda, which is not compatible with Safari 5.1.10. Downgrade tornado to 3.2.2 solved the problem, in terminal:
conda install tornado=3.2
3.2.2 appears to be the last version that will work with Safari 5.1.10
I had similar problem using Safari 5.1.7 on Windows. Solution: I set Chrome version 40.0.2214.115 m as default browser.

Categories

Resources