Error Starting Kernel - Failed to fetch: Problem with FEniCSx installation JupyterLab

Dear all,

I’ve been a (legacy) FEniCS user for a couple of years now, and I wanted to test the new FEniCSx (I have Win 10 Enterprise and Docker Desktop 2.2.0.3). Following the suggested installation using docker and JupyterLab, I used the command:

docker run -p 8888:8888 dolfinx/lab

The container is built and started as expected, but when I try to open a new notebook, I get the following error (the same thing happens when trying to open a console, but not with a terminal or a python file):

And the console returns the following:

[E 2022-07-26 05:40:04.517 ServerApp] Uncaught exception GET /lab/api/build?1658814004508 (172.17.0.1)
HTTPServerRequest(protocol=‘http’, host=‘127.0.0.1:8888’, method=‘GET’, uri=‘/lab/api/build?1658814004508’, version=‘HTTP/1.1’, remote_ip=‘172.17.0.1’)
Traceback (most recent call last):
File “/usr/local/lib/python3.10/dist-packages/tornado/web.py”, line 1713, in _execute
result = await result
File “/usr/local/lib/python3.10/dist-packages/tornado/gen.py”, line 776, in run
yielded = self.gen.throw(exc_info) # type: ignore
File “/usr/local/lib/python3.10/dist-packages/jupyterlab/handlers/build_handler.py”, line 131, in get
data = yield self.builder.get_status()
File “/usr/local/lib/python3.10/dist-packages/tornado/gen.py”, line 769, in run
value = future.result()
File “/usr/local/lib/python3.10/dist-packages/tornado/gen.py”, line 234, in wrapper
yielded = ctx_run(next, result)
File “/usr/local/lib/python3.10/dist-packages/jupyterlab/handlers/build_handler.py”, line 42, in get_status
messages = yield self._run_build_check(
File “/usr/local/lib/python3.10/dist-packages/tornado/concurrent.py”, line 122, in wrapper
conc_future = getattr(self, executor).submit(fn, self, args, **kwargs)
File “/usr/lib/python3.10/concurrent/futures/thread.py”, line 176, in submit
self._adjust_thread_count()
File “/usr/lib/python3.10/concurrent/futures/thread.py”, line 199, in _adjust_thread_count
t.start()
File “/usr/lib/python3.10/threading.py”, line 928, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can’t start new thread
[W 2022-07-26 05:40:04.523 LabApp] Unhandled error
[E 2022-07-26 05:40:04.535 LabApp] {
“Host”: “127.0.0.1:8888”,
“Accept”: "
/
",
“Referer”: “http://127.0.0.1:8888/lab”,
“User-Agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36”
}
[E 2022-07-26 05:40:04.535 LabApp] 500 GET /lab/api/build?1658814004508 (172.17.0.1) 19.63ms referer=http://127.0.0.1:8888/lab
[E 2022-07-26 05:40:05.015 ServerApp] Uncaught exception GET /api/nbconvert?1658814004776 (172.17.0.1)
HTTPServerRequest(protocol=‘http’, host=‘127.0.0.1:8888’, method=‘GET’, uri=‘/api/nbconvert?1658814004776’, version=‘HTTP/1.1’, remote_ip=‘172.17.0.1’)
Traceback (most recent call last):
File “/usr/local/lib/python3.10/dist-packages/tornado/web.py”, line 1713, in _execute
result = await result
File “/usr/local/lib/python3.10/dist-packages/jupyter_server/services/nbconvert/handlers.py”, line 30, in get
exporters = await run_sync(base.get_export_names)
File “/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py”, line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File “/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py”, line 918, in run_sync_in_worker_thread
worker.start()
File “/usr/lib/python3.10/threading.py”, line 928, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can’t start new thread
[W 2022-07-26 05:40:05.016 ServerApp] Unhandled error
[E 2022-07-26 05:40:05.022 ServerApp] {
“Host”: “127.0.0.1:8888”,
“Accept”: “/”,
“Referer”: “http://127.0.0.1:8888/lab”,
“User-Agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36”
}
[E 2022-07-26 05:40:05.023 ServerApp] 500 GET /api/nbconvert?1658814004776 (172.17.0.1) 235.96ms referer=http://127.0.0.1:8888/lab
[E 2022-07-26 05:40:05.053 ServerApp] Uncaught exception GET /api/nbconvert?1658814004782 (172.17.0.1)
HTTPServerRequest(protocol=‘http’, host=‘127.0.0.1:8888’, method=‘GET’, uri=‘/api/nbconvert?1658814004782’, version=‘HTTP/1.1’, remote_ip=‘172.17.0.1’)
Traceback (most recent call last):
File “/usr/local/lib/python3.10/dist-packages/tornado/web.py”, line 1713, in _execute
result = await result
File “/usr/local/lib/python3.10/dist-packages/jupyter_server/services/nbconvert/handlers.py”, line 30, in get
exporters = await run_sync(base.get_export_names)
File “/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py”, line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File “/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py”, line 918, in run_sync_in_worker_thread
worker.start()
File “/usr/lib/python3.10/threading.py”, line 928, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can’t start new thread
[W 2022-07-26 05:40:05.054 ServerApp] Unhandled error
[E 2022-07-26 05:40:05.054 ServerApp] {
“Host”: “127.0.0.1:8888”,
“Accept”: “/”,
“Referer”: “http://127.0.0.1:8888/lab”,
“User-Agent”: “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36”
}
[E 2022-07-26 05:40:05.054 ServerApp] 500 GET /api/nbconvert?1658814004782 (172.17.0.1) 41.43ms referer=http://127.0.0.1:8888/lab
[I 2022-07-26 05:43:16.278 ServerApp] Creating new notebook in
[I 2022-07-26 05:43:16.338 ServerApp] Saving Untitled.ipynb
[I 2022-07-26 05:43:16.378 ServerApp] Writing notebook-signing key to /root/.local/share/jupyter/notebook_secret
Operation not permitted (src/thread.cpp:269)

Has anyone experienced this? I would appreciate any help to fix my installation.

Update: It seems that there was a problem with the previous docker images. I checked again with the new images, and it works correctly :slight_smile: .