不能用Sudospawner运行jupyterhub

时间:2016-05-04 22:23:00

标签: jupyter jupyter-notebook jupyterhub

我可以成功为单个用户运行jupyterhub,但是当我添加c.JupyterHub.spawner_class = 'sudospawner.SudoSpawner'时 它会抛出错误 -

[E 2016-05-04 22:14:28.633 JupyterHub user:237] Unhandled error starting rhea's server: substring not found
[E 2016-05-04 22:14:28.642 JupyterHub web:1524] Uncaught exception GET /hub/user/rhea (::ffff:10.ip.***)

    Traceback (most recent call last):
      File "/usr/local/lib64/python3.4/site-packages/tornado/web.py", line 1445, in _execute
        result = yield result
      File "/usr/local/lib/python3.4/site-packages/jupyterhub/handlers/base.py", line 493, in get
        yield self.spawn_single_user(current_user)
      File "/usr/local/lib/python3.4/site-packages/jupyterhub/handlers/base.py", line 312, in spawn_single_user
        yield gen.with_timeout(timedelta(seconds=self.slow_spawn_timeout), f)
      File "/usr/local/lib/python3.4/site-packages/jupyterhub/user.py", line 247, in spawn
        raise e
      File "/usr/local/lib/python3.4/site-packages/jupyterhub/user.py", line 228, in spawn
        yield gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
      File "/usr/local/lib/python3.4/site-packages/sudospawner/spawner.py", line 83, in start
        reply = yield self.do(action='spawn', args=self.get_args(), env=self.get_env())
      File "/usr/local/lib/python3.4/site-packages/sudospawner/spawner.py", line 72, in do
        data_str = data_str[data_str.index('{'):data_str.rindex('}')+1]
    ValueError: substring not found

我试图打印命令jupyterhub尝试执行 -

 ['sudo', '-u', 'rhea', '-nH', 'sudospawner']

datastr值为NULL(/usr/local/lib/python3.4/site-packages/sudospawner/spawner.py" ;,第72行,在做             data_str =)

如何包含和运行sudospawner?

谢谢!

0 个答案:

没有答案