Docker Container is unhealthy - what to do?

One of my servers running NAV 2018 on Docker have started showing the navserver as UNHEALTHY. It is running, but it doesn’t allow me to connect to it.

Does anyone know how to “fix” this issue? Or who can explain exactly what might have happened?

Hi Erik,

I’ve read that docker, when starts a command mark itself as unhealthy if it tooks more than 5 seconds to return an ok status:

https://blog.couchbase.com/docker-health-check-keeping-containers-healthy/

Sorry, I can’t help you more, I don’t use docker to run NAV.

Hi Ponc,
Thanks, did already find this one using Google. [:)]
And although I (sort of) understand what this “unhealthy” mark is, then what I’m more interested in how to troubleshoot it. Freddy made a troubleshoot guide (blogs.msdn.microsoft.com/…/)) but that’s not helping me much further.

I can ping my container, but I cannot connect to it.

Sorry Erik… but I’ve no experience with docker and NAV. I use a docker at home, but I run other services on it (in a NAS) and I’ve never seen this problem before.

Usually due to long time to startup

restart the Container and perhaps add the parameter

–restart always

For instance portainer is started like this in my Hyper-V Windows Server 2016 Core:

docker run -d --restart always --network=tlan --ip 172.21.31.3 --name portainer -h portainer -v C:\ProgramData\Containers\Portainer:C:\Data portainer/portainer

Palle

Hi Palle,
Never found a solution to this, ended up removing the VM and created a new.

Do you know if we can add the --restart always to the parameters via NewNavContainer?

yes, you can add all kinds of docker parameters, in this case:

-additionalParameters @("–restart always")

Thanks, will add that to my script!