【问题标题】:Ubuntu Jupyterhub: 500 POST Spawner failed to start [status=1]Ubuntu Jupyterhub:500 POST Spawner 无法启动 [status=1]
【发布时间】:2017-07-07 23:19:01
【问题描述】:

我正在尝试为多用户模式运行 jupyterhub

sudo jupyterhub

我能够使用我用来安装 jupyterhub 的用户成功登录。但是,当我尝试与其他用户一起登录时,我收到以下消息:

500:内部服务器错误 Spawner 无法启动 [status=1]

在终端中:

user@server:~$ sudo jupyterhub

[I 2017-02-18 11:47:53.663 JupyterHub app:733] 从 /home/user/jupyterhub_cookie_secret 加载 cookie_secret

[W 2017-02-18 11:47:53.691 JupyterHub 应用程序:372] 生成 CONFIGPROXY_AUTH_TOKEN。重新启动集线器将需要重新启动代理。 设置 CONFIGPROXY_AUTH_TOKEN env 或 JupyterHub.proxy_auth_token 配置以避免此消息。

[W 2017-02-18 11:47:53.695 JupyterHub app:874] 没有管理员用户,管理员界面将不可用。

[W 2017-02-18 11:47:53.695 JupyterHub app:875] 将任何管理用户添加到配置中的c.Authenticator.admin_users

[I 2017-02-18 11:47:53.695 JupyterHub app:902] 未使用白名单。将允许任何经过身份验证的用户。

[I 2017-02-18 11:47:53.714 JupyterHub app:1481] Hub API 监听 http://127.0.0.1:8081/hub/

[W 2017-02-18 11:47:53.716 JupyterHub app:1201] 在没有 SSL 的情况下运行 JupyterHub。我希望 SSL 终止发生在其他地方......

[I 2017-02-18 11:47:53.716 JupyterHub app:1203] 启动代理@http://*:8000/

11:47:54.569 - 信息:[ConfigProxy] 代理 http://*:8000 到 http://127.0.0.1:8081

11:47:54.574 - 信息:http://127.0.0.1:8001/api/routes 的 [ConfigProxy] 代理 API

[I 2017-02-18 11:47:54.597 JupyterHub app:1537] JupyterHub 现在运行在http://127.0.0.1:8000/

上次登录时间:2017 年 2 月 18 日星期六 00:26:34 CET

欢迎使用 Ubuntu 16.04.2 LTS(GNU/Linux 4.4.0-62-generic x86_64)

可以更新 1 个软件包。

0 个更新是安全更新。

[I 2017-02-18 11:48:10.990 JupyterHub spawner:785] 生成 jupyterhub-singleuser '--user="username"' '--cookie-name="jupyter-hub-token-username"' '--base-url="/user/username"' '--hub-host=""' '--hub-prefix="/hub/"' '--hub-api-url="http:// /127.0.0.1:8081/hub/api"' '--ip="127.0.0.1"' --port=52764

Traceback(最近一次调用最后一次):

文件“/usr/local/bin/jupyterhub-singleuser”,第 4 行,在 import('pkg_resources').require('jupyterhub==0.8.0.dev0') 文件中

“/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py”,第 3036 行,在 @_call_aside 中

文件“/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py”,第 3020 行,在 _call_aside f(*args, **kwargs)

文件“/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py”,第 3049 行,在 _initialize_master_working_set working_set = WorkingSet._build_master()

文件“/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py”,第 654 行,在 _build_master ws.require(需要)

文件“/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py”,第 968 行,需要 = self.resolve(parse_requirements(requirements))

文件“/usr/local/lib/python3.5/dist-packages/pkg_resources/init.py”,第 854 行,在解决 raise DistributionNotFound(req, requirers)

pkg_resources.DistributionNotFound:未找到“jupyterhub==0.8.0.dev0”分布,应用程序需要该分布

[W 2017-02-18 11:48:21.038 JupyterHub web:1545] 500 POST /hub/login?next= (::ffff:10.90.0.4): Spawner 无法启动 [status=1]

[E 2017-02-18 11:48:21.066 JupyterHub 日志:99] {

“内容长度”:“36”,

"Content-Type": "application/x-www-form-urlencoded",

“接受编码”:“gzip,放气”,

"Accept-Language": "en-US",

“Dnt”:“1”,

“主机”:“zeno.lehre.hwr-berlin.de:8000”,

“Cookie”:“_xsrf=2|1204c4dd|f391c8200e87548242350a9d25406790|1487111102”,

"X-Forwarded-Host": "server.com:8000",

“连接”:“关闭”,

"X-Forwarded-For": "::ffff:...",

"X-Forwarded-Proto": "http",

"接受": "text/html, application/xhtml+xml, /",

“缓存控制”:“无缓存”,

"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko",

“推荐人”:“http://server.com:8000/hub/login”,

“X-Forwarded-Port”:“8000”

}

[E 2017-02-18 11:48:21.066 JupyterHub log:100] 500 POST /hub/login?next= (@::ffff:... em>) 10283.44ms

我不知道这是否是问题的根源,但是,我有 jupyterhub 版本:0.7.0。我尝试使用以下方法将其更新到 0.8.0:

sudo pip install -U jupyterhub

但是,我得到了:

要求已经是最新的:****

我想了很久才在网上找到解决办法;不过我失败了。

有人可以帮我解决这个问题吗?

谢谢:)

【问题讨论】:

  • @minrk 您通常对此类问题有想法。你能帮帮我吗?
  • 这是否有效或者是全新安装?如果您运行:jupyterhub -f /path/to/jupyterhub_config.py --debug,您是否会收到相同的错误消息(您应该在 jupyter.conf 中禁用额外的日志)。运行 jupyterhub 的 srv 上是否已经存在用户的文件夹?你用的是哪个生成器?

标签: ubuntu jupyterhub


【解决方案1】:

你可以从源代码安装 jupyterhub 并看到这个日志:

“pkg_resources.DistributionNotFound: 'jupyterhub==0.8.0.dev0' 分发未找到,应用程序需要”

我遇到了同样的问题并且...这是由安装二进制 jupyterhub 并且不安装软件包引起的... 执行后

pip3 install -r dev-requiremetns.txt .

日志让我们通过“运行 setup.py develop for jupyterhub”来执行 setup.py,然后运行 ​​python setup.py buildpython setup.py install 然后中止,日志让我使用 pip install . 然后运行 ​​@987654325 @,然后jupyterhub就正常运行了。

以下命令:

cd /path to git code/jupyterhub/
python setup.py build
python setup.py install
pip3 install .

【讨论】:

    猜你喜欢
    • 2016-08-28
    • 2022-11-02
    • 2020-06-22
    • 2021-02-02
    • 2021-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-18
    相关资源
    最近更新 更多