Unable to run Jupyter notebook after update/localhost

0

I I have spent all day on solving this issue and I come here for help. In today’s morning, Jupyter worked really well, and I tried to convert Jupyter to pdf file. But it didn’t work, so I searched the web for help. There was a suggestion to update Jupyter notebook, so I did it. But after this update, Jupyter is not running. I can still access to Jupyter using anaconda prompt. But, when I run the code, it is just not running. When I refresh the page, it says that " This site can’t be reached localhost refused to connect." Here is what I have tried: 1) I don’t think it is related to firewall (I talked with the expert in McAfee); I also tried to set Jupyter notebook password; I uninstall and reinstall multiple times. I need to use Jupyter for my homework, so I am really desperate. I would greatly appreciate if you give me some help! (I tagged wrong before, so I reopen this topic here)

Here is my screenshot.

Hi @Sihyun_Kim - I believe you might be hitting the issue described here: https://github.com/jupyter/notebook/issues/6164. The workaround is to switch to using the AsyncMappingKernelManager as described in the issue. We apologize for the inconvenience.

1 Like

Hi @kevin-bates. Thanks for your help. I tried your command in your link, and Jupyter Notebook shows the same error as before. Also, when I use Jupyter Lab, I got this error in the screen shot. I guess it comes from the same issue.

Hi. I think we should confirm that AsyncMappingKernelManager has been properly set in place before proceeding with troubleshooting further.

Upon staring the notebook server, one of the first messages produced, when AsyncMappingKernelManager is configured is the following:

$ jupyter notebook
[I 07:06:56.186 NotebookApp] Asynchronous kernel management has been configured to use 'AsyncMappingKernelManager'.

Could you please copy/paste the contents of your notebook server console upon startup? Please do not screenshot the contents as they are difficult to read and cannot be re-used via copy/paste.

If you see that AsyncMappingKernelManager is configured, then also include the copy/paste content of your console that includes the kernel startup sequence.

You may want to enable DEBUG logging (via --debug) at that point as well.

Thank you,
Kevin.

1 Like

Sorry, I am new to this website. I will not use the screenshot hereafter. When I use the command in your previous link, the first message is:

[I 09:54:36.050 NotebookApp] Asynchronous kernel management has been configured to use 'AsyncMappingKernelManager'.

I am not sure if I understand your second request correctly. So, after the above message, I got the following messsages in order:

[W 2021-09-15 09:54:36.529 LabApp] 'kernel_manager_class' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2021-09-15 09:54:36.529 LabApp] 'kernel_manager_class' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2021-09-15 09:54:36.542 LabApp] JupyterLab extension loaded from C:\Sihyun\lib\site-packages\jupyterlab
[I 2021-09-15 09:54:36.542 LabApp] JupyterLab application directory is C:\Sihyun\share\jupyter\lab
[I 09:54:36.552 NotebookApp] Serving notebooks from local directory: C:\Sihyun
[I 09:54:36.553 NotebookApp] Jupyter Notebook 6.4.3 is running at:
[I 09:54:36.553 NotebookApp] http://localhost:8888/?token=ac6c70ea0842c6c444a4163a81bcc892d41a4a350735a0ad
[I 09:54:36.553 NotebookApp]  or http://127.0.0.1:8888/?token=ac6c70ea0842c6c444a4163a81bcc892d41a4a350735a0ad
[I 09:54:36.553 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

Sihyun

Thank you for the output.

The second request for troubleshooting - since it looks like you’ve properly configured async kernel management, is to capture the portion of the console window that contains information relative to attempting to start the kernel. I’m hoping that it might shed some light on what’s going on. However, at this point, it might be best to stop the notebook server and relaunch it with the DEBUG logging enabled by adding --debug to the command line.

Once started with DEBUG logging enabled, please attempt to start the kernel and you should see a number of messages posted to the console window that are relative to the kernel’s start. It would be good to see all of those messages - from start to failure.

The current log also indicates that you have jupyter lab installed and, with Lab >= 3.0, things can get a little confusing since the underlying server is jupyter_server rather than notebook. However, I suspect you are running jupyter notebook and using the notebook server backend, otherwise we’d see ServerApp where you see NotebookApp. (Sorry, that last paragraph was mostly FYI stuff).

If this doesn’t get resolved, it might be best to work this offline for a bit. What timezone are you in? I’m in the Pacific TZ.

I got this message:

(base) C:\Sihyun>jupyter notebook --debug
[D 11:02:42.272 NotebookApp] Searching ['C:\\Sihyun', 'C:\\Users\\김시현\\.jupyter', 'C:\\Sihyun\\etc\\jupyter', 'C:\\ProgramData\\jupyter'] for config files
[D 11:02:42.273 NotebookApp] Looking for jupyter_config in C:\ProgramData\jupyter
[D 11:02:42.273 NotebookApp] Looking for jupyter_config in C:\Sihyun\etc\jupyter
[D 11:02:42.273 NotebookApp] Looking for jupyter_config in C:\Users\김시현\.jupyter
[D 11:02:42.273 NotebookApp] Looking for jupyter_config in C:\Sihyun
[D 11:02:42.274 NotebookApp] Looking for jupyter_notebook_config in C:\ProgramData\jupyter
[D 11:02:42.274 NotebookApp] Looking for jupyter_notebook_config in C:\Sihyun\etc\jupyter
[D 11:02:42.275 NotebookApp] Loaded config file: C:\Sihyun\etc\jupyter\jupyter_notebook_config.json
[D 11:02:42.275 NotebookApp] Looking for jupyter_notebook_config in C:\Users\김시현\.jupyter
[D 11:02:42.276 NotebookApp] Loaded config file: C:\Users\김시현\.jupyter\jupyter_notebook_config.py
[D 11:02:42.276 NotebookApp] Looking for jupyter_notebook_config in C:\Sihyun
[D 11:02:42.277 NotebookApp] Ignoring min_open_files_limit because the limit cannot be adjusted (for example, on Windows)
[D 11:02:42.286 NotebookApp] Paths used for configuration of jupyter_notebook_config:
        C:\ProgramData\jupyter\jupyter_notebook_config.json
[D 11:02:42.287 NotebookApp] Paths used for configuration of jupyter_notebook_config:
        C:\Sihyun\etc\jupyter\jupyter_notebook_config.d\jupyterlab.json
        C:\Sihyun\etc\jupyter\jupyter_notebook_config.json
[D 11:02:42.288 NotebookApp] Paths used for configuration of jupyter_notebook_config:
        C:\Users\김시현\.jupyter\jupyter_notebook_config.json
[I 2021-09-15 11:02:42.765 LabApp] JupyterLab extension loaded from C:\Sihyun\lib\site-packages\jupyterlab
[I 2021-09-15 11:02:42.765 LabApp] JupyterLab application directory is C:\Sihyun\share\jupyter\lab
[I 11:02:42.773 NotebookApp] Serving notebooks from local directory: C:\Sihyun
[I 11:02:42.773 NotebookApp] Jupyter Notebook 6.4.3 is running at:
[I 11:02:42.774 NotebookApp] http://localhost:8888/?token=4c188aa33d7ed733d422d4fba4c83a316fec993f236bb0b5
[I 11:02:42.774 NotebookApp]  or http://127.0.0.1:8888/?token=4c188aa33d7ed733d422d4fba4c83a316fec993f236bb0b5
[I 11:02:42.775 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:02:42.828 NotebookApp]

I am in the central time zone. What platform do you want to use to talk?

Sihyun

To bring others up to date, Sihyun and I met via an online conference and got things working. Here’s what we did.

As Sihuyn mentioned in his original post, a few days ago things were working fine, then the environment was upgraded. In that upgrade, two (known) issues were introduced.

  1. The jupyter_client version went to 7.0.1 (from 6.1.12). This appears to have introduced an “async-sensitivity” issue that appears to only occur on Windows and can be addressed via the previously referenced issue where AsyncMappingKernelManager is configured. The other workaround is to revert jupyter_client back to 6.1.12, but that’s taking a step backward.
  2. The version of pyzmq was updated from 19 to 20 (sorry, I don’t have the specific version numbers) involved here. The symptoms of this issue is a message like the following immediately following kernel startup and posted to the console window:
Bad file descriptor (bundled\zeromq\src\epoll.cpp:100)

This issue occurs regardless of which version of jupyter_client is in use. We googled the message and came across this recent SO post as the first hit. Following the steps to downgrade pyzmq worked - again regardless of which version of jupyter_client was installed.

We hope this will help others.

2 Likes