jupyterhub / the-littlest-jupyterhub

Simple JupyterHub distribution for 1-100 users on a single server
https://tljh.jupyter.org
BSD 3-Clause "New" or "Revised" License
1.04k stars 340 forks source link

tljh-config tries HTTPS against 127.0.0.1, generating spurious warnings #757

Open consideRatio opened 3 years ago

consideRatio commented 3 years ago

You can get these warnings when using tljh-config, and I figure it would be preferable if we can handle this better in some way. I'm not sure how.

$ sudo tljh-config reload

active
/opt/tljh/hub/lib/python3.8/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
/opt/tljh/hub/lib/python3.8/site-packages/urllib3/connectionpool.py:1013: InsecureRequestWarning: Unverified HTTPS request is being made to host '127.0.0.1'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
  warnings.warn(
ismael-benito commented 7 months ago

Hi there, I'm a teacher at Universitat Oberta de Catalunya. We have deployed a TLJH for a programme in our studies. After trying to update our initial configuration (a custom configuration to clone a repository each time a user spawns a new server if the repo is not there), with sudo tljh-config reload hub we got stuck in an infinite loop of these warnings, and the server no longer launches.

Also, systemctl status jupyterhub.service shows:

● jupyterhub.service
     Loaded: loaded (/etc/systemd/system/jupyterhub.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2024-03-18 17:10:41 UTC; 6s ago
    Process: 2266 ExecStart=/opt/tljh/hub/bin/python3 -m jupyterhub.app -f /opt/tljh/hub/lib/python3.8/site-packages/tljh/jupyterhub_config.py ->
   Main PID: 2266 (code=exited, status=1/FAILURE)

Mar 18 17:10:41 jupyter-ep systemd[1]: jupyterhub.service: Main process exited, code=exited, status=1/FAILURE
Mar 18 17:10:41 jupyter-ep systemd[1]: jupyterhub.service: Failed with result 'exit-code'.
Mar 18 17:10:41 jupyter-ep systemd[1]: jupyterhub.service: Scheduled restart job, restart counter is at 5.
Mar 18 17:10:41 jupyter-ep systemd[1]: Stopped jupyterhub.service.
Mar 18 17:10:41 jupyter-ep systemd[1]: jupyterhub.service: Start request repeated too quickly.
Mar 18 17:10:41 jupyter-ep systemd[1]: jupyterhub.service: Failed with result 'exit-code'.
Mar 18 17:10:41 jupyter-ep systemd[1]: Failed to start jupyterhub.service.

We are a couple of days ahead from needing this working, does anyone have any tip?

Thanks!

Ismael