JupyterHub Spawn错误首先安装

时间:2019-06-04 09:56:14

标签: jupyter jupyterhub

我是这种事物的新手。在我的公司中,我们安装了装有python / anaconda的Unix远程服务器,并且我们希望从jupyter-lab切换到jupyterhub,以便能够让许多用户同时登录和使用jupyter。

我正在尝试使用我的帐户进行安装(taht不是admin,可以通过cyberark访问)。 我安装了conda jupyterhub,创建了配置文件,并设置了IP地址(JupyterHub.ip)和端口(JupyterHub.port),以便能够通过Web浏览器从用户客户端进行连接。 我已正确打开到此端口的防火墙路由。

尝试将身份验证器设置为虚拟,以便能够使用任何用户名和密码进行连接。

使用我的帐户运行

jupyterhub

这是输出

[pas.datascience_dev@devrmdatasci01 .jupyter]$ jupyterhub [I 2019-06-04 11:43:05.522 JupyterHub app:2120] Using Authenticator: jupyterhub.auth.DummyAuthenticator-1.0.0 [I 2019-06-04 11:43:05.522 JupyterHub app:2120] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-1.0.0 [I 2019-06-04 11:43:05.526 JupyterHub app:1257] Loading cookie_secret from /home/pas.datascience_dev/.jupyter/jupyterhub_cookie_secret [I 2019-06-04 11:43:05.557 JupyterHub proxy:460] Generating new CONFIGPROXY_AUTH_TOKEN [W 2019-06-04 11:43:05.559 JupyterHub app:1532] No admin users, admin interface will be unavailable. [W 2019-06-04 11:43:05.559 JupyterHub app:1534] Add any administrative users to c.Authenticator.admin_users in config. [I 2019-06-04 11:43:05.559 JupyterHub app:1563] Not using whitelist. Any authenticated user will be allowed. [I 2019-06-04 11:43:05.611 JupyterHub app:2337] Hub API listening on http://127.0.0.1:8081/hub/ [W 2019-06-04 11:43:05.613 JupyterHub proxy:642] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else... [I 2019-06-04 11:43:05.613 JupyterHub proxy:645] Starting proxy @ http://10.207.2.10:8689/ 11:43:06.217 - info: [ConfigProxy] Proxying http://10.207.2.10:8689 to (no default) 11:43:06.220 - info: [ConfigProxy] Proxy API at http://127.0.0.1:8001/api/routes [I 2019-06-04 11:43:06.684 JupyterHub proxy:319] Checking routes [I 2019-06-04 11:43:06.685 JupyterHub proxy:399] Adding default route for Hub: / => http://127.0.0.1:8081 [I 2019-06-04 11:43:06.688 JupyterHub app:2422] JupyterHub is now running at http://10.207.2.10:8689/

我将URL复制并粘贴到本地桌面浏览器中,并正确获取登录页面。 我插入用户:“ aaa”和pwd“ abc”(我使用的是虚拟身份验证,因此应该接受),但是我得到spqwn失败,并显示以下日志:

[I 2019-06-04 11:46:11.157 JupyterHub base:663] User logged in: aaa [I 2019-06-04 11:46:11.160 JupyterHub log:174] 302 POST /hub/login?next= -> /hub/spawn (aaa@127.0.0.1) 10.15ms [E 2019-06-04 11:46:11.243 JupyterHub user:626] Unhandled error starting aaa's server: 'getpwnam(): name not found: aaa' [I 2019-06-04 11:46:11.261 JupyterHub log:174] 302 GET /hub/spawn -> /hub/spawn-pending/aaa (aaa@127.0.0.1) 56.58ms ERROR:asyncio:Task exception was never retrieved future: <Task finished coro=<BaseHandler.spawn_single_user() done, defined at /data/pyconda36/lib/python3.6/site-packages/jupyterhub/handlers/base.py:697> exception=KeyError('getpwnam(): name not found: aaa',)> Traceback (most recent call last): File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 889, in spawn_single_user timedelta(seconds=self.slow_spawn_timeout), finish_spawn_future File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 807, in finish_user_spawn await spawn_future File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/user.py", line 642, in spawn raise e File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/user.py", line 546, in spawn url = await gen.with_timeout(timedelta(seconds=spawner.start_timeout), f) File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/spawner.py", line 1377, in start env = self.get_env() File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/spawner.py", line 1326, in get_env env = self.user_env(env) File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/spawner.py", line 1313, in user_env home = pwd.getpwnam(self.user.name).pw_dir KeyError: 'getpwnam(): name not found: aaa' [E 2019-06-04 11:46:11.344 JupyterHub pages:284] Previous spawn for aaa failed: 'getpwnam(): name not found: aaa' [E 2019-06-04 11:46:11.350 JupyterHub log:166] { "Cookie": "jupyterhub-hub-login=[secret]; user-id=[secret]; csrf-token=[secret]; _xsrf=[secret]; username-10-207-2-10-8687=[secret]; username-10-207-2-10-8686=[secret]; jupyterhub-session-id=[secret]", "Accept-Language": "it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7", "Accept-Encoding": "gzip, deflate", "Referer": "http://10.207.2.10:8689/hub/login", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36", "Upgrade-Insecure-Requests": "1", "Cache-Control": "max-age=0", "Connection": "close", "Host": "10.207.2.10:8689" } [E 2019-06-04 11:46:11.350 JupyterHub log:174] 500 GET /hub/spawn-pending/aaa (aaa@127.0.0.1) 12.16ms

如果我尝试使用从其启动jupyterhub的用户名登录,因此用户=“ pas.datascience_dev”并使用随机密码,则进入充电条,但生成失败并出现此错误

Spawn failed: Server at http://127.0.0.1:55345/user/pas.datascience_dev/ didn't respond in 30 seconds

和此日志

[I 2019-06-04 11:47:16.755 JupyterHub base:663] User logged in: pas.datascience_dev
[I 2019-06-04 11:47:16.757 JupyterHub log:174] 302 POST /hub/login?next= -> /hub/spawn (pas.datascience_dev@127.0.0.1) 8.06ms
[I 2019-06-04 11:47:16.822 JupyterHub spawner:1387] Spawning jupyterhub-singleuser --port=55345
Failed to set groups [Errno 1] Operation not permitted
Traceback (most recent call last):
File "/data/pyconda36/bin/jupyterhub-singleuser", line 8, in 
from jupyterhub.singleuser import main
File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/singleuser.py", line 41, in 
from notebook.notebookapp import (
File "/data/pyconda36/lib/python3.6/site-packages/notebook/notebookapp.py", line 40, in 
ioloop.install()
File "/data/pyconda36/lib/python3.6/site-packages/zmq/eventloop/ioloop.py", line 210, in install
assert (not ioloop.IOLoop.initialized()) or 
AttributeError: type object 'IOLoop' has no attribute 'initialized'
[I 2019-06-04 11:47:17.801 JupyterHub log:174] 302 GET /hub/spawn -> /hub/spawn-pending/pas.datascience_dev (pas.datascience_dev@127.0.0.1) 1008.91ms
ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<BaseHandler.spawn_single_user() done, defined at /data/pyconda36/lib/python3.6/site-packages/jupyterhub/handlers/base.py:697> exception=HTTPError()>
Traceback (most recent call last):
File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 889, in spawn_single_user
timedelta(seconds=self.slow_spawn_timeout), finish_spawn_future
tornado.util.TimeoutError: Timeout

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 922, in spawn_single_user
% (status, spawner._log_name),
tornado.web.HTTPError: HTTP 500: Internal Server Error (Spawner failed to start [status=1]. The logs for pas.datascience_dev may contain details.)
[W 2019-06-04 11:47:48.040 JupyterHub user:678] pas.datascience_dev's server never showed up at http://127.0.0.1:55345/user/pas.datascience_dev/ after 30 seconds. Giving up
[E 2019-06-04 11:47:48.055 JupyterHub gen:974] Exception in Future <Task finished coro=<BaseHandler.spawn_single_user..finish_user_spawn() done, defined at /data/pyconda36/lib/python3.6/site-packages/jupyterhub/handlers/base.py:800> exception=TimeoutError("Server at http://127.0.0.1:55345/user/pas.datascience_dev/ didn't respond in 30 seconds",)> after timeout
Traceback (most recent call last):
File "/data/pyconda36/lib/python3.6/site-packages/tornado/gen.py", line 970, in error_callback
future.result()
File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/handlers/base.py", line 807, in finish_user_spawn
await spawn_future
File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/user.py", line 654, in spawn
await self._wait_up(spawner)
File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/user.py", line 701, in _wait_up
raise e
File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/user.py", line 669, in _wait_up
http=True, timeout=spawner.http_timeout, ssl_context=ssl_context
File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/utils.py", line 234, in wait_for_http_server
timeout=timeout,
File "/data/pyconda36/lib/python3.6/site-packages/jupyterhub/utils.py", line 177, in exponential_backoff
raise TimeoutError(fail_message)
TimeoutError: Server at http://127.0.0.1:55345/user/pas.datascience_dev/ didn't respond in 30 seconds

[I 2019-06-04 11:47:48.058 JupyterHub log:174] 200 GET /hub/api/users/pas.datascience_dev/server/progress (pas.datascience_dev@127.0.0.1) 30176.86ms

我缺少什么或做错了什么?

在我可以使用它之后,我会将整个软件包交给系统管理员,并让他们以root用户身份安装,以便能够管理多个用户

1 个答案:

答案 0 :(得分:0)

使用:

pip install notebook

或:

conda install notebook