-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to connect to 127.0.0.1 port 8099: Connection refused #94
Comments
@jtpio, as long as the hub process doesn't end with "Traefik static configuration not available" this error only means that traefik needs more time to load its static config (traefik.toml in this case) and this is called here. We allow up to 30s by default(configurable) for traefik to load its static / dynamic config. During this time, we are pinging traefik to see if it's ready. Traefik was started by the hub in this case, right? |
Yes Traefik was started by the hub in this case (using this config: https://gist.github.com/jtpio/88d98746ed8577403d4e4497370c6950). Sometimes this message is printed only once and the hub continues as normal. But sometimes this is what happens: After the 30s, the hub process terminates. |
I don't seem to be able to reproduce this :( Is the traefik process running when this is happening? If yes, try setting |
It appears to be running: I'll check with an explicit config (username and password). But it looks like they are generated if not specified? traefik-proxy/jupyterhub_traefik_proxy/proxy.py Lines 74 to 103 in a968d81
|
Using this config: import os
from jupyterhub.auth import DummyAuthenticator
from jupyterhub.spawner import SimpleLocalProcessSpawner
from jupyterhub_traefik_proxy import TraefikTomlProxy
c = get_config() # noqa
c.JupyterHub.authenticator_class = DummyAuthenticator
c.JupyterHub.spawner_class = SimpleLocalProcessSpawner
c.JupyterHub.proxy_class = TraefikTomlProxy
c.JupyterHub.allow_named_servers = True
c.TraefikTomlProxy.traefik_api_username='hub'
c.TraefikTomlProxy.traefik_api_password='hub'
It really seems to be random. Most of the time the hub would start, print |
Thanks @GeorgianaElena for checking! Yes I get that one too, and in that case the auth works well. The 599 happens after several restarts (which maybe stops the hub too fast). |
Does this occur with the current dev version (install from |
Ok |
After installing Traefik with:
Using the following config:
And starting JupyterHub with:
The hub is sometimes unable to reach the Traefik API:
Restarting the hub process fixes it sometimes, which makes it look like some kind of race condition.
More complete example in this gist: https://gist.github.com/jtpio/88d98746ed8577403d4e4497370c6950
The text was updated successfully, but these errors were encountered: