Jupyter notebook 如何将Jupyterhub登录连接到衍生笔记本?

Jupyter notebook 如何将Jupyterhub登录连接到衍生笔记本?,jupyter-notebook,jupyter,webrequest,http-proxy,jupyterhub,Jupyter Notebook,Jupyter,Webrequest,Http Proxy,Jupyterhub,我正在努力使jupyterhub与CondorSpawner和LdapAuthentior合作,我正在努力解决以下问题: 我已经通过htcondor通过jupyter笔记本--port=53762生成了一个jupyter botebook,生成程序返回正确的ip和端口号。Jupyterhub开始连接后http://localhost:53762/tree/user/u52383/vjfjfj/to,但当服务器重定向到生成的笔记本时,它总是崩溃,出现以下404错误(最后2行): 根据jupyter

我正在努力使jupyterhub与CondorSpawner和LdapAuthentior合作,我正在努力解决以下问题:

我已经通过htcondor通过
jupyter笔记本--port=53762
生成了一个jupyter botebook,生成程序返回正确的ip和端口号。Jupyterhub开始连接后
http://localhost:53762/tree/user/u52383/vjfjfj/
to,但当服务器重定向到生成的笔记本时,它总是崩溃,出现以下404错误(最后2行):

根据jupyter笔记本,似乎有一些错误,因为它是在那个时候被请求的

[I 16:13:41.254 NotebookApp]302 GET/tree/user/u52383/vjfjj(127.0.0.1)0.00ms

错误本身听起来像是登录错误
/login?next=%2Ftree%2Fuser%2Fgabriel%2Fvjfjfj

有人知道这次事故的原因吗?或者以这种方式生成笔记本是否有错误

提前谢谢


Gabriel

我自己解决了这个问题,问题是jupyter笔记本中的安全块。 通过添加
--NotebookApp.token='
登录成功

请注意,这有点不安全,因为服务器上的每个人现在都可以访问笔记本

16:13:41.229 [ConfigProxy] info: Adding route /tree/user/gabriel/vjfjfj -> http://127.0.0.1:53762
16:13:41.229 [ConfigProxy] info: Route added /tree/user/gabriel/vjfjfj -> http://127.0.0.1:53762
16:13:41.230 [ConfigProxy] info: 201 POST /api/routes/tree/user/gabriel/vjfjfj
[I 2020-10-06 16:13:41.232 JupyterHub users:609] Server gabriel:vjfjfj is ready
[I 2020-10-06 16:13:41.232 JupyterHub log:174] 200 GET /tree/hub/api/users/gabriel/servers/vjfjfj/progress (u52383@::ffff:127.0.0.1) 10363.56ms
[I 2020-10-06 16:13:41.244 JupyterHub log:174] 302 GET /tree/hub/spawn-pending/gabriel/vjfjfj -> /tree/user/gabriel/vjfjfj (u52383@::ffff:127.0.0.1) 0.00ms
16:13:41.258 [ConfigProxy] error: 404 GET /login?next=%2Ftree%2Fuser%2Fgabriel%2Fvjfjfj
[I 2020-10-06 16:13:41.264 JupyterHub log:174] 200 GET /tree/hub/error/404?url=%2Flogin%3Fnext%3D%252Ftree%252Fuser%252Fgabriel%252Fvjfjfj (@127.0.0.1) 0.00ms