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

[BUG] - Server connection error #1800

Closed
adrienpacifico opened this issue Oct 6, 2022 · 9 comments
Closed

[BUG] - Server connection error #1800

adrienpacifico opened this issue Oct 6, 2022 · 9 comments
Labels
status:Need Info We believe we need more information about an issue from the reporting user to help, debug, fix type:Bug A problem with the definition of one of the docker images maintained here

Comments

@adrienpacifico
Copy link

adrienpacifico commented Oct 6, 2022

What docker image(s) are you using?

minimal-notebook

OS system and architecture running docker image

Pop!_OS 20.10

What Docker command are you running?

docker run --pull=always --network host jupyter/minimal-notebook

How to Reproduce the problem?

  1. Visit localhost:8890
  2. Open a notebook from jupyterlab

Command output

(base) adrienpacifico@pop-os:~$ docker run --rm  -it --pull=always --network host  jupyter/minimal-notebook
latest: Pulling from jupyter/minimal-notebook
Digest: sha256:8648f99fbf412ce4052bd9edf224a85569909715ee8d20fd774d6aeb6138cd35
Status: Image is up to date for jupyter/minimal-notebook:latest
Entered start.sh with args: jupyter lab
Executing the command: jupyter lab
Fail to get yarn configuration. /opt/conda/bin/node[14]: ../../src/node_platform.cc:61:std::unique_ptr<long unsigned int> node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start(): Assertion `(0) == (uv_thread_create(t.get(), start_thread, this))' failed.
 1: 0x7f184fd69c39 node::Abort() [/opt/conda/bin/../lib/libnode.so.102]
 2: 0x7f184fd69ccb  [/opt/conda/bin/../lib/libnode.so.102]
 3: 0x7f184fde826d node::WorkerThreadsTaskRunner::WorkerThreadsTaskRunner(int) [/opt/conda/bin/../lib/libnode.so.102]
 4: 0x7f184fde8352 node::NodePlatform::NodePlatform(int, v8::TracingController*, v8::PageAllocator*) [/opt/conda/bin/../lib/libnode.so.102]
 5: 0x7f184fd2bed7  [/opt/conda/bin/../lib/libnode.so.102]
 6: 0x7f184fd2c432 node::InitializeOncePerProcess(int, char**, node::InitializationSettingsFlags, node::ProcessFlags::Flags) [/opt/conda/bin/../lib/libnode.so.102]
 7: 0x7f184fd2c57a node::InitializeOncePerProcess(int, char**) [/opt/conda/bin/../lib/libnode.so.102]
 8: 0x7f184fd2c5d7 node::Start(int, char**) [/opt/conda/bin/../lib/libnode.so.102]
 9: 0x7f184f368d90  [/lib/x86_64-linux-gnu/libc.so.6]
10: 0x7f184f368e40 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
11: 0x55fe91d35145  [/opt/conda/bin/node]

[I 2022-10-06 08:46:16.334 ServerApp] jupyterlab | extension was successfully linked.
[W 2022-10-06 08:46:16.338 NotebookApp] '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 2022-10-06 08:46:16.338 NotebookApp] '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 2022-10-06 08:46:16.338 NotebookApp] 'port' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2022-10-06 08:46:16.343 ServerApp] nbclassic | extension was successfully linked.
[I 2022-10-06 08:46:16.347 ServerApp] Writing Jupyter server cookie secret to /home/jovyan/.local/share/jupyter/runtime/jupyter_cookie_secret
[I 2022-10-06 08:46:16.487 ServerApp] notebook_shim | extension was successfully linked.
[I 2022-10-06 08:46:16.499 ServerApp] notebook_shim | extension was successfully loaded.
[I 2022-10-06 08:46:16.500 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.10/site-packages/jupyterlab
[I 2022-10-06 08:46:16.500 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 2022-10-06 08:46:16.503 ServerApp] jupyterlab | extension was successfully loaded.
[I 2022-10-06 08:46:16.506 ServerApp] nbclassic | extension was successfully loaded.
[I 2022-10-06 08:46:16.506 ServerApp] The port 8888 is already in use, trying another port.
[I 2022-10-06 08:46:16.506 ServerApp] The port 8889 is already in use, trying another port.
[I 2022-10-06 08:46:16.507 ServerApp] Serving notebooks from local directory: /home/jovyan
[I 2022-10-06 08:46:16.507 ServerApp] Jupyter Server 1.19.1 is running at:
[I 2022-10-06 08:46:16.507 ServerApp] http://pop-os:8890/lab?token=199910568bee3ad050ae25c4b1a5400654ac5c5b2579b8ce
[I 2022-10-06 08:46:16.507 ServerApp]  or http://127.0.0.1:8890/lab?token=199910568bee3ad050ae25c4b1a5400654ac5c5b2579b8ce
[I 2022-10-06 08:46:16.507 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2022-10-06 08:46:16.509 ServerApp] 
    
    To access the server, open this file in a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/jpserver-7-open.html
    Or copy and paste one of these URLs:
        http://pop-os:8890/lab?token=199910568bee3ad050ae25c4b1a5400654ac5c5b2579b8ce
     or http://127.0.0.1:8890/lab?token=199910568bee3ad050ae25c4b1a5400654ac5c5b2579b8ce
[W 2022-10-06 08:46:17.944 ServerApp] Clearing invalid/expired login cookie username-127-0-0-1-8890
[W 2022-10-06 08:46:17.945 ServerApp] wrote error: 'Forbidden'
[W 2022-10-06 08:46:17.945 ServerApp] 403 GET /api/terminals?1665045977943 (127.0.0.1) 0.88ms referer=http://127.0.0.1:8890/lab/workspaces/auto-F/tree/Untitled1.ipynb
[W 2022-10-06 08:46:18.714 ServerApp] wrote error: 'Forbidden'
[W 2022-10-06 08:46:18.714 ServerApp] 403 GET /api/contents?content=1&1665045978713 (127.0.0.1) 0.72ms referer=http://127.0.0.1:8890/lab/workspaces/auto-F/tree/Untitled1.ipynb
[W 2022-10-06 08:46:28.723 ServerApp] wrote error: 'Forbidden'
[W 2022-10-06 08:46:28.723 ServerApp] 403 GET /api/contents?content=1&1665045988717 (127.0.0.1) 2.11ms referer=http://127.0.0.1:8890/lab/workspaces/auto-F/tree/Untitled1.ipynb
[W 2022-10-06 08:46:29.343 ServerApp] wrote error: 'Forbidden'
[W 2022-10-06 08:46:29.343 ServerApp] 403 GET /api/kernelspecs?1665045989341 (127.0.0.1) 0.80ms referer=http://127.0.0.1:8890/lab/workspaces/auto-F/tree/Untitled1.ipynb
[W 2022-10-06 08:46:29.892 ServerApp] wrote error: 'Forbidden'
[W 2022-10-06 08:46:29.892 ServerApp] 403 GET /api/sessions?1665045989891 (127.0.0.1) 0.55ms referer=http://127.0.0.1:8890/lab/workspaces/auto-F/tree/Untitled1.ipynb
[E 2022-10-06 08:46:32.719 ServerApp] Uncaught exception GET /lab/api/settings?1665045992608 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='127.0.0.1:8890', method='GET', uri='/lab/api/settings?1665045992608', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.10/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
    tornado.iostream.StreamClosedError: Stream is closed
[E 2022-10-06 08:46:34.266 ServerApp] Uncaught exception GET /lab/api/build?1665045994265 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='127.0.0.1:8890', method='GET', uri='/lab/api/build?1665045994265', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.10/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/opt/conda/lib/python3.10/site-packages/tornado/gen.py", line 776, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "/opt/conda/lib/python3.10/site-packages/jupyterlab/handlers/build_handler.py", line 131, in get
        data = yield self.builder.get_status()
      File "/opt/conda/lib/python3.10/site-packages/tornado/gen.py", line 769, in run
        value = future.result()
      File "/opt/conda/lib/python3.10/site-packages/tornado/gen.py", line 234, in wrapper
        yielded = ctx_run(next, result)
      File "/opt/conda/lib/python3.10/site-packages/jupyterlab/handlers/build_handler.py", line 42, in get_status
        messages = yield self._run_build_check(
      File "/opt/conda/lib/python3.10/site-packages/tornado/concurrent.py", line 122, in wrapper
        conc_future = getattr(self, executor).submit(fn, self, *args, **kwargs)
      File "/opt/conda/lib/python3.10/concurrent/futures/thread.py", line 176, in submit
        self._adjust_thread_count()
      File "/opt/conda/lib/python3.10/concurrent/futures/thread.py", line 199, in _adjust_thread_count
        t.start()
      File "/opt/conda/lib/python3.10/threading.py", line 935, in start
        _start_new_thread(self._bootstrap, ())
    RuntimeError: can't start new thread
[W 2022-10-06 08:46:34.267 LabApp] wrote error: 'Unhandled error'
[E 2022-10-06 08:46:34.267 LabApp] {
      "Host": "127.0.0.1:8890",
      "Accept": "*/*",
      "Referer": "http://127.0.0.1:8890/lab/workspaces/auto-H?reset",
      "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
    }
[E 2022-10-06 08:46:34.267 LabApp] 500 GET /lab/api/build?1665045994265 (127.0.0.1) 1.63ms referer=http://127.0.0.1:8890/lab/workspaces/auto-H?reset
[E 2022-10-06 08:46:34.547 ServerApp] Uncaught exception GET /api/nbconvert?1665045994441 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='127.0.0.1:8890', method='GET', uri='/api/nbconvert?1665045994441', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.10/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/opt/conda/lib/python3.10/site-packages/jupyter_server/services/nbconvert/handlers.py", line 35, in get
        exporters = await run_sync(base.get_export_names)
      File "/opt/conda/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
        return await get_asynclib().run_sync_in_worker_thread(
      File "/opt/conda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 918, in run_sync_in_worker_thread
        worker.start()
      File "/opt/conda/lib/python3.10/threading.py", line 935, in start
        _start_new_thread(self._bootstrap, ())
    RuntimeError: can't start new thread
[W 2022-10-06 08:46:34.548 ServerApp] wrote error: 'Unhandled error'
[E 2022-10-06 08:46:34.548 ServerApp] {
      "Host": "127.0.0.1:8890",
      "Accept": "*/*",
      "Referer": "http://127.0.0.1:8890/lab/workspaces/auto-H?reset",
      "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
    }
[E 2022-10-06 08:46:34.548 ServerApp] 500 GET /api/nbconvert?1665045994441 (127.0.0.1) 102.38ms referer=http://127.0.0.1:8890/lab/workspaces/auto-H?reset
[E 2022-10-06 08:46:34.549 ServerApp] Uncaught exception GET /api/nbconvert?1665045994443 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='127.0.0.1:8890', method='GET', uri='/api/nbconvert?1665045994443', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.10/site-packages/tornado/web.py", line 1713, in _execute
        result = await result
      File "/opt/conda/lib/python3.10/site-packages/jupyter_server/services/nbconvert/handlers.py", line 35, in get
        exporters = await run_sync(base.get_export_names)
      File "/opt/conda/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
        return await get_asynclib().run_sync_in_worker_thread(
      File "/opt/conda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 918, in run_sync_in_worker_thread
        worker.start()
      File "/opt/conda/lib/python3.10/threading.py", line 935, in start
        _start_new_thread(self._bootstrap, ())
    RuntimeError: can't start new thread
[W 2022-10-06 08:46:34.549 ServerApp] wrote error: 'Unhandled error'
[E 2022-10-06 08:46:34.550 ServerApp] {
      "Host": "127.0.0.1:8890",
      "Accept": "*/*",
      "Referer": "http://127.0.0.1:8890/lab/workspaces/auto-H?reset",
      "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
    }
[E 2022-10-06 08:46:34.550 ServerApp] 500 GET /api/nbconvert?1665045994443 (127.0.0.1) 102.84ms referer=http://127.0.0.1:8890/lab/workspaces/auto-H?reset
[I 2022-10-06 08:46:36.967 ServerApp] Creating new notebook in 
[I 2022-10-06 08:46:37.014 ServerApp] Writing notebook-signing key to /home/jovyan/.local/share/jupyter/notebook_secret
Operation not permitted (src/thread.cpp:269)

Expected behavior

Open a working jupyterlab

Actual behavior

image

And the container is stopped (last line is Writing notebook-signing key to /home/jovyan/.local/share/jupyter/notebook_secret Operation not permitted (src/thread.cpp:269)

Anything else?

If I run an older image, the problem is not present.
docker run --rm --pull=always --network host jupyter/minimal-notebook:2022-05-28

My system is a bit old (2 years old), the cause of the problem could be linked to that ?

My docker version is also a bit old:

$ docker -v
Docker version 20.10.2, build 20.10.2-0ubuntu1~20.10.1
@adrienpacifico adrienpacifico added the type:Bug A problem with the definition of one of the docker images maintained here label Oct 6, 2022
@mathbunnyru
Copy link
Member

I ran the same command on my Ubuntu 22.04 VM and it seems to work - so this issue is probably related to your specific host machine.

My system is a bit old (2 years old), the cause of the problem could be linked to that ?

I guess this might be the problem. Do you have the system packages upgraded?
Maybe in this case it's some certificate issue?
I don't know anything about Pop!_OS unfortunately :(

@mathbunnyru
Copy link
Member

Also, I see many jupyter labs are launched simultaneously:

[I 2022-10-06 08:46:16.506 ServerApp] The port 8888 is already in use, trying another port.
[I 2022-10-06 08:46:16.506 ServerApp] The port 8889 is already in use, trying another port.`

Could you try using -p 8888:8888 (and using only one running docker container for the beginning) and not using --network host?
There might be a chance, that these services conflict with each other.

@adrienpacifico
Copy link
Author

adrienpacifico commented Oct 6, 2022

Thank you !

I don't know anything about Pop!_OS unfortunately

Pop!_OS is an Ubuntu with Nvidia drivers installed and a cool windows manager that is somewhere between gnome and i3.

Maybe in this case it's some certificate issue?

I don't know.

Do you have the system packages upgraded?

I am not sure about what system packages are.

Could you try using -p 8888:8888 (and using only one running docker container for the beginning) and not using --network host?

I do not want to stops all my containers, I have ML models in training ;-) . I tried without --network host but with -p 8900:8888 and I have the same issue.

@mathbunnyru , since it works on your machine, you probably can close the issue?

@mathbunnyru
Copy link
Member

mathbunnyru commented Oct 6, 2022

Let's keep it open for a while. Maybe someone had a similar problem and found the solution.

@lacic
Copy link

lacic commented Oct 7, 2022

Can confirm the same issue with the following setup:

  • Ubuntu 20.04.2 LTS on Windows 11 with WSL2
  • Docker version 20.10.7
  • jupyter/scipy-notebook
  • commands:
    • docker pull jupyter/scipy-notebook
    • docker run -it --rm -p 10000:8888 -v "$PWD"/notebooks/:/home/jovyan/ jupyter/scipy-notebook

@lacic
Copy link

lacic commented Oct 8, 2022

UPDATE: Upgrading to the newest version of Docker (20.10.18) seems to resolve the issue in my case

@mathbunnyru
Copy link
Member

Thank you @lacic, that's great news!
@adrienpacifico could you check if this solution works for you as well?

@mathbunnyru mathbunnyru added the status:Need Info We believe we need more information about an issue from the reporting user to help, debug, fix label Oct 9, 2022
@mathbunnyru
Copy link
Member

I think this can be considered solved, so closing this issue.

@askibinski
Copy link

Can confirm, Ubuntu 22.04, upgrading docker-ce from 20.10.21 to 20.10.8 fixed this issue for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:Need Info We believe we need more information about an issue from the reporting user to help, debug, fix type:Bug A problem with the definition of one of the docker images maintained here
Projects
None yet
Development

No branches or pull requests

4 participants