Jupyter Notebook Kernel busy all the time - python

I have instaled anaconda and python works fine in Sypder , IPython etc . However I am not able to run python notebook.
Kernel gets created , it also connects but it shows the dark circle busy symbol throughout . There is no problem with the firewall or antivirus .
I have tried by disabling both .
I am also not able to open python terminal from notebook there is some powershell error.
Can anyone suggest something ?
Edit 1 : Added the snapshot and the log
Log Anaconda Prompt :
(base) C:\Users\Project>jupyter notebook
[I 13:11:26.561 NotebookApp] JupyterLab extension loaded from C:\Users\Project\A
naconda3\lib\site-packages\jupyterlab
[I 13:11:26.561 NotebookApp] JupyterLab application directory is C:\Users\Projec
t\Anaconda3\share\jupyter\lab
[I 13:11:26.569 NotebookApp] Serving notebooks from local directory: C:\Users\Pr
oject
[I 13:11:26.570 NotebookApp] The Jupyter Notebook is running at:
[I 13:11:26.570 NotebookApp] http://localhost:8888/?token=28e7406ee648d631648f9b
8c53e1f3027f5eb30516ccf15f
[I 13:11:26.571 NotebookApp] Use Control-C to stop this server and shut down all
kernels (twice to skip confirmation).
[C 13:11:26.768 NotebookApp]
To access the notebook, open this file in a browser:
file:///C:/Users/Project/AppData/Roaming/jupyter/runtime/nbserver-3064-o
pen.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=28e7406ee648d631648f9b8c53e1f3027f5eb30516c
cf15f
[I 13:11:56.237 NotebookApp] Creating new notebook in
[I 13:12:02.401 NotebookApp] Kernel started: 55d8fb5e-2fe7-4d4b-a1d3-a11b0b7e7e7
d
[I 13:12:05.242 NotebookApp] Adapting to protocol v5.1 for kernel 55d8fb5e-2fe7-
4d4b-a1d3-a11b0b7e7e7d
And the image where kernel is always busy
kernel busy

I was also getting the same issue, I tried a lot of different stuff but nothing seemed to help me out. Ultimately, a Kernel Restart instead of Kernel Interrupt helped me out! The kernel restarted and I was able to run the kernels as usual.
I think this is just a workaround if someone finds the real solution please do let us know!

I has the same issue because I started it as below
jupyter notebook --gateway-url=http://my-domain.com:8888
but I remove geteway-url param then the issue was gone
I know that you didn't make this very same mistake like me but I hope this gives you some clues

Related

Jupyter Notebook takes forever to launch or requires me to CTRL + C once before loading

this is one of the first times I've asked a question here, so excuse me if I don't provide enough information, I'll try to provide any information people require. So, my issue is with Jupyter Notebook/Jupyter Lab, it's a very wierd behavior and I couldn't find anything online. I'm running Jupyter Notebook on WSL2, whenever I run the command "jupyter notebook", I get the following messages:
[I 18:05:32.532 NotebookApp] Serving notebooks from local directory: /home/luhketa
[I 18:05:32.532 NotebookApp] Jupyter Notebook 6.4.12 is running at:
[I 18:05:32.532 NotebookApp] http://localhost:8888/?token=7978516ff4884fa0ca8c562ef18ecf09e4b393da1e42cff0
[I 18:05:32.532 NotebookApp] or http://127.0.0.1:8888/?token=7978516ff4884fa0ca8c562ef18ecf09e4b393da1e42cff0
[I 18:05:32.532 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
After that, if I try to access localhost:8888, the page will just keep loading forever. I say forever, but that's not true, after several minutes the page will load and I'll get the following messages in the terminal:
xdg-open: file '/home/luhketa/.local/share/jupyter/runtime/jpserver-341-open.html' does not exist
[C 18:18:50.295 NotebookApp]
To access the notebook, open this file in a browser:
file:///home/luhketa/.local/share/jupyter/runtime/nbserver-1123-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=7978516ff4884fa0ca8c562ef18ecf09e4b393da1e42cff0
or http://127.0.0.1:8888/?token=7978516ff4884fa0ca8c562ef18ecf09e4b393da1e42cff0
[I 18:18:50.296 NotebookApp] 302 GET / (127.0.0.1) 0.340000ms
[I 18:18:50.306 NotebookApp] 302 GET /tree? (127.0.0.1) 0.430000ms
Parameter format not correct - ""
tcgetpgrp failed: Not a tty
The specific html file that xdg-open tries to open changes everytime, but the rest stays the same. After this, the jupyter notebook page will load normally and I can access my files.
I can also skip the several minute waiting period by pressing CTRL + C in the terminal once, in which case the error messages do not appear, and jupyter notebook also works normally after that.
Jupyter Lab is very similar, the behavior is the same, is just the output that differs a little. I've tried installing both in several different ways (conda, pip, apt), but the behavior is always the same. I'm at a lost as to what to do, so any help is appreciated.

Cannot connect to Jupyter Notebook localhost

I have been struggling with this problem the last few days. I am running Manjaro Linux on my laptop and I have recently installed Jupyter Notebook and Jupyterlab using pip.
However, when I try to run it, I get the following output:
[I 2021-05-20 16:21:19.980 LabApp] JupyterLab extension loaded from /usr/lib/python3.9/site-packages/jupyterlab
[I 2021-05-20 16:21:19.980 LabApp] JupyterLab application directory is /usr/share/jupyter/lab
[I 16:21:20.005 NotebookApp] Serving notebooks from local directory: /home/veducha
[I 16:21:20.005 NotebookApp] Jupyter Notebook 6.4.0 is running at:
[I 16:21:20.005 NotebookApp] http://localhost:8888/?token=ffd911982ac39542bc13b182354204b7caec5b86dc5ffad4
[I 16:21:20.005 NotebookApp] or http://127.0.0.1:8888/?token=ffd911982ac39542bc13b182354204b7caec5b86dc5ffad4
[I 16:21:20.005 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 16:21:20.056 NotebookApp]
To access the notebook, open this file in a browser:
file:///home/veducha/.local/share/jupyter/runtime/nbserver-72176-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=ffd911982ac39542bc13b182354204b7caec5b86dc5ffad4
or http://127.0.0.1:8888/?token=ffd911982ac39542bc13b182354204b7caec5b86dc5ffad4
followed by a tab opening on my browser saying that it is unable to connect to the localhost.
I have tried different using browsers, and some of the answers given in other posts (downgrading tornado, for example) do not seem to work since now you're required to have the latest version of tornado.
Can anyone please help me?
Thanks,
E.

Jupyter notebook not working with Pycharm

I am trying to use jupyter notebook on Pycharm.
Following this article, I ran a simple Hello World code but nothing shows up.
I got some logs like this.
/home/ryuzot/anaconda3/envs/keras_playground2/bin/jupyter notebook --no-browser --port 8888
[I 00:52:46.955 NotebookApp] Serving notebooks from local directory:
/home/ryuzot/PycharmProjects/keras_playground
[I 00:52:46.955 NotebookApp] Jupyter Notebook 6.1.1 is running at:
[I 00:52:46.955 NotebookApp] http://localhost:8888/?
token=45771778a508593eb6b45db8b13b2661daea7a4b709846d6
[I 00:52:46.955 NotebookApp] or http://127.0.0.1:8888/?
token=45771778a508593eb6b45db8b13b2661daea7a4b709846d6
[I 00:52:46.955 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 00:52:46.957 NotebookApp]
To access the notebook, open this file in a browser:
file:///home/ryuzot/.local/share/jupyter/runtime/nbserver-13870-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=45771778a508593eb6b45db8b13b2661daea7a4b709846d6
or http://127.0.0.1:8888/?token=45771778a508593eb6b45db8b13b2661daea7a4b709846d6
I change the port which jupyter is running to 8888 and 8080, but it didn't work.
I use Pycharm professional 2020.2, Jupyter Notebook 6.1.1 , Python 3.7 on openSUSE 15.2.
I hope to receive some help.
To start working with Jupyter notebooks in PyCharm:
Create a new Python project, specify a virtual environment, and install the jupyter package.
Open or create a .ipynb file.
Add and edit source cells.
Execute any of the code cells to launch the Jupyter server.
Analyze execution results in the Preview pane.

Can not open jupyter notebook in localhost in ubuntu

I didn't run jupyter notebook for a long time, Today when I try to launch to notebook , I can't run it and I encountered this:
[I 19:05:29.939 NotebookApp] 0 active kernels
[I 19:05:29.939 NotebookApp] The Jupyter Notebook is running at:
[I 19:05:29.939 NotebookApp] http://localhost:9999/
[I 19:05:29.939 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
Opening in existing browser session.
Then can not open in browser. I looked up other similar question but I didn't find to solution.

Jupyter Notebook is not being opened in windows using Anaconda Prompt?

1) I tried to open Jupyter Notebook in Anaconda prompt.
Ananconda Prompt:
(C:\Users\sankarreddy\Anaconda3) C:\Users\sankarreddy>jupyter notebook
[I 21:24:52.854 NotebookApp] Serving notebooks from local directory: C:\Users\sankarreddy
[I 21:24:52.855 NotebookApp] 0 active kernels
[I 21:24:52.856 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/?token=fb39c20421e31cc66fddfd4fc00c7f64b8003bc53b83f461
[I 21:24:52.856 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 21:24:52.868 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=fb39c20421e31cc66fddfd4fc00c7f64b8003bc53b83f461
2) My default browser is Google chrome and every time when I try to open the Jupyter notebook, the following is the result.
Result in the Browser(Google Chrome):
ERROR: Gateway Timeout
While trying to retrieve the URL http://localhost:8888/tree?token=4f3786890eceb91493af9bd6f4b07ae1ac6888c6172bbfca:
Connection refused
Your cache administrator is webmaster.
Generated Sun, 23 Jul 2017 14:01:21 GMT by 103.217.212.129 (Mikrotik HttpProxy)
3) I interrupted the process using 'Ctrl+C'.. it displays as follows.
[I 19:43:23.364 NotebookApp] Interrupted...
[I 19:43:23.365 NotebookApp] Shutting down kernels
I have googled about this issue, but had very little help which is of no use.
It seems like you're trying to open Jupyter Notebook in port 8888 as stated by the error message While trying to retrieve the URL http://localhost:8888/tree?token=4f3786890eceb91493af9bd6f4b07ae1ac6888c6172bbfca
But, when running Jupyter Notebook, there was an error message stating something else is running in port 8888 and it started the server in the next available port, which is 8889: [I 19:26:39.239 NotebookApp] The Jupyter Notebook is running at: http://localhos t:8889/?token=86664b50ba28f3bd3431554bc84d60d8bf4f3bf4209a4ecf
I'm not sure how to identify what is running on 8888, but you should definitely access your Jupyter Notebook on localhost:8889 .

Categories