19844: Use 127.0.0.1 instead of localhost for test servers.
authorTom Clegg <tom@curii.com>
Thu, 8 Dec 2022 19:06:15 +0000 (14:06 -0500)
committerTom Clegg <tom@curii.com>
Fri, 9 Dec 2022 16:35:19 +0000 (11:35 -0500)
Otherwise, depending on host config, nginx futilely tries ::1 first.

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>

sdk/python/tests/run_test_server.py

index 2bb20ca5daec35fe5348369522a106a249959cfe..33b9cdfdbc759a2f40c1c9a8180ba8434794384a 100644 (file)
@@ -635,8 +635,8 @@ def run_nginx():
         return
     stop_nginx()
     nginxconf = {}
-    nginxconf['UPSTREAMHOST'] = 'localhost'
-    nginxconf['LISTENHOST'] = 'localhost'
+    nginxconf['UPSTREAMHOST'] = '127.0.0.1'
+    nginxconf['LISTENHOST'] = '127.0.0.1'
     nginxconf['CONTROLLERPORT'] = internal_port_from_config("Controller")
     nginxconf['ARVADOS_API_HOST'] = "0.0.0.0:" + str(external_port_from_config("Controller"))
     nginxconf['CONTROLLERSSLPORT'] = external_port_from_config("Controller")