jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.52k stars 4.82k forks source link

Kernel is not connecting anymore. #7422

Closed Jules00768 closed 2 weeks ago

Jules00768 commented 1 month ago

I'm having issues with my notebook; the kernel won't restart or reconnect. I tried to use all the tools ( reconnect and restart) with no results. The Kernel button is permanently showing "no kernel"

RRosio commented 1 month ago

Thank you for opening this issue @Jules00768, could you share the version of Notebook and other Jupyter related packages you are using, via jupyter --version as well as the output you see from where you run jupyter notebook or jupyter notebook --debug? When running jupyter kernelspec list do you see any available kernels?

Lubuntu-Man commented 1 month ago

this is the same issue i'm facing, working on lubuntu lts 22.04, the jupyter will execute codes as usual but the kernel is not connecting at all as seen in the terminal. All i have noticed in terminal is that is stays on connecting and nothing after that. Also at the first run it shows this after trying to connect: [I 2024-07-22 16:38:51.966 ServerApp] Connecting to kernel dff0b987-2f5c-4ff2-999e-8f5eaf39055e. [W 2024-07-22 16:38:52.098 ServerApp] Got events for closed stream <zmq.eventloop.zmqstream.ZMQStream object at 0x765de7492f50>

I tried creating new kernel, reinstalling zmq and all other stuff. The notebook and ipykernel has been reinstalled too.

In debug, I have noticed in terminal that it keeps repeating token accepting procedure but never fails or shows success either:

2024-07-22 17:00:16.373 ServerApp] Accepting token-authenticated request from 1xx.x.x.x [D 2024-07-22 17:00:16.420 ServerApp] 200 GET /api/contents?content=1&hash=0&1721xxxxxxxxx (d37b3532xxxxxxxxxx5f5110c53@127.0.0.1) 48.12ms [D 2024-07-22 17:00:17.777 ServerApp] Accepting token-authenticated request from 1xx.x.x.x [D 2024-07-22 17:00:17.781 ServerApp] 200 GET /api/contents/pp.ws/initiate1.ipynb/checkpoints?17xxxxxx65 (d37b353250xxxxxxx5f5110c53@127.0.0.1) 4.48ms

RRosio commented 1 month ago

Thank you for adding your input here @Lubuntu-Man! There are a few issues in the queue that users submitted after having trouble connecting to the kernel. You might want to take a look there to see if there is a similar issue reported that mentions a potential fix or workaround.

RRosio commented 1 month ago

@Jules00768 just a follow up ping here in case you were able to try out the suggestions in my previous comment?

RRosio commented 3 weeks ago

Hi @Lubuntu-Man, wondering if you are still facing this issue? Were you able to look at the queue to find a similar issue? Also if you could share the version of Notebook you are using (jupyter --version) that would be helpful!

Lubuntu-Man commented 2 weeks ago

hey @RRosio, so i switched to a windows 10 laptop from lubuntu 22.04 desktop, and you won't believe, i faced the same issue. Exactly the same. here are the version details or current windows system: IPython : 8.26.0 ipykernel : 6.29.5 ipywidgets : 8.1.3 jupyter_client : 8.6.2 jupyter_core : 5.7.2 jupyter_server : 2.14.2 jupyterlab : 4.2.4 nbclient : 0.10.0 nbconvert : 7.16.4 nbformat : 5.10.4 notebook : 7.2.1 qtconsole : 5.5.2 traitlets : 5.14.3

I am trying to find any irregularities in firewall. adding the jupyter manually in firewall allow hasn't made any difference. God help us!

RRosio commented 2 weeks ago

I will close this issue due to inactivity but please feel free to reopen with any additional information/updates!

Lubuntu-Man commented 2 weeks ago

so nobody has found any solution to this till now. I just performed the zmq check to and it didn't help either. we really need a solution to this as this issue seems to be very unique. Although people in past did came through such kernel issues but nobody seems to find the solution of this particular "[W 2024-08-06 18:57:37.827 ServerApp] Got events for closed stream <zmq.eventloop.zmqstream.ZMQStream object at 0x000001CDAD8CE270>"

Lubuntu-Man commented 2 weeks ago

@RRosio hey, so for me, installing python 3.10 and the anaconda 3 and then installing jupyter notebook 6.5.7 in conda env from Anaconda navigator finally helped. Here i'm attaching the current version details for everyone's reference. Thank you for your efforts as i read in other discussions zmq related errors which helped me solve this out. jupyter --version Selected Jupyter core packages... IPython : 8.25.0 ipykernel : 6.28.0 ipywidgets : not installed jupyter_client : 7.4.9 jupyter_core : 5.7.2 jupyter_server : 2.14.1 jupyterlab : not installed nbclient : 0.8.0 nbconvert : 7.10.0 nbformat : 5.9.2 notebook : 6.5.7 qtconsole : not installed traitlets : 5.14.3