Como executar o jupyterhub no servidor ubuntu (AWS)

0

Estou tentando executar o jupyterhub com vários usuários da AWS, mas recebo um erro.

Eu uso o comando ubuntu@ip-172-31-23-74:~$ sudo /home/ubuntu/.local/bin/jupyterhub

e este é o erro que recebo quando tento logar com um dos usuários.

[I 2017-10-16 20:57:40.065 JupyterHub spawner:978] Spawning jupyterhub-singleuser --port=35198
[E 2017-10-16 20:57:40.071 JupyterHub user:427] Unhandled error starting luca's server: [Errno 2] No such file or directory: 'jupyterhub-singleuser'
[E 2017-10-16 20:57:40.085 JupyterHub web:1590] Uncaught exception POST /hub/login?next= (::ffff:83.136.45.119)
    HTTPServerRequest(protocol='http', host='18.221.229.159:8000', method='POST', uri='/hub/login?next=', version='HTTP/1.1', remote_ip='::ffff:83.136.45.119', headers={'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8', 'Cache-Control': 'max-age=0', 'Origin': 'http://18.221.229.159:8000', 'X-Forwarded-Host': '18.221.229.159:8000', 'X-Forwarded-Proto': 'http', 'X-Forwarded-Port': '8000', 'Content-Type': 'application/x-www-form-urlencoded', 'Accept-Encoding': 'gzip, deflate', 'Host': '18.221.229.159:8000', 'Referer': 'http://18.221.229.159:8000/hub/login', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36', 'Upgrade-Insecure-Requests': '1', 'Content-Length': '29', 'X-Forwarded-For': '::ffff:83.136.45.119', 'Accept-Language': 'en-US,en;q=0.8,it;q=0.6,es;q=0.4', 'Connection': 'close'})
    Traceback (most recent call last):
      File "/home/ubuntu/.local/lib/python3.5/site-packages/tornado/web.py", line 1511, in _execute
        result = yield result
      File "/home/ubuntu/.local/lib/python3.5/site-packages/jupyterhub/handlers/login.py", line 93, in post
        yield self.spawn_single_user(user)
      File "/home/ubuntu/.local/lib/python3.5/site-packages/jupyterhub/handlers/base.py", line 474, in spawn_single_user
        yield gen.with_timeout(timedelta(seconds=self.slow_spawn_timeout), finish_spawn_future)
      File "/home/ubuntu/.local/lib/python3.5/site-packages/jupyterhub/handlers/base.py", line 444, in finish_user_spawn
        yield spawn_future
      File "/home/ubuntu/.local/lib/python3.5/site-packages/jupyterhub/user.py", line 439, in spawn
        raise e
      File "/home/ubuntu/.local/lib/python3.5/site-packages/jupyterhub/user.py", line 378, in spawn
        ip_port = yield gen.with_timeout(timedelta(seconds=spawner.start_timeout), f)
      File "/usr/lib/python3.5/types.py", line 243, in wrapped
        coro = func(*args, **kwargs)
      File "/home/ubuntu/.local/lib/python3.5/site-packages/jupyterhub/spawner.py", line 988, in start
        self.proc = Popen(cmd, **popen_kwargs)
      File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
        restore_signals, start_new_session)
      File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
        raise child_exception_type(errno_num, err_msg)
    FileNotFoundError: [Errno 2] No such file or directory: 'jupyterhub-singleuser'

[E 2017-10-16 20:57:40.118 JupyterHub log:114] {
      "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
      "Cache-Control": "max-age=0",
      "Origin": "http://18.221.229.159:8000",
      "X-Forwarded-Host": "18.221.229.159:8000",
      "X-Forwarded-Proto": "http",
      "X-Forwarded-Port": "8000",
      "Content-Type": "application/x-www-form-urlencoded",
      "Accept-Encoding": "gzip, deflate",
      "Host": "18.221.229.159:8000",
      "Referer": "http://18.221.229.159:8000/hub/login",
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36",
      "Upgrade-Insecure-Requests": "1",
      "Content-Length": "29",
      "X-Forwarded-For": "::ffff:83.136.45.119",
      "Accept-Language": "en-US,en;q=0.8,it;q=0.6,es;q=0.4",
      "Connection": "close"
    }
[E 2017-10-16 20:57:40.120 JupyterHub log:122] 500 POST /hub/login?next= (@::ffff:83.136.45.119) 165.50ms

Alguém pode me ajudar?

    
por Donbeo 16.10.2017 / 22:59

1 resposta

1

Existem dois problemas relacionados no Github ( aqui e aqui ). Aparentemente, você deve configurar o caminho completo em jupyterhub_config.py usando

c.Spawner.cmd = ['fullpath-to/jupyterhub-singleuser']
    
por Jaime 19.10.2017 / 12:45