From: John P. R. <ro...@cs...> - 2023-10-16 18:15:02
|
Hello Norbert: In message <DU2PR01MB855781D2792A3B884054D2A4E8D7A@DU2PR01MB8557.eurprd01.prod. exchangelabs.com>, SCHLEMMER Norbert writes: >Tested the Docker image under Debian and changed the web URL in >config.ini to the hostname of the VM. >After that the health check is broken, because of hardcoded URL >in script scripts/Docker/roundup_healthcheck Hmm, that's not expected. The heartbeat check uses the internal docker loopback intentionally to prevent the need to reach outside the container. >tracker=$(ps -ef | sed -ne '/roundup-server/s/^.*\s\(\w*\)=.*$/\1/p') >wget -q -O /dev/null --no-verbose http://localhost:8080/${tracker:-demo}/ The sed command parses the roundup-server command line and extracts the tracker name of the last tracker specified. Then it uses the tracker name to query localhost:8080 using http. That should work. It works with a tracker with an external web url I am running right now. The links on the returned page won't work as they embed the real web url not localhost:8080, but for heartbeat testing this should and does work for me. Can you: docker exec -it <container name> sh and run 'sh -xv roundup_healthcheck' and see what it looks like? The output from my check is: [...] + tracker=$(ps -ef | sed -ne '/roundup-server/s/^.*\s\(\w*\)=.*$/\1/p') + ps -ef + sed -ne '/roundup-server/s/^.*\s\(\w*\)=.*$/\1/p' + tracker=fleet wget -q -O /dev/null --no-verbose http://localhost:8080/${tracker:-demo}/ + wget -q -O /dev/null --no-verbose http://localhost:8080/fleet/ you should see something similar with the name of your tracker replacing fleet. >maybe there should be a environment parameter for health check like >HEALTHCHECK_URL=http://tvmtmcsdebiansrv.myDomain.com:8917/ The docker container (if running behind a proxy/ingress controller) may not have access to the external interface required to resolve/reach http://some.host.com/tracker. As a result I just connect on the internal docker loopback network. >Better the " [tracker] / web" parameter from config.ini can be used instead. Well there can be multiple trackers running, so which config.ini should be used? The heartbeat code only checks the last tracker configured, but this tells me if the server is hung at least. The heartbeat does provide a bit of check on database connectivity/availability if it shows an index screen. Have a great evening. -- -- rouilj John Rouillard =========================================================================== My employers don't acknowledge my existence much less my opinions. |