-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jupyter Notebook Kernel Not Connecting: Connection Failed #5024
Comments
i have the same problem!! |
Could you please provide the output you see on the Notebook server's console? It may show some clues as to what might be happening. |
@toanasahmed - this is the output on the Notebook itself. I'm talking about the terminal/shell in which the command I would also recommend restarting the notebook server with debug logging enabled (e.g., |
@toanasahmed - we're actually going backwards here from a troubleshooting standpoint, so let's try to address the issues I see in your response and we'll go from there.
Once the these three points are addressed I think we should be able to move forward on troubleshooting your original issue. Thanks. |
can u take a look for me? thanks. |
😄 I believe "interesting portions" of the terminal output have scrolled off your screen. Please capture the entire startup sequence, either via screen-scrape or by redirecting the output to a file. What we can see is that it appears the kernel-info response has not been received. This is consistent with the kernel not completely starting. I'm hoping some "useful" information is above the various GET responses. There should be information pertaining to the kernel's startup. |
(my-rdkit-env) [root@localhost ~]# jupyter notebook --allow-root --debug |
@xh22 - thank you for the complete console. Here are the "interesting" aspects...
I suspect this has something to do with Perhaps someone else has ideas? I'm copying a few others that I've seen on threads dealing with conda kernels - hopefully they'll have some ideas or provide links to previous solutions. @takluyver @blink1073 @Carreau One thing you might try is re-installing nb-conda-kernels and/or creating another env. I don't know what the scope of nb-conda-kernels is - whether they span all conda envs or are specific to a particular env - but if you can uninstall them, you could try installing ipykernel and use that from Notebook. I apologize for not being able to help you further. |
(test) [root@localhost ~]# jupyter notebook --allow-root --debug thank u for your reply, i changed a env still get this error |
Jupyter notebook not connecting to kernel in virtual environment. Have reinstalled Anaconda, jupyter notebook repeatedly. Worked on different browsers - Chrome, Firefox, Edge 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. and on anaconda prompt Error Message: Kernel doesn't exist. |
I got the following error messages once I removed SSL certificate paths from config file: Uncaught exception GET /api/kernels/75d3fc32-cabb-43ea-af5f-e67591e90c7a/channels?session_id=6e9313c388bf4e768b6016ed049163d3 (172.31.55.192) Turns out this is a tornado issue. I upgraded to tornado v6.0.3 and it starts working again. |
@seewishnew please help and explain in detail how you solve this ??????. my tornado is upgraded version ..... |
Please help me with this error , when I create a new notebook using jupyter I get this error. C:\Users\kimish.DESKTOP-PT5P6T3>jupyter notebook
[I 14:48:37.136 NotebookApp] Creating new notebook in |
Hi @kimish96 - your local string.py file: |
Thanks Bro, This was a big help...struggling since a week. |
I am facing the same issue:- A connection to the notebook server cannot be established.
And this is my Firefox Console Output:-
Desperately seeking for help. |
This appears to be a duplicate of #4050, but rather than downgrade Also, since IPython appears to be sensitive to the version of prompt_toolkit, I would recommend checking prompt_toolkit's version as well. |
thnx @kevin-bates . It helped. Notebook is working fine now |
Glad to hear that @Dipon12. Could you please share the approach you took? If you found the downgrade to work, was that after attempting the upgrade approach? Thank you. |
Hello, For current release notebook-6.0.3 ipykernel-5.3.0 Hope it helps |
Hello! I am struggling with the same problem, checked many different solutions on the internet, tried them all, even uninstalling Anaconda and reinstalling, and it does not seem to work with any of these solutions. This is what I get from the console. `
[I 17:49:22.528 NotebookApp] Accepting one-time-token-authenticated connection from ::1 It was working yesterday, and apparently stopped after installing PyCharm, what seems wired. This is mi office workstation so I am stucked and would appreciate the help. |
Hi @fedeturi - this issue is different from the others and I think it might require a change. What I'm confused about is why this hasn't popped up until now. Could you please provide the output of |
If it can help @kevin-bates - I ran into similar issues as above, and eventually got to @fedeturi's error. What happened This caused errors similar to the others in the thread above. Installing and uninstalling jupyter got me to the same issue as @fedeturi. Eventually what fixed it for me was to:
and then re-installing jupyter and jupyter_contrib_nbextensions with conda. |
If you are using a reverse proxy like nginx, you should consider whether the reverse proxy directive is set correctly. I had the same problem, and after I finally set up nginx correctly by referring to this article, everything worked fine. |
I am having the same issue - tried uninstalling, reinstalling and changing tornado versions. Attached is terminal output... @kevin-bates any shot you can help? (base) C:\Users\stephen.bonacci>jupyter lab
[W 2022-10-14 13:28:29.305 LabApp] Could not determine jupyterlab build status without nodejs |
Hi @stephencb96. The fact that the restarter is kicking in indicates that the process used to launch the kernel is starting such that the You can try starting the notebook server with the {
"shell_port": 62267,
"iopub_port": 62268,
"stdin_port": 62269,
"control_port": 62271,
"hb_port": 62270,
"ip": "127.0.0.1",
"key": "9e5a53e4-c84a70299f920136ea2434f6",
"transport": "tcp",
"signature_scheme": "hmac-sha256",
"kernel_name": ""
} This was taken from some remnant files in my Jupyter runtime directory on my system. This directory can be found using |
thanks, @kevin-bates. Debug output below...as a novice is there anything that sticks out? Try the new cross-platform PowerShell https://aka.ms/pscore6 PS C:\Users\stephen.bonacci\Desktop\AOTC> conda activate base |
I'm not certain that's the correct command-line invocation (what is With that in mind, the issue (above) is due to this: Since you're on Windows I'm not sure how helpful I can be - especially if the manual invocation step is leading you down the wrong path. @vidartf might have seen this before or have a better idea of how to go about a diagnosis or providing "working" instructions for command-line invocation. |
@kevin-bates |
Hi @jordan-gilmartin - the console output looks clean. Based on this information, there's either a general connection issue between the browser and notebook server or an issue establishing the websocket connection to the kernel - although I would expect some messaging in the console if the server had been involved. I recommend restarting your notebook server with |
Thanks @kevin-bates , I went back up through the thread and saw some of your previous comments about using --debug so I went ahead and tried it. So one of the odd things is that sometimes when I restart my computer it then allows me to connect when I restart the file but it doesn't seem to 100% resolve the issue as I do wind up encountering it again. Here is the previous file I posted but now having successfully connected without --debug: Now with --debug: Not sure if you can make anything of this, if not I guess I will revert back once I encounter the error again. Regards, |
Hi @jordan-gilmartin. In the first output, the The other thing I notice (in both startups) are the in-use ports for I see you're using Notebook 6.1.4, which is probably a bit old. Could you please provide the output (in the same console window you use to start the servers) for Thanks. |
Hi @kevin-bates , please see a few screen shots below with different version info. I provided base environment versions of conda and jupyter as well as a couple of virtual environments. Conda I tried to update recently and I thought it took but apparently not since it is still showing a very dated version. PythonData was my main virtual environment for the past couple years and Alpaca is the one I just created within the past few weeks. For the jupyter version it appears that the base environment is aligned with the Alpaca virtual environment but the PythonData virtual environment is slightly different in some respects. Let me know what you think. |
These environments are virtually identical with the only real difference being the notebook version - which I don't think is part of the issue. Do you see your issue in the Alpaca or base environments? Can you provide the versions of |
I know I have experienced the connection issue in both virtual environments. I want to say I may have experienced it in the base environment as well but it is very rare that I operate out of the base environment so I'm trying to remember if I may have done it from there within the past few weeks just to troubleshoot. It looks like pyzmq is version 25.0.0 and tornado is version 6.2 for base and both virtual environments. |
Thanks. Hmm. Running out of ideas. Since both envs exhibit the issue, I'm wondering if you could create yet another env that will install notebook conda create -n notebook-env notebook then activate that environment and run (Also be sure to shutdown any other active notebook servers. You should see 6.5.2 start on port |
This all looks clean but I don't see any kernel launches. How are things behaving in that respect? |
ok - this looks good. Are you seeing an issue? If not, I suggest you run with this environment for a while and see if things look stable. |
I was able to establish connection to the kernel again using this virtual environment as well so no evidence of the issue currently. I appreciate your help on this Kevin, if it arises again which I assume it will I will circle back! Regards, |
Thanks for the update @jordan-gilmartin. Given "Connection Failed" can happen for a myriad of reasons, and there have been multiple troubleshooting successes documented in this one issue, I'm going ahead with the issue's closure. If a new "Connection Failed" issue pops up, I think it's appropriate to create a new issue anyway and, hopefully, we can maintain a "single thread of action" per issue (although that's virtually impossible). |
for me it was a stupid thing , I closed the terminal that I wrote "jupyter notebook" in it |
I am getting the same error and struggling on it for quite a while now. Can someone please look into it, please? Error: Jupyter Notebook Output:
Bad address (C:\ci\zeromq_1616055400030\work\src\epoll.cpp:100) (base) C:\Users\shahi>[IPKernelApp] WARNING | Parent appears to have exited, shutting down. |
In my case |
@kevin-bates |
@kevin-bates "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." Trying to launch it from command line resulted in the following log: To access the notebook, open this file in a browser: I have searched extensively through stackoverflow and Jupyter notebook stackoverflow threads and tried every suggestion I could found that has worked for someone in both places. I have downgraded tornado, and tried to create a new environment and uninstall then reinstall jupyter notebook, but nothing has worked so far. I have also downloded the newest version of anaconda and python and reinstalled both to no avail. Hope someone in this community could help me and suggest what I can try next... Thanks in advance! |
@kriefj For me, this command 'netsh winsock reset' worked since I was using VPN. You can have a try. |
Several people in this thread are @ mentioning Kevin Bates even though when he closed this issue he explicitly stated:
so please open a new issue if the solutions provided here are not enough for you. |
With Regards,
I have installed Anaconda and then launch Jupyter Notebook .Being a noob I am trying printing my name in it I am not getting the ouput.
I have downgraded the tornado to
5.1.1
, but still it is not working.I have
Python 3.7.1
installed.There is something
ipykernel
which I have installed by usingpip install ipykernel
but again nothing happens.Moreover on typing
jupyter kernelspec list
I ve got thisC:\Users\This-PC>jupyter kernelspec list Available kernels: python3 c:\users\this-pc\appdata\local\programs\python\python37-32\share\jupyter\kernels\python3
I am attaching some images please find out.
If you need anything else I will supply it.
Thank you.
Errors:
The text was updated successfully, but these errors were encountered: