我有一个问题,jupyterhub不会真正开始,但它吐出一个错误,我无法完全debugging。
从journalctl --unit=jupyterhub输出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.
/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/'
/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
用户和组的validation
$ 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
这是Debian 8 Jessie的全新安装,所有安装的apt / pip / pip3 / npm软件包都是最新的。
由于我自己解决了这个问题,结果发现/usr/local/etc/jupyterhub/jupyterhub.sqlite 。 删除文件解决了这个问题,但我不知道为什么。 我怀疑数据库创build时加载一个糟糕的先前的configuration,不知何故不会覆盖。