Jupyterhub kernel launch log

Hello,

I am running a jupyterhub (tljh, jupyter 4.4.7) on a Debian server and have problems with a specific kernel (scilab_kernel) which does not start, although it works fine with regular jupyter launched locally on the same server as a basic user. The kernelspec is present in /opt/tljh/user/share/jupyter/kernels/ and the Scilab kernel is seen as available in the launcher window, but the connection with the kernel always times out. How can I debug this ? I have tried to launch the hub manually, but I only see hub logs but nothing is shown for kernel launchs attemps.

I am just able to see (by looking at the process list) four attemps with a command like

/opt/tljh/user/bin/python -m scilab_kernel -f /home/jupyter-mottelet/.local/share/jupyter/runtime/kernel-26ff50ef-4fdc-4848-adf7-b363bcde7251.json

running for the hub user logged. How can I see why this command fails ?

Thanks for your help.

S.

Can you see the logs of the user session? That might have a useful error message. Should be something like journalctl -u jupyter-username

1 Like

Thanks for the tip, I see the following:

PermissionError: [Errno 13] Permission denied: '/home/jupyter-mottelet/.ipython/metakernel/history/scilab kernel>
sept. 10 17:49:38 daisy jupyterhub-singleuser[19122]: [I 2025-09-10 17:49:38.630 ServerApp] 200 GET /user/mottelet/api/metrics/v1?1757519378595 (mottelet@::1) 30.83ms
sept. 10 17:49:39 daisy jupyterhub-singleuser[19122]: [I 2025-09-10 17:49:39.214 ServerApp] 200 GET /user/mottelet/api/metrics/v1?1757519379177 (mottelet@::1) 32.47ms
sept. 10 17:49:39 daisy jupyterhub-singleuser[19122]: [I 2025-09-10 17:49:39.790 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (5/5), new random ports
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]: Traceback (most recent call last):
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "<frozen runpy>", line 198, in _run_module_as_main
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "<frozen runpy>", line 88, in _run_code
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/home/jupyter-mottelet/.local/lib/python3.12/site-packages/scilab_kernel/__main__.py", line 5, in <modul>
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     ScilabKernel.run_as_main()
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/home/jupyter-mottelet/.local/lib/python3.12/site-packages/metakernel/_metakernel.py", line 117, in run_>
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     MetaKernelApp.launch_instance(kernel_class=cls, *args, **kwargs)
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/home/jupyter-mottelet/.local/lib/python3.12/site-packages/metakernel/_metakernel.py", line 842, in laun>
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     super(MetaKernelApp, cls).launch_instance(*args, **kwargs)
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/opt/tljh/user/lib/python3.12/site-packages/traitlets/config/application.py", line 1074, in launch_insta>
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     app.initialize(argv)
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/opt/tljh/user/lib/python3.12/site-packages/traitlets/config/application.py", line 118, in inner
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     return method(app, *args, **kwargs)
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/opt/tljh/user/lib/python3.12/site-packages/ipykernel/kernelapp.py", line 707, in initialize
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     self.init_kernel()
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/opt/tljh/user/lib/python3.12/site-packages/ipykernel/kernelapp.py", line 555, in init_kernel
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     kernel = kernel_factory(
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:              ^^^^^^^^^^^^^^^
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/opt/tljh/user/lib/python3.12/site-packages/traitlets/config/configurable.py", line 583, in instance
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     inst = cls(*args, **kwargs)
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:            ^^^^^^^^^^^^^^^^^^^^
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/home/jupyter-mottelet/.local/lib/python3.12/site-packages/metakernel/process_metakernel.py", line 53, i>
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     MetaKernel.__init__(self, *args, **kwargs)
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/home/jupyter-mottelet/.local/lib/python3.12/site-packages/metakernel/_metakernel.py", line 154, in __in>
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     self.hist_file = get_history_file(self)
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:                      ^^^^^^^^^^^^^^^^^^^^^^
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:   File "/home/jupyter-mottelet/.local/lib/python3.12/site-packages/metakernel/config.py", line 20, in get_histor>
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:     with open(path, 'a'):
sept. 10 17:49:40 daisy jupyterhub-singleuser[19230]:          ^^^^^^^^^^^^^^^

As reported, there was a problem of ownership somewhere. I fixed it and now the server starts, thanks a lot !

S.