-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from jtpio/docs-logs
Consolidate the logs section in the documentation
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,63 @@ ssh [email protected] | |
|
||
See: [The Littlest JupyterHub documentation](https://the-littlest-jupyterhub.readthedocs.io/en/latest/troubleshooting/logs.html). | ||
|
||
The main components to have a look at are: | ||
|
||
- the JupyterHub instance | ||
- Traefik (proxy) | ||
- the user server | ||
|
||
The logs for the hub and proxy can be inspected with: | ||
|
||
```bash | ||
sudo journalctl -u jupyterhub | ||
sudo journalctl -u traefik | ||
``` | ||
|
||
````{note} | ||
To follow the logs of the services and print more content on the screen, you can combine the | ||
`-f` (print the end and follow new logs) and `-n` (specify the number of lines to display) options: | ||
```bash | ||
sudo journalctl -u jupyterhub -f -n 1000 | ||
``` | ||
```` | ||
|
||
If you want a clean restart of these services, run: | ||
|
||
```bash | ||
sudo systemctl restart jupyterhub | ||
sudo systemctl restart traefik | ||
``` | ||
|
||
In Plasma, the user servers run in Docker containers. To access the logs of a particular server, first | ||
identify the name of the user. | ||
|
||
Then run: | ||
|
||
```bash | ||
# list all the containers | ||
docker ps | ||
# use -f to follow the logs | ||
docker logs -f jupyter-username | ||
``` | ||
|
||
The logs will look like the following: | ||
|
||
```bash | ||
$ docker logs -f jupyter-alice | ||
[I 2022-03-09 08:42:40.322 SingleUserNotebookApp notebookapp:1593] Authentication of /metrics is OFF, since other authentication is disabled. | ||
[I 2022-03-09 08:42:40.856 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.9/site-packages/jupyterlab | ||
[I 2022-03-09 08:42:40.856 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab | ||
Patching auth into jupyter_server.base.handlers.JupyterHandler(jupyter_server.base.handlers.AuthenticatedHandler) -> JupyterHandler(jupyterhub.singleuser.mixins.HubAuthenticatedHandler, jupyter_server.base.handlers.AuthenticatedHandler) | ||
[I 2022-03-09 08:42:40.864 SingleUserNotebookApp mixins:576] Starting jupyterhub-singleuser server version 1.5.0 | ||
[I 2022-03-09 08:42:40.867 SingleUserNotebookApp notebookapp:2329] Serving notebooks from local directory: /home/jovyan | ||
[I 2022-03-09 08:42:40.867 SingleUserNotebookApp notebookapp:2329] Jupyter Notebook 6.4.8 is running at: | ||
[I 2022-03-09 08:42:40.867 SingleUserNotebookApp notebookapp:2329] http://4aace966ddb0:8888/user/alice/ | ||
[I 2022-03-09 08:42:40.867 SingleUserNotebookApp notebookapp:2330] Use Control-C to stop this server and shut dow | ||
``` | ||
|
||
|
||
## Why is my environment not building? | ||
|
||
If for some reasons an environment does not appear after {ref}`environments-add`, it is possible that | ||
|