Skip to content
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

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. #5149

Open
somu191995 opened this issue Jan 9, 2020 · 16 comments

Comments

@somu191995
Copy link

I already uninstall my antivirus , changed the web browser ,and 4time uninstall the total anaconda package and install it again , after that my jupyter notebook is showing kernel not connected or showing server not connected , i upload the bellow screenshot .. please kindly give a proper solution .
Screenshot (24)

@ghost
Copy link

ghost commented Jan 30, 2020

Did you find any solution?
I have also done the same things you did but still facing issue

@kevin-bates
Copy link
Member

This can happen if your Notebook server is no longer running. Check the command window in which jupyter notebook was invoked. If the server is still active, please provide the contents of that command window, otherwise restart the notebook server and see if you can restart the kernel from your notebook (web screen).

@somu191995
Copy link
Author

Already done, but same issue, this problem only in anaconda inbuild jupyter notebook. If i created a new python environment and install there jupyter notebook then it was working.. Same issue on spyder also, kernel not connected

@kevin-bates
Copy link
Member

Sorry for the frustration. Could you please provide the following:

  1. The output of pip freeze in this env
  2. The kernel.json file relative to this kernel. You'll likely want to run jupyter kernelspec list to determine the directory in which this kernel's kernel.json file resides.
  3. Start your Notebook server with the --debug flag, reproduce the problem, then provide the contents from the Notebook server's command window - up to and including the period of the kernel's connection failure.
  4. Is the command window prompt available following the issue? (I.e., has the notebook server stopped?)

Thank you

@somu191995
Copy link
Author

Screenshot (26)

packages.txt

thank u for your concern , but the problem not resolve , i send you the error files, , please do something .

@somu191995
Copy link
Author

json file

{
"argv": [
"C:\Users\Biswajit rout\Anaconda3\python.exe",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"language": "python"
}

@kevin-bates
Copy link
Member

Thank you for the pip freeze and kernel.json information. However, the most important information is that of the command window output. By 'command window', I am not referring to the output you see in the web browser. That had already been provided and I don't expect new information displayed there. However, the window in which you typed jupyter notebook --debug to start the Notebook server in the first place is where the interesting output will be.

I don't know the Windows integration well enough for how people launch Notebook servers. On the Windows machine I have access to, I start a CMD "shell", then type jupyter notebook --debug. This produces information such as the URL to use from the browser to access the server, etc. It's this "shell" in which important details regarding the lifecycle of your failing kernel will reside. Based on your screenshot, this may be the window associated with the Anaconda icon, I don't know.

That said, and groping in the dark here, it looks like you're using some older versions of jupyter modules that have been updated with important fixes that apply to Windows platforms. As a result, I recommend you do the following...

  1. Stop the Notebook server. You'll need to figure out where that occurs from. Typically, this operation will consist of hitting twice in the command window in which the server was started.
  2. Upgrade your Notebook using: conda update -c conda-forge notebook from the appropriate conda env. Once completed, ensure that jupyter_client and jupyter_core have versions 5.3.4 and 4.6.1, respectively.
  3. Restart your Notebook server with --debug and try running the kernel again.

Should the failure continue, you're going to need to figure out how to provide the output of the command window in which the Notebook server (not the web page) was started.

If others more familiar with the various Windows env interactions that myself can help determine where the Notebook's stdout and stderr are going here, please chime in.

Thanks.

@AlekseyMalyshev
Copy link

If the problem persists, please see what error messages do you get in your web browser console. Depending on your browser you might need to enable developer mode.

@GangaKhatoliya
Copy link

I already uninstall my antivirus , changed the web browser ,and 4time uninstall the total anaconda package and install it again , after that my jupyter notebook is showing kernel not connected or showing server not connected , i upload the bellow screenshot .. please kindly give a proper solution .
Screenshot (24)

Screenshot (26)

packages.txt

thank u for your concern , but the problem not resolve , i send you the error files, , please do something .

Even I was getting the same issue again and again, but at the end what I did is Uninstalled the anaconda setup and installed it again and run, now I'm not getting the same issue.

@VaijanathSawrate
Copy link

I am also getting same problem. please solve it.

@VaijanathSawrate
Copy link

I already uninstall my antivirus , changed the web browser ,and 4time uninstall the total anaconda package and install it again , after that my jupyter notebook is showing kernel not connected or showing server not connected , i upload the bellow screenshot .. please kindly give a proper solution .
Screenshot (24)

Screenshot (26)
packages.txt
thank u for your concern , but the problem not resolve , i send you the error files, , please do something .

Even I was getting the same issue again and again, but at the end what I did is Uninstalled the anaconda setup and installed it again and run, now I'm not getting the same issue.

In your C drive search .ipynb and .py and then delete all these files. Before deleting copy your important files to your another drive. By doing this if there any corrupted file will get deleted. After this do fresh installation of anaconda setup. Same problem I solved by doing this. Hope you will also...

@Umraz-Hussain-MyWorld
Copy link

i was facing the same issue, but i found one solution for this.

I looked at the version of tornado (from the above links) in an environment that was working. It turns out that the version was 5.1.1.

I looked at the version of tornado in an environment that was NOT working. It turns out that the version was 6.0.

I downgraded the version of tornado in my non-working environment to 5.1.1 with the following command.

pip install --upgrade tornado==5.1.1

type this command in anaconda terminal, and re-start your jupyter notebook.

And now the non-working environment works!

Note: also check your env, i found this error after installing R programming in jupyter notebook, if you opened R notebook and with that if you open other env you may get this type of error.

i hope this will help.

thank you.

@aayush-b17
Copy link

Hello, even I am facing the same problem. I even tried changing the version of tornado from 6.0 to 5.1.1 but it didn't work. Can someone pls help?
Thank you

@xenbaloch
Copy link

Seems like an interesting error, because on my lab PC connected to network I am getting the same error whereas it works fine on laptop connected to the same network through wifi.

@asifahmed1997bd
Copy link

Same issue . Is there any apecific solution for this problem

@Pijarem
Copy link

Pijarem commented Oct 9, 2022

There is no alternate for Jupyter Notebook so you have dwell with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants