Saturday 26 December 2020

Container is unhealthy docker

During execution of docker-compose, there may be chance of getting that container is unhealthy.

Let's say

ERROR: for traefik  Container "d96f2d2804ef" is unhealthy.


To know exact Issue behind this issue and about status, run below command in PowerShell by pasting above container id

docker inspect --format "{{json .State.Health }}" d96f2d2804ef

Will be output in json exact error details.

To know more about issue run another command as

docker exec -it d96 bash (first 3 character of above issued container)



Hope this will help

Cannot start service cm: container is marked for removal and cannot be started

During Sitecore instance setup with docker-compose command, sometimes you may face below issue

ERROR: Cannot start service cm: container is marked for removal and cannot be started

or 

ERROR: Cannot start service mssql encountered an error during hcsshim sitecore docker

or

ERROR: Cannot start service solr encountered an error during hcsshim::System::Start: failure in a Windows system call: The virtual machine or container exited unexpectedly.


To resolve above issues, please follow below steps

Try below commands as PowerShell script(admin mode)

docker-compose down

docker-compose up -d


If issue not resolved then please try below approach


copy container id, for which facing issue then run below commands in PowerShell as admin

net stop docker

now manually delete Folder with matched container id from C:\Programdata\docker\containers

net start docker



Hope this help.