fscrawler container is unhealthy (exit code 126)

757 Views Asked by At

I am receiving the following two errors when starting fscrawler from Docker shadiakiki1986/fscrawler:

ERROR: for fscrawler Container "XXX" is unhealthy.
ERROR: Encountered errors while bringing up the project.

The unhealthy container was inspected as follows:

docker ps # list containers
docker inspect --format='{{json .State.Health}}'

{"Status":"unhealthy","FailingStreak":3,"Log":[{"Start":"2018-11-24T14:29:57.31355179-06:00","End":"2018-11-24T14:29:57.395705557-06:00","ExitCode":126,"Output":"/usr/local/bin/docker-healthcheck: /usr/local/bin/docker-healthcheck: is a directory\n"},{"Start":"2018-11-24T14:30:27.408426387-06:00","End":"2018-11-24T14:30:27.48572124-06:00","ExitCode":126,"Output":"/usr/local/bin/docker-healthcheck: /usr/local/bin/docker-healthcheck: is a directory\n"},{"Start":"2018-11-24T14:30:57.497604654-06:00","End":"2018-11-24T14:30:57.575523908-06:00","ExitCode":126,"Output":"/usr/local/bin/docker-healthcheck: /usr/local/bin/docker-healthcheck: is a directory\n"}]}

1

There are 1 best solutions below

0
On

First, confirm that the docker-healthcheck script exists.

docker exec -it /bin/bash /usr/local/bin/docker-healthcheck

If the script does not exist, you may receive the following error:

/bin/bash: /usr/local/bin/docker-healthcheck: No such file or directory

Also, ensure vm.max_map_count is properly set (i.e., at least 262144).

sysctl vm.max_map_count

If not, add "vm.max_map_count=262144" to /etc/sysctl.conf

sudo nano /etc/sysctl.conf

Second, ensure host is properly set in ./docker-fscrawler/config/fscrawler_job/_settings.json

sudo nano /home/brian/Desktop/docker-fscrawler/config/fscrawler_job/_settings.json
"host" : "127.0.0.1”, → "host" : "elasticsearch1",