-
Notifications
You must be signed in to change notification settings - Fork 36
Healthcheck fails behind proxy #109
Copy link
Copy link
Closed
Description
It appears that the healthcheck (like proposed in the ckan-docker docker-compose.yml) fails if datapusher is running behind a proxy. After some resarch it turned out that the preinstalled wget command differs from the official wget apk package.
The preinstalled version ignores the proxy environment variables and resolves localhost via ipv6.
This can be reproduced in the rootshell of the container:
/srv/app # wget -qO /dev/null http://localhost:8800
wget: server returned error: HTTP/1.1 503 Service Unavailable
/srv/app # echo $?
1
/srv/app # wget --proxy off -qO /dev/null http://datapusher:8800
/srv/app # echo $?
0
/srv/app # apk version wget
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/main: No such file or directory
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.14/community: No such file or directory
Installed: Available:
/srv/app # apk add wget
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/3) Installing libunistring (0.9.10-r1)
(2/3) Installing libidn2 (2.3.1-r0)
(3/3) Installing wget (1.21.1-r1)
Executing busybox-1.33.1-r8.trigger
OK: 127 MiB in 75 packages
/srv/app # apk version wget
Installed: Available:
wget-1.21.1-r1 = 1.21.1-r1
/srv/app # wget -qO /dev/null http://localhost:8800
/srv/app # echo $?
0
/srv/app #
without the proxy --off parameter it calls datapusher via the proxy but ignores the $no_proxy variable.
I am not sure where to put this, either here or in the ckan-docker repo or even at alpine linux.
Should I create a pull request with wget in the list of installed packages in the dockerfile?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels