JupyterHub: `hub_connect_ip` is not resolved to correct IP
When running JupyterHub in local nomad installation using nomad admin run hub
, the API call in the Jupyter notebooks fails with the URL "http://localhost:8000/fairdi/nomad/latest/api/v1" due to the following connection error:
Error occurred while fetching the data: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /fairdi/nomad/latest/api/v1/entries/E-m5Wk_BdlVxrSMOhuOiPi4GHZSC/archive/query (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f92480ae4a0>: Failed to establish a new connection: [Errno 111] Connection refused'))
However, if I explicitly write the hub_connect_ip
in the URL, i.e. "http://172.17.0.1:8000/fairdi/nomad/latest/api/v1", the API call is successful.
Even if I add the hub_connect_ip: 172.17.0.1
under the north
sub-section of the nomad.yaml
, the localhost does not resolve the correct IP.
@aalbino and I briefly talked about the issue with @mscheidg.