We discussed a few Docker problems in the Troubleshooting Docker Container Problems article with it’s solutions. We will discuss several other sitecore docker issues in this article.
Problem 1: ERROR: for xxxxxx Cannot start service xxxxxx: hcsshim: CreateComputeSystem xxxxxxxxxxxxxxxxxxx. The requested resource is in use.
First Solution:
The very first solution for this issue is to restart the Hyper-V services. For this, click on the “Windows” icon on your system and search for “Services. It will appear as shown below. Click on it and search for the “Hyper-V Host Compute Service” service; once you find it, restart the services.
Second Solution:
If the above-mentioned solution does not work, then follow the steps below in the same order: –
Stop the SOLR services. Follow above First Solution, if any SOLR services is there then manually stop it.
Stop IIS (iisreset/STOP)
Restart Hyper -V
Execute the following commands using PowerShell
Stop-Service docker
Stop-service hns
Start-service hns
Start-Service docker
docker network prune
Now start the Docker container or execute the docker-compose up -d command.
Problem 2: Pull access denied for docker-examples-xp0-xconnect, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied.
Solution:
It is a very common issue that occurs when using Docker v2. We must exclude the setting, and it can be done from the Docker dashboard. Open the Docker dashboard and click on “Settings”. After that, select the “General” options from the left pane, and then we can see the “Use Docker Compose V2” option; simply uncheck it, and then click on the “Apply & Restart” button.
We can also disable “Use Docker Compose V2” by using the following CLI command.
docker-compose disable-v2
Problem 3: “mem_limit” issue.
Solution:
“mem_limit” issue related to the “Use Docker Compose V2” selection; if it is checked then Docker will throw a “mem_limit” error, so make sure to un-check or disable the “Use Docker Compose V2” selection from the Docker dashboard settings.
Even after performing the above step, if the “mem_limit” issue is still occurring, check the respective container that is giving this error, and then try modifying the “mem_limit” of that respective container from the “docker-compose.yml” file. Once it is done, restart Docker and its containers.
Problem 4: Docker DNS server of DNS is in wrong container issue.
Solution:
In order to resolve this issue, we must add the proper DNS configuration inside the “Docker Engine” JSON settings.
For this, open the Docker dashboard and click on “Settings”. After that, select the “Docker Engine” options from the left pane; after that, we will be able to see the DNS settings in JSON format. Add the below mentioned DNS settings inside it, and then click on the “Apply & Restart” button.
“dns”: [“8.8.8.8”],
Note: This DNS settings can vary from project to project, you can find these settings inside the respective Readme.md file or also you can ask for these settings to the respective project Solution Architect.
Problem 5: Solr container “container id” is unhealthy or solr-init container “container id” is unhealthy.
Solution:
This SOLR or SOLR-init container issue occurs when multiple SOLR services are being used.
In order to resolve this issue, check for the running SOLR services, and if any SOLR services are running, stop them OR we can also change the SOLR port number from the docker-compose.yml file.
Conclusion:
I tried to include the problem scenarios that we ran across while working with Docker. The possibility of new problem formulations exists, in that case, it is always advisable to review the docker logs.
I hope this blog post is helpful to you, as you explore more about Sitecore Docker.
Happy Learning!!
Leave A Comment