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

Keep getting Error 404 and 403 from Jupyter Notebook (SOLVED) #3389

Closed
JacopoVanoli opened this issue Mar 2, 2018 · 7 comments
Closed

Keep getting Error 404 and 403 from Jupyter Notebook (SOLVED) #3389

JacopoVanoli opened this issue Mar 2, 2018 · 7 comments

Comments

@JacopoVanoli
Copy link

Few days ago I installed anaconda3 on Linux (Debian 8) and when I run jupyter notebook I keep getting the same errors.

That's what I get from jupyter when it tries to connect to python kernel

[I 16:06:02.796 NotebookApp] Creating new notebook in 
[I 16:06:06.230 NotebookApp] Kernel started: f589fe39-b21c-4eb1-9543-dcf2b9c5881d
[W 16:06:06.353 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20180302160308 (::1) 27.84ms referer=http://localhost:8888/notebooks/Untitled24.ipynb?kernel_name=python3
[W 16:06:06.357 NotebookApp] Couldn't authenticate WebSocket connection
[W 16:06:06.360 NotebookApp] 403 GET /api/kernels/f589fe39-b21c-4eb1-9543-dcf2b9c5881d/channels?session_id=7367bc7903fc402ca08fbee849835439 (::1) 5.25ms referer=None
[W 16:06:07.383 NotebookApp] Couldn't authenticate WebSocket connection
[W 16:06:07.386 NotebookApp] 403 GET /api/kernels/f589fe39-b21c-4eb1-9543-dcf2b9c5881d/channels?session_id=7367bc7903fc402ca08fbee849835439 (::1) 6.04ms referer=None
[W 16:06:09.416 NotebookApp] Couldn't authenticate WebSocket connection
[W 16:06:09.419 NotebookApp] 403 GET /api/kernels/f589fe39-b21c-4eb1-9543-dcf2b9c5881d/channels?session_id=7367bc7903fc402ca08fbee849835439 (::1) 5.91ms referer=None
[W 16:06:13.428 NotebookApp] Couldn't authenticate WebSocket connection
[W 16:06:13.430 NotebookApp] 403 GET /api/kernels/f589fe39-b21c-4eb1-9543-dcf2b9c5881d/channels?session_id=7367bc7903fc402ca08fbee849835439 (::1) 3.46ms referer=None
[W 16:06:21.444 NotebookApp] Couldn't authenticate WebSocket connection
[W 16:06:21.446 NotebookApp] 403 GET /api/kernels/f589fe39-b21c-4eb1-9543-dcf2b9c5881d/channels?session_id=7367bc7903fc402ca08fbee849835439 (::1) 6.82ms referer=None
[W 16:06:37.460 NotebookApp] Couldn't authenticate WebSocket connection
[W 16:06:37.463 NotebookApp] 403 GET /api/kernels/f589fe39-b21c-4eb1-9543-dcf2b9c5881d/channels?session_id=7367bc7903fc402ca08fbee849835439 (::1) 7.27ms referer=None
[W 16:07:09.480 NotebookApp] Couldn't authenticate WebSocket connection
[W 16:07:09.482 NotebookApp] 403 GET /api/kernels/f589fe39-b21c-4eb1-9543-dcf2b9c5881d/channels?session_id=7367bc7903fc402ca08fbee849835439 (::1) 6.05ms referer=None
[I 16:08:05.462 NotebookApp] Saving file at /Untitled24.ipynb
[W 16:08:13.498 NotebookApp] Couldn't authenticate WebSocket connection
[W 16:08:13.500 NotebookApp] 403 GET /api/kernels/f589fe39-b21c-4eb1-9543-dcf2b9c5881d/channels?session_id=7367bc7903fc402ca08fbee849835439 (::1) 5.90ms referer=None

And that's from jupyter notebook --debug

[D 16:32:54.011 NotebookApp] 200 GET /api/sessions?_=1520004762341 (::1) 2.47ms
[D 16:32:54.015 NotebookApp] 200 GET /api/terminals?_=1520004762342 (::1) 2.79ms
[D 16:32:54.049 NotebookApp] 200 GET /api/contents?type=directory&_=1520004762343 (::1) 26.01ms
[I 16:32:56.174 NotebookApp] Creating new notebook in 
[D 16:32:56.176 NotebookApp] Saving /home/jacopo/Untitled26.ipynb
[D 16:32:56.363 NotebookApp] 201 POST /api/contents (::1) 262.60ms
[D 16:32:56.371 NotebookApp] Using contents: services/contents
[D 16:32:56.440 NotebookApp] Path base/images/favicon-notebook.ico served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/base/images/favicon-notebook.ico
[D 16:32:56.440 NotebookApp] Path components/bootstrap-tour/build/css/bootstrap-tour.min.css served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/components/bootstrap-tour/build/css/bootstrap-tour.min.css
[D 16:32:56.441 NotebookApp] Path components/codemirror/lib/codemirror.css served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/components/codemirror/lib/codemirror.css
[D 16:32:56.441 NotebookApp] Path notebook/css/override.css served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/notebook/css/override.css
[D 16:32:56.442 NotebookApp] Path components/text-encoding/lib/encoding.js served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/components/text-encoding/lib/encoding.js
[D 16:32:56.443 NotebookApp] Path notebook/js/main.min.js served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/notebook/js/main.min.js
[D 16:32:56.447 NotebookApp] 200 GET /notebooks/Untitled26.ipynb?kernel_name=python3 (::1) 77.12ms
[D 16:32:56.470 NotebookApp] Path components/MathJax/MathJax.js served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/components/MathJax/MathJax.js
[D 16:32:56.471 NotebookApp] 200 GET /static/components/MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full,Safe&delayStartupUntil=configured (::1) 2.32ms
[D 16:32:56.478 NotebookApp] 200 GET /custom/custom.css (::1) 1.44ms
[D 16:32:56.504 NotebookApp] Path components/MathJax/config/TeX-AMS-MML_HTMLorMML-full.js served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/components/MathJax/config/TeX-AMS-MML_HTMLorMML-full.js
[D 16:32:56.505 NotebookApp] 200 GET /static/components/MathJax/config/TeX-AMS-MML_HTMLorMML-full.js?rev=2.6.0 (::1) 1.75ms
[D 16:32:56.546 NotebookApp] Path components/MathJax/config/Safe.js served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/components/MathJax/config/Safe.js
[D 16:32:56.547 NotebookApp] 200 GET /static/components/MathJax/config/Safe.js?rev=2.6.0 (::1) 1.93ms
[D 16:32:56.795 NotebookApp] Paths used for configuration of notebook: 
        /etc/jupyter/nbconfig/notebook.json
[D 16:32:56.795 NotebookApp] Paths used for configuration of notebook: 
        /usr/local/etc/jupyter/nbconfig/notebook.json
[D 16:32:56.796 NotebookApp] Paths used for configuration of notebook: 
        /home/jacopo/anaconda3/etc/jupyter/nbconfig/notebook.json
[D 16:32:56.797 NotebookApp] Paths used for configuration of notebook: 
        /home/jacopo/.jupyter/nbconfig/notebook.json
[D 16:32:56.797 NotebookApp] 200 GET /api/config/notebook?_=1520004776602 (::1) 3.44ms
[D 16:32:56.805 NotebookApp] Paths used for configuration of common: 
        /etc/jupyter/nbconfig/common.json
[D 16:32:56.806 NotebookApp] Paths used for configuration of common: 
        /usr/local/etc/jupyter/nbconfig/common.json
[D 16:32:56.807 NotebookApp] Paths used for configuration of common: 
        /home/jacopo/anaconda3/etc/jupyter/nbconfig/common.json
[D 16:32:56.807 NotebookApp] Paths used for configuration of common: 
        /home/jacopo/.jupyter/nbconfig/common.json
[D 16:32:56.808 NotebookApp] 200 GET /api/config/common?_=1520004776603 (::1) 3.59ms
[D 16:32:56.843 NotebookApp] Path components/MathJax/extensions/MathML/content-mathml.js served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/components/MathJax/extensions/MathML/content-mathml.js
[D 16:32:56.844 NotebookApp] 200 GET /static/components/MathJax/extensions/MathML/content-mathml.js?rev=2.6.0 (::1) 1.44ms
[D 16:32:56.851 NotebookApp] Found kernel python3 in /home/jacopo/anaconda3/share/jupyter/kernels
[D 16:32:56.853 NotebookApp] 304 GET /api/kernelspecs (::1) 2.67ms
[D 16:32:56.958 NotebookApp] 200 GET /api/contents/Untitled26.ipynb?type=notebook&_=1520004776604 (::1) 104.43ms
[D 16:32:56.959 NotebookApp] Path components/MathJax/extensions/Safe.js served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/components/MathJax/extensions/Safe.js
[D 16:32:56.960 NotebookApp] 200 GET /static/components/MathJax/extensions/Safe.js?rev=2.6.0 (::1) 1.48ms
[D 16:32:56.961 NotebookApp] Path components/MathJax/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js served from /home/jacopo/anaconda3/lib/python3.6/site-packages/notebook/static/components/MathJax/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js
[D 16:32:56.962 NotebookApp] 200 GET /static/components/MathJax/jax/output/HTML-CSS/fonts/STIX-Web/fontdata.js?rev=2.6.0 (::1) 1.15ms
[D 16:32:56.963 NotebookApp] Path jupyter-js-widgets/extension.js served from /home/jacopo/anaconda3/share/jupyter/nbextensions/jupyter-js-widgets/extension.js
[D 16:32:56.966 NotebookApp] 200 GET /nbextensions/jupyter-js-widgets/extension.js?v=20180302163241 (::1) 3.77ms
[D 16:32:56.967 NotebookApp] 200 GET /custom/custom.js?v=20180302163241 (::1) 1.01ms
[D 16:32:57.034 NotebookApp] Path nbextensions_configurator/config_menu/main.js served from /home/jacopo/anaconda3/lib/python3.6/site-packages/jupyter_nbextensions_configurator/static/nbextensions_configurator/config_menu/main.js
[D 16:32:57.035 NotebookApp] 200 GET /nbextensions/nbextensions_configurator/config_menu/main.js?v=20180302163241 (::1) 2.27ms
[D 16:32:57.052 NotebookApp] Path contrib_nbextensions_help_item/main.js served from /home/jacopo/anaconda3/share/jupyter/nbextensions/contrib_nbextensions_help_item/main.js
[D 16:32:57.053 NotebookApp] 200 GET /nbextensions/contrib_nbextensions_help_item/main.js?v=20180302163241 (::1) 1.83ms
[D 16:32:57.080 NotebookApp] 200 GET /api/contents/Untitled26.ipynb/checkpoints?_=1520004776605 (::1) 1.06ms
[D 16:32:57.085 NotebookApp] Serving kernel resource from: /home/jacopo/anaconda3/share/jupyter/kernels/python3
[D 16:32:57.086 NotebookApp] 304 GET /kernelspecs/python3/logo-64x64.png (::1) 1.99ms
[D 16:32:57.114 NotebookApp] Starting kernel: ['/home/jacopo/anaconda3/bin/python', '-m', 'ipykernel_launcher', '-f', '/run/user/1000/jupyter/kernel-ad194d1d-ea37-470c-9ae4-3b6955cd094a.json']
[D 16:32:57.123 NotebookApp] Connecting to: tcp://127.0.0.1:40310
[D 16:32:57.124 NotebookApp] Connecting to: tcp://127.0.0.1:38913
[I 16:32:57.127 NotebookApp] Kernel started: ad194d1d-ea37-470c-9ae4-3b6955cd094a
[D 16:32:57.128 NotebookApp] Kernel args: {'kernel_name': 'python3', 'cwd': '/home/jacopo'}
[D 16:32:57.129 NotebookApp] 201 POST /api/sessions (::1) 60.18ms
[D 16:32:57.148 NotebookApp] Initializing websocket connection /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels
[W 16:32:57.150 NotebookApp] Couldn't authenticate WebSocket connection
[D 16:32:57.151 NotebookApp] Using contents: services/contents
[D 16:32:57.152 NotebookApp] Using contents: services/contents
[W 16:32:57.162 NotebookApp] 403 GET /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels?session_id=d2cb0ab8b78d4a2bbf51feda5b51517f (::1) 14.41ms referer=None
[D 16:32:57.270 NotebookApp] Using contents: services/contents
[W 16:32:57.273 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20180302163241 (::1) 3.55ms referer=http://localhost:8888/notebooks/Untitled26.ipynb?kernel_name=python3
[D 16:32:58.064 NotebookApp] activity on ad194d1d-ea37-470c-9ae4-3b6955cd094a: status
[D 16:32:58.270 NotebookApp] Initializing websocket connection /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels
[W 16:32:58.273 NotebookApp] Couldn't authenticate WebSocket connection
[D 16:32:58.274 NotebookApp] Using contents: services/contents
[D 16:32:58.275 NotebookApp] Using contents: services/contents
[W 16:32:58.276 NotebookApp] 403 GET /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels?session_id=d2cb0ab8b78d4a2bbf51feda5b51517f (::1) 7.22ms referer=None
[D 16:33:00.303 NotebookApp] Initializing websocket connection /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels
[W 16:33:00.306 NotebookApp] Couldn't authenticate WebSocket connection
[D 16:33:00.306 NotebookApp] Using contents: services/contents
[D 16:33:00.307 NotebookApp] Using contents: services/contents
[W 16:33:00.309 NotebookApp] 403 GET /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels?session_id=d2cb0ab8b78d4a2bbf51feda5b51517f (::1) 6.49ms referer=None
[D 16:33:04.320 NotebookApp] Initializing websocket connection /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels
[W 16:33:04.323 NotebookApp] Couldn't authenticate WebSocket connection
[D 16:33:04.323 NotebookApp] Using contents: services/contents
[D 16:33:04.324 NotebookApp] Using contents: services/contents
[W 16:33:04.326 NotebookApp] 403 GET /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels?session_id=d2cb0ab8b78d4a2bbf51feda5b51517f (::1) 6.38ms referer=None
[D 16:33:12.333 NotebookApp] Initializing websocket connection /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels
[W 16:33:12.336 NotebookApp] Couldn't authenticate WebSocket connection
[D 16:33:12.336 NotebookApp] Using contents: services/contents
[D 16:33:12.337 NotebookApp] Using contents: services/contents
[W 16:33:12.338 NotebookApp] 403 GET /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels?session_id=d2cb0ab8b78d4a2bbf51feda5b51517f (::1) 5.36ms referer=None
[D 16:33:28.347 NotebookApp] Initializing websocket connection /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels
[W 16:33:28.350 NotebookApp] Couldn't authenticate WebSocket connection
[D 16:33:28.351 NotebookApp] Using contents: services/contents
[D 16:33:28.352 NotebookApp] Using contents: services/contents
[W 16:33:28.354 NotebookApp] 403 GET /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels?session_id=d2cb0ab8b78d4a2bbf51feda5b51517f (::1) 6.93ms referer=None
[D 16:34:00.378 NotebookApp] Initializing websocket connection /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels
[W 16:34:00.381 NotebookApp] Couldn't authenticate WebSocket connection
[D 16:34:00.382 NotebookApp] Using contents: services/contents
[D 16:34:00.382 NotebookApp] Using contents: services/contents
[W 16:34:00.384 NotebookApp] 403 GET /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels?session_id=d2cb0ab8b78d4a2bbf51feda5b51517f (::1) 6.28ms referer=None
[D 16:34:57.045 NotebookApp] 200 GET /api/contents/Untitled26.ipynb?content=0&_=1520004776606 (::1) 2.27ms
[I 16:34:57.062 NotebookApp] Saving file at /Untitled26.ipynb
[D 16:34:57.062 NotebookApp] Saving /home/jacopo/Untitled26.ipynb
[D 16:34:57.249 NotebookApp] 200 PUT /api/contents/Untitled26.ipynb (::1) 190.17ms
[D 16:35:04.007 NotebookApp] 200 GET /api/sessions?_=1520004762344 (::1) 1.29ms
[D 16:35:04.012 NotebookApp] 200 GET /api/terminals?_=1520004762345 (::1) 2.03ms
[D 16:35:04.051 NotebookApp] 200 GET /api/contents?type=directory&_=1520004762346 (::1) 15.24ms
[D 16:35:04.410 NotebookApp] Initializing websocket connection /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels
[W 16:35:04.412 NotebookApp] Couldn't authenticate WebSocket connection
[D 16:35:04.413 NotebookApp] Using contents: services/contents
[D 16:35:04.414 NotebookApp] Using contents: services/contents
[W 16:35:04.415 NotebookApp] 403 GET /api/kernels/ad194d1d-ea37-470c-9ae4-3b6955cd094a/channels?session_id=d2cb0ab8b78d4a2bbf51feda5b51517f (::1) 5.79ms referer=None

I've already tried to fix it following similar questions' solution but it still doesn't work

@JacopoVanoli
Copy link
Author

JacopoVanoli commented Mar 6, 2018

Solved! It was sufficient to open the notebook using another browser.

My default browser was Konqueror. I've tried to open it using firefox and it worked!

@JacopoVanoli JacopoVanoli changed the title Keep getting Error 404 and 403 from Jupyter Notebook Keep getting Error 404 and 403 from Jupyter Notebook (SOLVED) Mar 6, 2018
@minrk minrk added this to the Reference milestone Jun 15, 2018
@Deepakshi-varma
Copy link

Deepakshi-varma commented Jul 8, 2019

hey @jappo19 I'm getting the same error I have windows 10 using chrome, what should I do
3

@JacopoVanoli
Copy link
Author

As I previously commented, I solved the issue opening the notebook with firefox instead of other browsers.

1 similar comment
@JacopoVanoli
Copy link
Author

As I previously commented, I solved the issue opening the notebook with firefox instead of other browsers.

@rileypeterson
Copy link

I had this issue with Chrome and it was sufficient for me to re-enter in the url (e.g. http://localhost:8888/?token=8766.....) again in a new tab and then reopen my notebook.

@arioboo
Copy link

arioboo commented Nov 10, 2020

Hi. Sorry, but the comment doesn't solve the issue. I have the same problem in Firefox. Keep getting 403 error.

@ibrahimsugun
Copy link

Hi. Sorry, but the comment doesn't solve the issue. I have the same problem in Firefox. Keep getting 403 error.

if you use cmd prompt for starting jupyter go to desktop or another project file with cd command

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants