zipkin
zipkin copied to clipboard
Docker Healthcheck prolems when attached multiple network
When attached zipkin container to multiple network, the hostname -i
has multiple record like this X.X.X.X Y.Y.Y.Y
then cause error when exec the default docker-healthcheck command => Container exit.
"State": {
"Dead": false,
"Error": "",
"ExitCode": 143,
"FinishedAt": "2022-07-05T09:22:57.184213617Z",
"Health": {
"FailingStreak": 3,
"Log": [
{
"End": "2022-07-05T16:22:32.189200335+07:00",
"ExitCode": 1,
"Output": "Health check failed with code 1 response: wget: bad address '10.0.12.188 10.0.11.94:9411'\n",
"Start": "2022-07-05T16:22:32.053630546+07:00"
},
{
"End": "2022-07-05T16:22:37.369756784+07:00",
"ExitCode": 1,
"Output": "Health check failed with code 1 response: wget: bad address '10.0.12.188 10.0.11.94:9411'\n",
"Start": "2022-07-05T16:22:37.223304564+07:00"
},
{
"End": "2022-07-05T16:22:42.591913954+07:00",
"ExitCode": 1,
"Output": "Health check failed with code 1 response: wget: bad address '10.0.12.188 10.0.11.94:9411'\n",
"Start": "2022-07-05T16:22:42.452320527+07:00"
},
{
"End": "2022-07-05T16:22:47.758688361+07:00",
"ExitCode": 1,
"Output": "Health check failed with code 1 response: wget: bad address '10.0.12.188 10.0.11.94:9411'\n",
"Start": "2022-07-05T16:22:47.619973785+07:00"
},
{
"End": "2022-07-05T16:22:52.961102591+07:00",
"ExitCode": 1,
"Output": "Health check failed with code 1 response: wget: bad address '10.0.12.188 10.0.11.94:9411'\n",
"Start": "2022-07-05T16:22:52.826385741+07:00"
}
],
"Status": "unhealthy"
},
"OOMKilled": false,
"Paused": false,
"Pid": 0,
"Restarting": false,
"Running": false,
"StartedAt": "2022-07-05T09:22:11.549766995Z",
"Status": "exited"
}
Steps to Reproduce
Steps to reproduce the behavior: Multiple network for container or swarm stack, docker compose service
services:
zipkin:
image: openzipkin/zipkin:latest
pull_policy: always
networks:
- backend
- traefik-public
environment:
- HEALTHCHECK_IP=127.0.0.1
Expected Behaviour
- Please note in the docs
- Fix the default command
Temporary Solution
- Set environment
HEALTHCHECK_IP=127.0.0.1