Closed nsurleraux-railnova closed 1 year ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
The requests
redirection may to be due to this : https://github.com/jupyterhub/the-littlest-jupyterhub/blob/main/tljh/traefik.toml.tpl#L30
adding a configurable ip to tljh-config makes sense.
The redirect to 443 should be correct because :80 only exists as a redirect to :443 when https is enabled.
@minrk I wrote the code to do so. Could I assign you as a reviewer so you can check if it needs some polishing or anything else?
Bug description
We want to avoid exposing our JupyterHub server on the internet. To do so, we have a file
vpn_bind.toml
in thetraefik_config.d
directory :So the server is not listening anymore on the public interface but also on the loopback interface. This causes the
check_hub_ready
to break because127.0.0.1
is hardcoded there.Changing the address of the HTTP entrypoint to 127.0.0.1 only is not enough because requests tries to connect to
127.0.0.1:443
even if the port is 80 in the request (this is a mystery for me why it wants to try 443) :The only way to make everything work is by not binding to a specific interface and listen to all interfaces, which is not desirable in our case.
Expected behaviour
Either the
tljh-config reload hub
command should detect the binding interface of Traefik or the config should allow to change the full check address instead of just the port.Actual behaviour
The
tljh-config reload hub
command hangs because thecheck_ready_hub
function is called in a loop.How to reproduce
traefik_config.d
to override theaddress
of thehttp
andhttps
entrypoint so the traefik server is no longer listening on the loopback interface.tljh-config reload proxy
works.netstat -tupln | grep 443
to check that the Traefik server is bound to your specific interface.tljh-config reload hub
will hang.Your personal set up
tljh==0.2.0 on ubuntu 20.04
Full environment
``` # paste output of `pip freeze` or `conda list` here ```Configuration
```python # jupyterhub_config.py ```Logs
``` # paste relevant logs here, if any ```