File tree Expand file tree Collapse file tree
custom-domain/dstack-ingress/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change 404404
405405# Start evidence HTTP server if enabled
406406if [ " $EVIDENCE_SERVER " = " true" ]; then
407- mini_httpd -d /evidences -p " ${EVIDENCE_PORT} " -D -l /dev/stderr &
408- echo " Evidence server started on port ${EVIDENCE_PORT} (mini_httpd)"
407+ # Bind loopback explicitly, for two reasons.
408+ #
409+ # Correctness of the logs: left to itself mini_httpd binds [::]:port first,
410+ # and since the container has net.ipv6.bindv6only=0 that socket already
411+ # covers IPv4, so its second bind on 0.0.0.0:port fails with EADDRINUSE. It
412+ # logs "bind: Address already in use", keeps serving on the surviving
413+ # socket, and leaves a scary line in the log forever.
414+ #
415+ # Reach: the only consumer is haproxy's be_evidence backend, which connects
416+ # to 127.0.0.1:${EVIDENCE_PORT}. Listening on every interface additionally
417+ # exposed the evidence server to any other container on the compose
418+ # network at ingress:${EVIDENCE_PORT}, bypassing the proxy. Nothing
419+ # documented depends on that; evidence is meant to be read through
420+ # https://<domain>/evidences/ or the shared /evidences volume.
421+ mini_httpd -d /evidences -p " ${EVIDENCE_PORT} " -h 127.0.0.1 -D -l /dev/stderr &
422+ echo " Evidence server started on 127.0.0.1:${EVIDENCE_PORT} (mini_httpd)"
409423fi
410424
411425# One process owns certificates from here on: first pass (tls-alpn-01, where it
You can’t perform that action at this time.
0 commit comments