geospatialcomputing / gisandbox

GISandbox is a play place for researchers and educators to learn about, experiment with, and advance geographic information systems and science (GIS) and geospatial computing.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

InsecureRequestWarning infinite loop when running post_makefile_script #7

Closed davidedelvento closed 2 years ago

davidedelvento commented 2 years ago

Sometimes, upon running post_makefile_script the following infinite loop occurs (to be exact, that is triggered by tljh-config reload). Leaving the loop running or interrupting it with CTRL-C leaves JupyterHub in the previous, unusable, configuration, rather than applying the changes per post_makefile_script

/opt/tljh/hub/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,
/opt/tljh/hub/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,
/opt/tljh/hub/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,
/opt/tljh/hub/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,
/opt/tljh/hub/lib/python3.6/site-packages/urllib3/connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning,

This is the same issue as https://github.com/jupyterhub/the-littlest-jupyterhub/issues/454

davidedelvento commented 2 years ago

There are two separate issues here.

The first is something like a race condition or other issue that cause a loop of these warnings, which eventually clears. That is "normal" (should not, but we can live with it). In my experience it has always cleared in less than 30 seconds.

The second is instead a truly infinite. It is very annoying that this Exception (neither the logs) very strongly hide the root cause, but double checking everything should allow one to find the solution. Try from scratch with one option at the time until the offending one is found and look closely at it.

In my case, it was an incorrect value set in the field auth.NativeAuthenticator.secret_key