Reading time: 2 min read

Resolving Traefik Errors for Sitecore Containers

Learn to understand and resolve the Traefik errors in Sitecore containers.

Portrait photo of Arsalaan Pathan, article author

Investigating Sitecore Container and Traefik "unhealthy" Errors

As a Sitecore developer we all might have come across errors for Sitecore containers, specifically for Traefik. The general understanding when encountering the "ERROR: for traefik Container {containerid} is unhealthy" message is that there is an issue with Sitecore CM, But what is the issue? This article tells you how figure it out.

How To Debug?

First and foremost, I used the “docker-compose up -d” command to run my containers. The result was below Traefik error.

Screenshot showing a terminal output but an error is displayed for the Traefik container

As you can see, the error description states that the traefik container is unhealthy but does not tell you what the actual error is. But we know it has something to do with the Sitecore CM. So, we need to inspect the CM container.

Run the “docker ps” command. You will see a list of all the container with their id’s. Get the id of Sitecore CM.

Screenshot of a terminal displaying the output of the docker ps command

Once you have copied the id of CM, run “docker inspect <>”. In this case it would be “docker inspect 17d4699e75fb”. You will see an object as the response. Scroll down to the bottom of the object and copy the IP Address.

Screenshot of a terminal showing the output of the docker inspect command

Open this “http://<>/healthz/ready” in the browser and you will see the error page.

Screenshot showing Server error in application page

Based on this error, I could figure out that there was a problem with one of the .config files that were deployed to the containers. The syntax for one of my configs was broken and because of that the rest of the configs didn’t load. Hence giving me this error. 

After fixing the syntax error and deploying it to docker, my containers were up and running.