Giter Site home page Giter Site logo

Sporadically (but often) getting 404 GET error "/api/contents/var/colab/app.log (127.0.0.1): No such file or directory: var/colab/app.log" about jupyter_http_over_ws HOT 4 OPEN

googlecolab avatar googlecolab commented on September 26, 2024
Sporadically (but often) getting 404 GET error "/api/contents/var/colab/app.log (127.0.0.1): No such file or directory: var/colab/app.log"

from jupyter_http_over_ws.

Comments (4)

blois avatar blois commented on September 26, 2024

The GET request to /api/contents/var/colab/app.log should be occurring after the crash, I'd be surprised if it's the cause of it. When Colab sees an unexpected runtime restart it attempts to fetch the logs to see if there's a known issue logged so it can display a workaround.

from jupyter_http_over_ws.

piojanu avatar piojanu commented on September 26, 2024

Okay, so how can I see what's the problem?

from jupyter_http_over_ws.

onderpolat-glean avatar onderpolat-glean commented on September 26, 2024

adding

import logging
import sys

logging.basicConfig(format='%(asctime)s | %(levelname)s : %(message)s', level=logging.INFO, stream=sys.stdout)

to the beginning of your notebook solves this problem.

from jupyter_http_over_ws.

convertthinking avatar convertthinking commented on September 26, 2024

I have a similar problem, my OS is Ubuntu 22.10.

Colab failed to connect local Docker runtime till I downgraded to jupyterlab==3.0.0 tornado==6.1, like others do.

Then it's crashes due to unknown error on importing parts of a package inside a notebook.

root@1a404a587288:/home# jupyter notebook --notebook-dir=/ --ip 0.0.0.0 --no-browser --allow-root --NotebookApp.allow_origin='https://colab.research.google.com' --port=8889 --NotebookApp.port_retries=0


| | | |_ __ | | | | ___
| || | ' / / _ | / -)
_/| ./_
,_,|____|
|_|

Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

jupyter_http_over_ws extension initialized. Listening on /http_over_websocket
[W 2023-05-14 00:40:04.873 LabApp] 'notebook_dir' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-05-14 00:40:04.873 LabApp] 'ip' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-05-14 00:40:04.873 LabApp] 'allow_origin' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-05-14 00:40:04.873 LabApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-05-14 00:40:04.874 LabApp] 'port_retries' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-05-14 00:40:04.874 LabApp] 'port_retries' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-05-14 00:40:04.874 LabApp] 'allow_root' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2023-05-14 00:40:04.874 LabApp] 'allow_root' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-05-14 00:40:04.879 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.8/dist-packages/jupyterlab
[I 2023-05-14 00:40:04.879 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 00:40:04.886 NotebookApp] Serving notebooks from local directory: /
[I 00:40:04.886 NotebookApp] Jupyter Notebook 6.5.4 is running at:
[I 00:40:04.886 NotebookApp] http://1a404a587288:8889/?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c
[I 00:40:04.886 NotebookApp] or http://127.0.0.1:8889/?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c
[I 00:40:04.886 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 00:40:04.891 NotebookApp]

To access the notebook, open this file in a browser:
    file:///root/.local/share/jupyter/runtime/nbserver-2272-open.html
Or copy and paste one of these URLs:
    http://1a404a587288:8889/?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c
 or http://127.0.0.1:8889/?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c

[I 00:40:21.840 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.670000ms
[I 00:40:22.194 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.610000ms
[I 00:40:22.256 NotebookApp] Kernel started: bf27e1d2-c9bd-48ea-b71d-a9a4a0866ab6, name: python3
[I 00:40:22.283 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 1.020000ms
[I 00:40:22.290 NotebookApp] proxying WebSocket connection to: ws://localhost:8889/api/kernels/bf27e1d2-c9bd-48ea-b71d-a9a4a0866ab6/channels?session_id=9f26beaa-7f19-462c-8237-bd62fb15b2ec&jupyter_http_over_ws_auth_url=http%3A%2F%2Flocalhost%3A8889%2F%3Ftoken%3D2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c
[I 00:41:04.245 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
WARNING:root:kernel bf27e1d2-c9bd-48ea-b71d-a9a4a0866ab6 restarted
[I 00:41:05.348 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.800000ms
[I 00:41:05.364 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.510000ms
[W 00:41:05.373 NotebookApp] 404 GET /api/contents/var/colab/events (127.0.0.1): file or directory does not exist: 'var/colab/events'
[W 00:41:05.373 NotebookApp] file or directory does not exist: 'var/colab/events'
[W 00:41:05.374 NotebookApp] 404 GET /api/contents/var/colab/events (127.0.0.1) 1.520000ms referer=None
[I 00:41:05.378 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.560000ms
[W 00:41:05.399 NotebookApp] 404 GET /api/contents/var/colab/ooms (127.0.0.1): file or directory does not exist: 'var/colab/ooms'
[W 00:41:05.401 NotebookApp] file or directory does not exist: 'var/colab/ooms'
[W 00:41:05.401 NotebookApp] 404 GET /api/contents/var/colab/ooms (127.0.0.1) 7.620000ms referer=None
[I 00:41:05.409 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.720000ms
[I 00:41:05.429 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.540000ms
[W 00:41:05.437 NotebookApp] 404 GET /api/contents/var/colab/events (127.0.0.1): file or directory does not exist: 'var/colab/events'
[W 00:41:05.437 NotebookApp] file or directory does not exist: 'var/colab/events'
[W 00:41:05.438 NotebookApp] 404 GET /api/contents/var/colab/events (127.0.0.1) 1.240000ms referer=None
[I 00:41:05.442 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.550000ms
[W 00:41:05.451 NotebookApp] 404 GET /api/contents/var/colab/ooms (127.0.0.1): file or directory does not exist: 'var/colab/ooms'
[W 00:41:05.451 NotebookApp] file or directory does not exist: 'var/colab/ooms'
[W 00:41:05.451 NotebookApp] 404 GET /api/contents/var/colab/ooms (127.0.0.1) 1.340000ms referer=None
[I 00:41:05.455 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.610000ms
[W 00:41:05.464 NotebookApp] Blocking request with no referer
[W 00:41:05.464 NotebookApp] 403 GET /files/var/colab/app.log (127.0.0.1): Blocking request from unknown origin
[W 00:41:05.475 NotebookApp] 403 GET /files/var/colab/app.log (127.0.0.1) 12.060000ms referer=None
[I 00:41:05.480 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.560000ms
[W 00:41:05.489 NotebookApp] Blocking request with no referer
[W 00:41:05.489 NotebookApp] 403 GET /files/var/colab/app.log (127.0.0.1): Blocking request from unknown origin
[W 00:41:05.491 NotebookApp] 403 GET /files/var/colab/app.log (127.0.0.1) 2.040000ms referer=None
[I 00:48:28.272 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
WARNING:root:kernel bf27e1d2-c9bd-48ea-b71d-a9a4a0866ab6 restarted
[I 00:48:29.275 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.900000ms
[I 00:48:29.302 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.600000ms
[W 00:48:29.311 NotebookApp] 404 GET /api/contents/var/colab/events (127.0.0.1): file or directory does not exist: 'var/colab/events'
[W 00:48:29.312 NotebookApp] file or directory does not exist: 'var/colab/events'
[W 00:48:29.312 NotebookApp] 404 GET /api/contents/var/colab/events (127.0.0.1) 1.320000ms referer=None
[I 00:48:29.316 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.540000ms
[W 00:48:29.325 NotebookApp] 404 GET /api/contents/var/colab/ooms (127.0.0.1): file or directory does not exist: 'var/colab/ooms'
[W 00:48:29.325 NotebookApp] file or directory does not exist: 'var/colab/ooms'
[W 00:48:29.326 NotebookApp] 404 GET /api/contents/var/colab/ooms (127.0.0.1) 1.320000ms referer=None
[I 00:48:29.337 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.610000ms
[W 00:48:29.345 NotebookApp] Blocking request with no referer
[W 00:48:29.345 NotebookApp] 403 GET /files/var/colab/app.log (127.0.0.1): Blocking request from unknown origin
[W 00:48:29.347 NotebookApp] 403 GET /files/var/colab/app.log (127.0.0.1) 1.920000ms referer=None
[I 00:48:30.904 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.790000ms
[I 00:48:31.019 NotebookApp] 302 GET /?token=2e59f48ed4c5bb7e3355ce39c3ab50a2512d1e6e39e64f0c (127.0.0.1) 0.740000ms
[W 00:48:31.029 NotebookApp] Blocking request with no referer
[W 00:48:31.029 NotebookApp] 403 GET /files/var/colab/app.log (127.0.0.1): Blocking request from unknown origin
[W 00:48:31.031 NotebookApp] 403 GET /files/var/colab/app.log (127.0.0.1) 2.190000ms referer=None
[I 00:49:04.299 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
WARNING:root:kernel bf27e1d2-c9bd-48ea-b71d-a9a4a0866ab6 restarted

with messages like

Your session crashed. Automatically restarting.

Adding

import logging
import sys

logging.basicConfig(format='%(asctime)s | %(levelname)s : %(message)s', level=logging.INFO, stream=sys.stdout)

to the beginning of your notebook didn't solve this problem for me. I even can't see any logging present.

I created the dir /var/colab but it didn't change anything.

On trying get log in the colab notebook in my browser it opens popup window with message

Could not fetch /var/colab/app.log from backend
Could not fetch resource at : 404 Not Found 
tb@https://ssl.gstatic.com/colaboratory-static/common/85c0f731b1fe913211f742b41f99dc8e/external_polymer_binary.js:89:517
HB@https://ssl.gstatic.com/colaboratory-static/common/85c0f731b1fe913211f742b41f99dc8e/external_polymer_binary.js:1507:2524
pF@https://ssl.gstatic.com/colaboratory-static/common/85c0f731b1fe913211f742b41f99dc8e/external_polymer_binary.js:1924:186
g.get/<@https://ssl.gstatic.com/colaboratory-static/common/85c0f731b1fe913211f742b41f99dc8e/external_polymer_binary.js:6724:133
xa@https://ssl.gstatic.com/colaboratory-static/common/85c0f731b1fe913211f742b41f99dc8e/external_polymer_binary.js:21:57
ua.prototype.next_@https://ssl.gstatic.com/colaboratory-static/common/85c0f731b1fe913211f742b41f99dc8e/external_polymer_binary.js:19:195
laa/this.next@https://ssl.gstatic.com/colaboratory-static/common/85c0f731b1fe913211f742b41f99dc8e/external_polymer_binary.js:22:48
b@https://ssl.gstatic.com/colaboratory-static/common/85c0f731b1fe913211f742b41f99dc8e/external_polymer_binary.js:22:309
  1. Where are all those

/files/var/colab/app.log,
/api/contents/var/colab/ooms
/api/contents/var/colab/events
var/colab/events

and how do the relate to

/var/colab?

  1. What is the proper way to install run jupyter notebook ?
    Mine was installed with pip.

  2. What are other ways to troubleshoot the situation and how to find crash exceptions info, etc to fix?

from jupyter_http_over_ws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.