|
21 | 21 |
|
22 | 22 | See: [The Littlest JupyterHub documentation](https://the-littlest-jupyterhub.readthedocs.io/en/latest/troubleshooting/logs.html). |
23 | 23 |
|
| 24 | +The main components to have a look at are: |
| 25 | + |
| 26 | +- the JupyterHub instance |
| 27 | +- Traefik (proxy) |
| 28 | +- the user server |
| 29 | + |
| 30 | +The logs for the hub and proxy can be inspected with: |
| 31 | + |
| 32 | +```bash |
| 33 | +sudo journalctl -u jupyterhub |
| 34 | +sudo journalctl -u traefik |
| 35 | +``` |
| 36 | + |
| 37 | +````{note} |
| 38 | +To follow the logs of the services and print more content on the screen, you can combine the |
| 39 | +`-f` (print the end and follow new logs) and `-n` (specify the number of lines to display) options: |
| 40 | +
|
| 41 | +```bash |
| 42 | +sudo journalctl -u jupyterhub -f -n 1000 |
| 43 | +``` |
| 44 | +```` |
| 45 | + |
| 46 | +If you want a clean restart of these services, run: |
| 47 | + |
| 48 | +```bash |
| 49 | +sudo systemctl restart jupyterhub |
| 50 | +sudo systemctl restart traefik |
| 51 | +``` |
| 52 | + |
| 53 | +In Plasma, the user servers run in Docker containers. To access the logs of a particular server, first |
| 54 | +identify the name of the user. |
| 55 | + |
| 56 | +Then run: |
| 57 | + |
| 58 | +```bash |
| 59 | +# list all the containers |
| 60 | +docker ps |
| 61 | +# use -f to follow the logs |
| 62 | +docker logs -f jupyter-username |
| 63 | +``` |
| 64 | + |
| 65 | +The logs will look like the following: |
| 66 | + |
| 67 | +```bash |
| 68 | +$ docker logs -f jupyter-alice |
| 69 | +[I 2022-03-09 08:42:40.322 SingleUserNotebookApp notebookapp:1593] Authentication of /metrics is OFF, since other authentication is disabled. |
| 70 | +[I 2022-03-09 08:42:40.856 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.9/site-packages/jupyterlab |
| 71 | +[I 2022-03-09 08:42:40.856 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab |
| 72 | +Patching auth into jupyter_server.base.handlers.JupyterHandler(jupyter_server.base.handlers.AuthenticatedHandler) -> JupyterHandler(jupyterhub.singleuser.mixins.HubAuthenticatedHandler, jupyter_server.base.handlers.AuthenticatedHandler) |
| 73 | +[I 2022-03-09 08:42:40.864 SingleUserNotebookApp mixins:576] Starting jupyterhub-singleuser server version 1.5.0 |
| 74 | +[I 2022-03-09 08:42:40.867 SingleUserNotebookApp notebookapp:2329] Serving notebooks from local directory: /home/jovyan |
| 75 | +[I 2022-03-09 08:42:40.867 SingleUserNotebookApp notebookapp:2329] Jupyter Notebook 6.4.8 is running at: |
| 76 | +[I 2022-03-09 08:42:40.867 SingleUserNotebookApp notebookapp:2329] http://4aace966ddb0:8888/user/alice/ |
| 77 | +[I 2022-03-09 08:42:40.867 SingleUserNotebookApp notebookapp:2330] Use Control-C to stop this server and shut dow |
| 78 | +``` |
| 79 | + |
| 80 | + |
24 | 81 | ## Why is my environment not building? |
25 | 82 |
|
26 | 83 | If for some reasons an environment does not appear after {ref}`environments-add`, it is possible that |
|
0 commit comments