2

我可以为单个用户成功运行 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 行,在 do data_str = 中)

如何包含和运行 sudospawner?

谢谢!

4

0 回答 0