JupyterHub 未连接到其 public 端口

JupyterHub does not connect to its public port

JupyterHub 无法在 public 端口 8000 上运行。它仅在端口 8081 上运行。 在我阅读的所有地方,每个人都在没有任何解决方案的情况下神奇地解决了他们的问题。

https://github.com/jupyterhub/jupyterhub/issues/742

jupyterhub_config.py

from oauthenticator.gitlab import GitLabOAuthenticator
c.JupyterHub.authenticator_class = GitLabOAuthenticator
c.GitLabOAuthenticator.oauth_callback_url = 'http://localhost:8000/hub/oauth_callback'
c.GitLabOAuthenticator.client_id =  '...'
c.GitLabOAuthenticator.client_secret = '...'
c.ConfigurableHTTPProxy.debug = True
c.JupyterHub.hub_ip = '127.0.0.1'
c.JupyterHub.hub_port = 8081
c.JupyterHub.ip = '127.0.0.1'
c.JupyterHub.port = 8000
c.JupyterHub.spawner_class = 'simplespawner.SimpleLocalProcessSpawner'
c.JupyterHub.ssl_cert = '/srv/jupyterhub/jupyterhub.crt'
c.JupyterHub.ssl_key = '/srv/jupyterhub/jupyterhub.key'

使用 GitLab 作为验证器,使用 simplespawner 作为生成器。不使用 Docker.

JupyterHub -V 0.9.4

可配置-HTTP-代理-V 4.0.1

运行 Ubuntu VirtualBox 上的 18.04。

显然,在 JupyterHub 之前,我必须在另一个终端 window 上 运行 以下行。

运行:

configurable-http-proxy --ip=127.0.0.1 --port=8000 --api-ip=127.0.0.1 --api-port=8001

之前:

jupyterhub -f /srv/jupyterhub/jupyterhub_config.py --debug