Estou tendo um problema em que o jupyterhub não será iniciado, mas está causando um erro que não consigo depurar completamente.
Saída de journalctl --unit=jupyterhub
Aug 04 14:04:12 rkhost jupyterhub[7145]: [I 2016-08-04 14:04:12.594 JupyterHub app:622] Loading cookie_secret from /usr/local/etc/jupyterhub/jupyterhub_cookie_secret
Aug 04 14:04:12 rkhost jupyterhub[7145]: [E 2016-08-04 14:04:12.630 JupyterHub app:1296]
Aug 04 14:04:12 rkhost jupyterhub[7145]: Traceback (most recent call last):
Aug 04 14:04:12 rkhost jupyterhub[7145]: File "/usr/local/lib/python3.4/dist-packages/jupyterhub/app.py", line 1293, in launch_instance_async
Aug 04 14:04:12 rkhost jupyterhub[7145]: yield self.initialize(argv)
Aug 04 14:04:12 rkhost jupyterhub[7145]: File "/usr/local/lib/python3.4/dist-packages/jupyterhub/app.py", line 1102, in initialize
Aug 04 14:04:12 rkhost jupyterhub[7145]: yield self.init_users()
Aug 04 14:04:12 rkhost jupyterhub[7145]: File "/usr/local/lib/python3.4/dist-packages/jupyterhub/app.py", line 803, in init_users
Aug 04 14:04:12 rkhost jupyterhub[7145]: yield gen.maybe_future(self.authenticator.add_user(user))
Aug 04 14:04:12 rkhost jupyterhub[7145]: File "/usr/local/lib/python3.4/dist-packages/jupyterhub/auth.py", line 328, in add_user
Aug 04 14:04:12 rkhost jupyterhub[7145]: raise KeyError("User %s does not exist." % user.name)
Aug 04 14:04:12 rkhost jupyterhub[7145]: KeyError: 'User k does not exist.'
Aug 04 14:04:12 rkhost systemd[1]: jupyterhub.service: main process exited, code=exited, status=1/FAILURE
Aug 04 14:04:12 rkhost systemd[1]: Unit jupyterhub.service entered failed state.
Conteúdo de /usr/local/etc/jupyterhub/jupyterhub_config.py
c.Authenticator.admin_users = set(['rkern99']
c.Authenticator.whitelist = set(['rkern99'])
c.JupyterHub.admin_access = False
c.JupyterHub.answer_yes = False
c.JupyterHub.authenticator_class = 'jupyterhub.auth.PAMAuthenticator'
c.JupyterHub.base_url = '/'
c.JupyterHub.cleanup_proxy = True
c.JupyterHub.cleanup_servers = True
c.JupyterHub.config_file = '/usr/local/etc/jupyterhub/jupyterhub_config.py'
c.JupyterHub.confirm_no_ssl = True
c.JupyterHub.cookie_max_age_days = 14
c.JupyterHub.cookie_secret_file = 'jupyterhub_cookie_secret'
c.JupyterHub.data_files_path = '/usr/local/share/jupyter/hub'
c.JupyterHub.db_kwargs = {}
c.JupyterHub.hub_ip = '10.0.0.50'
c.JupyterHub.hub_port = 54321
c.JupyterHub.hub_prefix = '/hub/'
c.JupyterHub.ip = '10.0.0.50'
c.JupyterHub.port = 80
c.JupyterHub.proxy_api_ip = '10.0.0.50'
c.JupyterHub.proxy_api_port = 5432
c.JupyterHub.proxy_auth_token = '1941890e3eb3d835a754b0c09dc542f33b6616ede96376c9464770d7c205d970'
c.JupyterHub.proxy_cmd = ['configurable-http-proxy']
c.JupyterHub.spawner_class = 'sudospawner.SudoSpawner'
c.Spawner.notebook_dir = '~/Jupyter/'
Conteúdo de /lib/systemd/system/jupyterhub.service
[Unit]
Description=Jupyterhub
After=network-online.target
[Service]
User=jupyterhub
ExecStart=/usr/local/bin/jupyterhub --config=/usr/local/etc/jupyterhub/jupyterhub_config.py
WorkingDirectory=/usr/local/etc/jupyterhub
[Install]
WantedBy=multi-user.target
Verificação de usuário e grupo
$ grep jupyterhub /etc/passwd
jupyterhub:x:1001:1002::/var/jupyterhub:/usr/sbin/nologin
$ grep jupyterhub /etc/passwd
jupyterhub:x:1001:1002::/var/jupyterhub:/usr/sbin/nologin
Esta é uma nova instalação do Debian 8 Jessie e todos os pacotes do apt / pip / pip3 / npm estão atualizados.