{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Trouble-Shooting Your Setup\n", "\n", "The code snippets and file system paths here fit an installation according to [1and1/debianized-jupyterhub](https://github.com/1and1/debianized-jupyterhub). If you installed in another way, you have to adapt accordingly." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Notebooks Don't Open, or Kernel Connection Fails\n", "\n", "First, look into the log for anything out of the ordinary, using `journalctl -eu jupyterhub`. Also try with an increased log level by setting `JUPYTERHUB_LOGLEVEL=DEBUG` in `/etc/default/jupyterhub`, and then restarting the hub service with `systemctl restart jupyterhub`.\n", "\n", "If you cannot see anything in the journal, the best route is to get more visibility and direct control by running a notebook server manually, in a shell prompt for your user account." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First, create a local configuration file.\n", "\n", " /opt/venvs/jupyterhub/bin/jupyter notebook --generate-config\n", " ${EDITOR:-vi} ~/.jupyter/jupyter_notebook_config.py" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Change these two settings:\n", "\n", " c.NotebookApp.allow_remote_access = True\n", " # Use empty string for bind-all, or your hostname\n", " c.NotebookApp.ip = 'localhost'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Then start a notebook server, its log goes into your console window.\n", "\n", " /opt/venvs/jupyterhub/bin/jupyter notebook .\n", " \n", "Watch the console for any errors or other diagnostics while you try to reproduce your problem.\n", "\n", "💡 Use `Ctrl-C` twice to stop the server after you're done." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finally, move your local configuration out of the way, since it might interfere with *JupyterHub* operations.\n", "\n", " ( cd ~/.jupyter && mv jupyter_notebook_config.py jupyter_notebook_config.py,debug )" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.7" } }, "nbformat": 4, "nbformat_minor": 2 }