Please update Jupyterlab permissions

The extra config line seems to fix the issue indeed (It feels like the package will need more work to make multiuser work properly). I have pushed the fix in testing

1 Like

It works, but other users get internal server error after successfully login.
Adding the other user to the jupyterlab group fixes it.
usermod -a -G jupyterlab otheruser
I donā€™t know if itā€™s the right way orā€¦ :thinking: :roll_eyes:

1 Like

So we would also need Add hooks to fix permissions by tituspijean Ā· Pull Request #155 Ā· YunoHost-Apps/jupyterlab_ynh Ā· GitHub (I have not tested if the hooks are properly working, nor rebased the branch after ericā€™s PR).

I have tried from this branch, with ~Ericā€™s fix, with no success as the spawned process got permission denied in ~ for user (which process? IDK, control?).

Logs:

Sep 30 15:08:33 domain.tld jupyterhub[236425]: [I 2024-09-30 15:08:33.878 JupyterHub log:192] 200 GET /jupyterlab/hub/api/users/orhtej22/server/progress?_xsrf=[secret] (orhtej22@111.222.111.111) 120238.36ms
Sep 30 15:08:40 domain.tld jupyterhub[236425]: [E 2024-09-30 15:08:40.400 JupyterHub pages:374] Previous spawn for orhtej22 failed: Server at http://127.0.0.1:47855/jupyterlab/user/orhtej22/api didn't respond in 120 seconds
Sep 30 15:08:40 domain.tld jupyterhub[236425]: [E 2024-09-30 15:08:40.403 JupyterHub log:184] {
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "X-Forwarded-Port": "80",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Authorization": "Basic [secret]",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Cookie": "_xsrf=[secret]; jupyterhub-hub-login=[secret]; jupyterhub-session-id=[secret]; SSOwAuthUser=[secret]; SSOwAuthHash=[secret]; SSOwAuthExpire=[secret]; yunohost.portal=[secret]; i18n_redirected=[secret]; SESSION_test=[secret]; SESSION_agora=[secret]; auth=[secret]",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Priority": "u=0, i",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Sec-Gpc": "1",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Sec-Fetch-User": "?1",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Sec-Fetch-Site": "same-origin",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Sec-Fetch-Mode": "navigate",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Sec-Fetch-Dest": "document",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Upgrade-Insecure-Requests": "1",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Dnt": "1",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Referer": "https://domain.tld/jupyterlab/hub/spawn-pending/orhtej22",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Accept-Language": "en-US,en;q=0.5",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/png,image/svg+xml,*/*;q=0.8",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Connection": "upgrade",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "X-Forwarded-Host": "domain.tld",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "X-Forwarded-For": "111.222.111.111,::ffff:127.0.0.1",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "X-Forwarded-Proto": "https,http",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "X-Real-Ip": "111.222.111.111",
Sep 30 15:08:40 domain.tld jupyterhub[236425]:       "Host": "domain.tld"
Sep 30 15:08:40 domain.tld jupyterhub[236425]:     }
Sep 30 15:08:40 domain.tld jupyterhub[236425]: [E 2024-09-30 15:08:40.404 JupyterHub log:192] 500 GET /jupyterlab/hub/spawn-pending/orhtej22 (orhtej22@111.222.111.111) 8.16ms
Sep 30 15:08:41 domain.tld jupyterhub[236425]: [I 2024-09-30 15:08:41.888 JupyterHub provider:661] Creating oauth client jupyterhub-user-orhtej22
Sep 30 15:08:41 domain.tld jupyterhub[236425]: [I 2024-09-30 15:08:41.923 JupyterHub spawner:1832] Spawning jupyterhub-singleuser --config=/opt/jupyterlab/config/jupyter_notebook_config.py
Sep 30 15:08:42 domain.tld jupyterhub[236425]: [I 2024-09-30 15:08:42.871 JupyterHub log:192] 302 GET /jupyterlab/hub/spawn/orhtej22 -> /jupyterlab/hub/spawn-pending/orhtej22 (orhtej22@111.222.111.111) 1009.69ms
Sep 30 15:08:42 domain.tld jupyterhub[236425]: [I 2024-09-30 15:08:42.902 JupyterHub pages:397] orhtej22 is pending spawn
Sep 30 15:08:42 domain.tld jupyterhub[236425]: [I 2024-09-30 15:08:42.906 JupyterHub log:192] 200 GET /jupyterlab/hub/spawn-pending/orhtej22 (orhtej22@111.222.111.111) 9.71ms
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [I 2024-09-30 15:08:43.127 ServerApp] Extension package jupyterlab took 0.1172s to import
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [I 2024-09-30 15:08:43.744 ServerApp] jupyter_collaboration | extension was successfully linked.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [I 2024-09-30 15:08:43.745 ServerApp] jupyter_lsp | extension was successfully linked.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [I 2024-09-30 15:08:43.749 ServerApp] jupyter_server_fileid | extension was successfully linked.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [I 2024-09-30 15:08:43.754 ServerApp] jupyter_server_terminals | extension was successfully linked.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [I 2024-09-30 15:08:43.754 JupyterHubSingleUser] Starting jupyterhub single-user server extension version 5.1.0
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [I 2024-09-30 15:08:43.755 JupyterHubSingleUser] Using default url from environment $JUPYTERHUB_DEFAULT_URL: /lab
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [I 2024-09-30 15:08:43.759 ServerApp] jupyterhub | extension was successfully linked.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [W 2024-09-30 15:08:43.761 LabApp] 'terminado_settings' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [W 2024-09-30 15:08:43.761 LabApp] 'terminals_enabled' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [W 2024-09-30 15:08:43.761 LabApp] 'extra_template_paths' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [I 2024-09-30 15:08:43.767 ServerApp] jupyterlab | extension was successfully linked.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [W 2024-09-30 15:08:43.769 JupyterNotebookApp] 'extra_template_paths' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [I 2024-09-30 15:08:43.772 ServerApp] notebook | extension was successfully linked.
Sep 30 15:08:43 domain.tld jupyterhub[236644]: [W 2024-09-30 15:08:43.773 ServerApp] notebook_shim | error linking extension: [Errno 13] Permission denied: '/home/orhtej22/.local/share'
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     Traceback (most recent call last):
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 632, in get
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         value = obj._trait_values[self.name]
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                 ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     KeyError: 'browser_open_file'
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     During handling of the above exception, another exception occurred:
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     Traceback (most recent call last):
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 632, in get
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         value = obj._trait_values[self.name]
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                 ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     KeyError: 'runtime_dir'
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     During handling of the above exception, another exception occurred:
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     Traceback (most recent call last):
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/usr/lib/python3.11/pathlib.py", line 1117, in mkdir
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         os.mkdir(self, mode)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     FileNotFoundError: [Errno 2] No such file or directory: '/home/orhtej22/.local/share/jupyter/runtime'
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     During handling of the above exception, another exception occurred:
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     Traceback (most recent call last):
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/usr/lib/python3.11/pathlib.py", line 1117, in mkdir
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         os.mkdir(self, mode)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     FileNotFoundError: [Errno 2] No such file or directory: '/home/orhtej22/.local/share/jupyter'
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     During handling of the above exception, another exception occurred:
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     Traceback (most recent call last):
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 346, in link_extension
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         extension.link_all_points(self.serverapp)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 228, in link_all_points
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         self.link_point(point_name, serverapp)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 218, in link_point
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         point.link(serverapp)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 140, in link
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         linker(serverapp)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/notebook_shim/nbserver.py", line 109, in _link_jupyter_server_extension
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         members = diff_members(serverapp, nbapp)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/notebook_shim/nbserver.py", line 62, in diff_members
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         m1 = public_members(obj1)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:              ^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/notebook_shim/nbserver.py", line 56, in public_members
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         members = inspect.getmembers(obj)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                   ^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/usr/lib/python3.11/inspect.py", line 595, in getmembers
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         return _getmembers(object, predicate, getattr)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/usr/lib/python3.11/inspect.py", line 573, in _getmembers
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         value = getter(object, key)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                 ^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 687, in __get__
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         return t.cast(G, self.get(obj, cls))  # the G should encode the Optional
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                          ^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 635, in get
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         default = obj.trait_defaults(self.name)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 1897, in trait_defaults
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self))
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 1241, in __call__
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         return self.func(*args, **kwargs)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                ^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_server/serverapp.py", line 1756, in _default_browser_open_file
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         return os.path.join(self.runtime_dir, basename)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                             ^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 687, in __get__
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         return t.cast(G, self.get(obj, cls))  # the G should encode the Optional
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                          ^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 635, in get
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         default = obj.trait_defaults(self.name)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 1897, in trait_defaults
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self))
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_core/application.py", line 111, in _runtime_dir_default
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         ensure_dir_exists(rd, mode=0o700)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_core/utils/__init__.py", line 26, in ensure_dir_exists
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         Path(path).mkdir(parents=True, mode=mode)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/usr/lib/python3.11/pathlib.py", line 1121, in mkdir
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         self.parent.mkdir(parents=True, exist_ok=True)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/usr/lib/python3.11/pathlib.py", line 1121, in mkdir
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         self.parent.mkdir(parents=True, exist_ok=True)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:       File "/usr/lib/python3.11/pathlib.py", line 1117, in mkdir
Sep 30 15:08:43 domain.tld jupyterhub[236644]:         os.mkdir(self, mode)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     PermissionError: [Errno 13] Permission denied: '/home/orhtej22/.local/share'
Sep 30 15:08:43 domain.tld jupyterhub[236644]: Traceback (most recent call last):
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 632, in get
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     value = obj._trait_values[self.name]
Sep 30 15:08:43 domain.tld jupyterhub[236644]:             ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]: KeyError: 'runtime_dir'
Sep 30 15:08:43 domain.tld jupyterhub[236644]: During handling of the above exception, another exception occurred:
Sep 30 15:08:43 domain.tld jupyterhub[236644]: Traceback (most recent call last):
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/usr/lib/python3.11/pathlib.py", line 1117, in mkdir
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     os.mkdir(self, mode)
Sep 30 15:08:43 domain.tld jupyterhub[236644]: FileNotFoundError: [Errno 2] No such file or directory: '/home/orhtej22/.local/share/jupyter/runtime'
Sep 30 15:08:43 domain.tld jupyterhub[236644]: During handling of the above exception, another exception occurred:
Sep 30 15:08:43 domain.tld jupyterhub[236644]: Traceback (most recent call last):
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/usr/lib/python3.11/pathlib.py", line 1117, in mkdir
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     os.mkdir(self, mode)
Sep 30 15:08:43 domain.tld jupyterhub[236644]: FileNotFoundError: [Errno 2] No such file or directory: '/home/orhtej22/.local/share/jupyter'
Sep 30 15:08:43 domain.tld jupyterhub[236644]: During handling of the above exception, another exception occurred:
Sep 30 15:08:43 domain.tld jupyterhub[236644]: Traceback (most recent call last):
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/bin/jupyterhub-singleuser", line 8, in <module>
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     sys.exit(main())
Sep 30 15:08:43 domain.tld jupyterhub[236644]:              ^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_server/extension/application.py", line 616, in launch_instance
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     serverapp = cls.initialize_server(argv=args)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_server/extension/application.py", line 586, in initialize_server
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     serverapp.initialize(
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/config/application.py", line 118, in inner
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     return method(app, *args, **kwargs)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_server/serverapp.py", line 2755, in initialize
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     self.init_configurables()
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_server/serverapp.py", line 2065, in init_configurables
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     "connection_dir": self.runtime_dir,
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                       ^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 687, in __get__
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     return t.cast(G, self.get(obj, cls))  # the G should encode the Optional
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                      ^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 635, in get
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     default = obj.trait_defaults(self.name)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 1897, in trait_defaults
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self))
Sep 30 15:08:43 domain.tld jupyterhub[236644]:                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_core/application.py", line 111, in _runtime_dir_default
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     ensure_dir_exists(rd, mode=0o700)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyter_core/utils/__init__.py", line 26, in ensure_dir_exists
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     Path(path).mkdir(parents=True, mode=mode)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/usr/lib/python3.11/pathlib.py", line 1121, in mkdir
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     self.parent.mkdir(parents=True, exist_ok=True)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/usr/lib/python3.11/pathlib.py", line 1121, in mkdir
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     self.parent.mkdir(parents=True, exist_ok=True)
Sep 30 15:08:43 domain.tld jupyterhub[236644]:   File "/usr/lib/python3.11/pathlib.py", line 1117, in mkdir
Sep 30 15:08:43 domain.tld jupyterhub[236644]:     os.mkdir(self, mode)
Sep 30 15:08:43 domain.tld jupyterhub[236644]: PermissionError: [Errno 13] Permission denied: '/home/orhtej22/.local/share'
Sep 30 15:08:51 domain.tld jupyterhub[236425]: Task exception was never retrieved
Sep 30 15:08:51 domain.tld jupyterhub[236425]: future: <Task finished name='Task-180' coro=<BaseHandler.spawn_single_user() done, defined at /opt/jupyterlab/venv/lib/python3.11/site-packages/jupyterhub/handlers/base.py:1007> exception=HTTPError()>
Sep 30 15:08:51 domain.tld jupyterhub[236425]: Traceback (most recent call last):
Sep 30 15:08:51 domain.tld jupyterhub[236425]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyterhub/handlers/base.py", line 1215, in spawn_single_user
Sep 30 15:08:51 domain.tld jupyterhub[236425]:     await gen.with_timeout(
Sep 30 15:08:51 domain.tld jupyterhub[236425]: TimeoutError: Timeout
Sep 30 15:08:51 domain.tld jupyterhub[236425]: During handling of the above exception, another exception occurred:
Sep 30 15:08:51 domain.tld jupyterhub[236425]: Traceback (most recent call last):
Sep 30 15:08:51 domain.tld jupyterhub[236425]:   File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyterhub/handlers/base.py", line 1249, in spawn_single_user
Sep 30 15:08:51 domain.tld jupyterhub[236425]:     raise web.HTTPError(
Sep 30 15:08:51 domain.tld jupyterhub[236425]: tornado.web.HTTPError: HTTP 500: Internal Server Error (Spawner failed to start [status=1]. The logs for orhtej22 may contain details.)
Sep 30 15:10:53 domain.tld jupyterhub[236425]: [W 2024-09-30 15:10:53.111 JupyterHub user:1055] orhtej22's server never showed up at http://127.0.0.1:52135/jupyterlab/user/orhtej22/ after 120 seconds. Giving up.
Sep 30 15:10:53 domain.tld jupyterhub[236425]:     
Sep 30 15:10:53 domain.tld jupyterhub[236425]:     Common causes of this timeout, and debugging tips:
Sep 30 15:10:53 domain.tld jupyterhub[236425]:     
Sep 30 15:10:53 domain.tld jupyterhub[236425]:     1. The server didn't finish starting,
Sep 30 15:10:53 domain.tld jupyterhub[236425]:        or it crashed due to a configuration issue.
Sep 30 15:10:53 domain.tld jupyterhub[236425]:        Check the single-user server's logs for hints at what needs fixing.
Sep 30 15:10:53 domain.tld jupyterhub[236425]:     2. The server started, but is not accessible at the specified URL.
Sep 30 15:10:53 domain.tld jupyterhub[236425]:        This may be a configuration issue specific to your chosen Spawner.
Sep 30 15:10:53 domain.tld jupyterhub[236425]:        Check the single-user server logs and resource to make sure the URL
Sep 30 15:10:53 domain.tld jupyterhub[236425]:        is correct and accessible from the Hub.
Sep 30 15:10:53 domain.tld jupyterhub[236425]:     3. (unlikely) Everything is working, but the server took too long to respond.
Sep 30 15:10:53 domain.tld jupyterhub[236425]:        To fix: increase `Spawner.http_timeout` configuration
Sep 30 15:10:53 domain.tld jupyterhub[236425]:        to a number of seconds that is enough for servers to become responsive.
Sep 30 15:10:53 domain.tld jupyterhub[236425]:     
Sep 30 15:10:53 domain.tld jupyterhub[236425]: [E 2024-09-30 15:10:53.636 JupyterHub gen:629] Exception in Future <Task finished name='Task-181' coro=<BaseHandler.spawn_single_user.<locals>.finish_user_spawn() done, defined at /opt/jupyterlab/venv/lib/python3.11/site-packages/jupyterhub/handlers/base.py:1115> exception=TimeoutError("Server at http://127.0.0.1:52135/jupyterlab/user/orhtej22/api didn't respond in 120 seconds")> after timeout
Sep 30 15:10:53 domain.tld jupyterhub[236425]:     Traceback (most recent call last):
Sep 30 15:10:53 domain.tld jupyterhub[236425]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/tornado/gen.py", line 624, in error_callback
Sep 30 15:10:53 domain.tld jupyterhub[236425]:         future.result()
Sep 30 15:10:53 domain.tld jupyterhub[236425]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyterhub/handlers/base.py", line 1122, in finish_user_spawn
Sep 30 15:10:53 domain.tld jupyterhub[236425]:         await spawn_future
Sep 30 15:10:53 domain.tld jupyterhub[236425]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyterhub/user.py", line 1033, in spawn
Sep 30 15:10:53 domain.tld jupyterhub[236425]:         await self._wait_up(spawner)
Sep 30 15:10:53 domain.tld jupyterhub[236425]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyterhub/user.py", line 1076, in _wait_up
Sep 30 15:10:53 domain.tld jupyterhub[236425]:         raise e
Sep 30 15:10:53 domain.tld jupyterhub[236425]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyterhub/user.py", line 1047, in _wait_up
Sep 30 15:10:53 domain.tld jupyterhub[236425]:         resp = await server.wait_up(
Sep 30 15:10:53 domain.tld jupyterhub[236425]:                ^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:10:53 domain.tld jupyterhub[236425]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyterhub/utils.py", line 322, in wait_for_http_server
Sep 30 15:10:53 domain.tld jupyterhub[236425]:         re = await exponential_backoff(
Sep 30 15:10:53 domain.tld jupyterhub[236425]:              ^^^^^^^^^^^^^^^^^^^^^^^^^^
Sep 30 15:10:53 domain.tld jupyterhub[236425]:       File "/opt/jupyterlab/venv/lib/python3.11/site-packages/jupyterhub/utils.py", line 265, in exponential_backoff
Sep 30 15:10:53 domain.tld jupyterhub[236425]:         raise asyncio.TimeoutError(fail_message)
Sep 30 15:10:53 domain.tld jupyterhub[236425]:     TimeoutError: Server at http://127.0.0.1:52135/jupyterlab/user/orhtej22/api didn't respond in 120 seconds
Sep 30 15:10:53 domain.tld jupyterhub[236425]:     
Sep 30 15:10:53 domain.tld jupyterhub[236425]: [W 2024-09-30 15:10:53.637 JupyterHub users:782] Stream closed while handling /jupyterlab/hub/api/users/orhtej22/server/progress?_xsrf=MnwxOjB8MTA6MTcyNzcwMDU5M3w1Ol94c3JmfDg4Ok1ESmpNakZpTURJMk0yWmxOR0kxWkRobE0yUTBZbU0zWVRJMVpqVTNZV0U2TWpGaVpEZGlNemhsTURreU5HUmxPV0pqTXpRNE1qQXpZV001T1RJNU0yTT18MTdlNzk3YTRkYTE4OTRlNTdjNDM4MDZmZjU0NmQyNTFlNmRhMzcyZmIxNTc4MTlkOTc5ODUzMjE4ZjBhNjM0OA
Sep 30 15:10:53 domain.tld jupyterhub[236425]: [I 2024-09-30 15:10:53.638 JupyterHub log:192] 200 GET /jupyterlab/hub/api/users/orhtej22/server/progress?_xsrf=[secret] (orhtej22@111.222.111.111) 130642.07ms
Sep 30 15:11:15 domain.tld jupyterhub[236430]: 15:11:15.297 [ConfigProxy] info: 200 GET /api/routes
Sep 30 15:16:15 domain.tld jupyterhub[236430]: 15:16:15.297 [ConfigProxy] info: 200 GET /api/routes
Sep 30 15:21:05 domain.tld systemd[1]: Stopping jupyterlab.service - JupyterLab...
Sep 30 15:21:05 domain.tld jupyterhub[236425]: [C 2024-09-30 15:21:05.104 JupyterHub app:3822] Received signal SIGTERM, initiating shutdown...
Sep 30 15:21:05 domain.tld jupyterhub[236425]: [I 2024-09-30 15:21:05.104 JupyterHub app:3431] Cleaning up single-user servers...
Sep 30 15:21:05 domain.tld jupyterhub[236425]: [I 2024-09-30 15:21:05.104 JupyterHub proxy:865] Cleaning up proxy[236430]...
Sep 30 15:21:05 domain.tld jupyterhub[236425]: [I 2024-09-30 15:21:05.105 JupyterHub app:3463] ...done
Sep 30 15:21:05 domain.tld jupyterhub[236430]: 15:21:05.107 [ConfigProxy] warn: Terminated

I was thinking about something like for user in all_users usermod -a -G jupyterlab user to allow all access the app.

Thatā€™s for the admin user and the the others that must be added to the jupyterlab group

The user is in jupyterlab group and it does not work for him as the permission issue goes the other way around - jupyterlab user running Jupyterlab tries to access userā€™s home directory and has no access to it.

Mmhhh, I added another user and he had a spawn error, I will check the log when I get home but from my phone, it seems similar. So I went to jupiterlab_url/admin and started his server. He was able to get a full interface and create a notebook.

I couldnā€™t log with any user. This worked for me. Thanks @tituspijean

How many users do you have on it? Are they all able to login after the fix?

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.