We discussed a few Docker problems in the Troubleshooting Docker Container Problems article with its solutions. We will discuss several other Sitecore docker issues in this article.
Problem 1: Requested resource is in use
ERROR: for xxxxxx Cannot start service xxxxxx: hcsshim: CreateComputeSystem xxxxxxxxxxxxxxxxxxx. The Requested resource is in use.
The very first solution for this issue is to restart the Hyper-V services. For this, click on your system’s “Windows” icon 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.
If the solution mentioned above does not work, then follow the steps below in the same order: –
- Stop the SOLR services. Follow the above First Solution; if any SOLR services are 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: Requested access to the resource is denied
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.
It is a very common issue that occurs when using Docker v2. We must exclude the setting, which 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.
XM Cloud Roadmap Guide
XM Cloud is the future of enterprise content management offerings. The new sites, pages, and components tools offer an efficient content author experience that is not available with other CMS systems.
We can also disable “Use Docker Compose V2” using the CLI command.
Problem 3: “mem_limit” issue
“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 the wrong container issue
We must add the proper DNS configuration inside the “Docker Engine” JSON settings to resolve this issue.
For this, open the Docker dashboard and click on “Settings.” Add the below-mentioned DNS settings inside it, and then click on the “Apply & Restart” button. After that, select the “Docker Engine” option from the left pane; we can see the DNS settings in JSON format.
Note: These DNS settings can vary from project to project. You can find these settings inside the respective Readme. md file or also ask the project Solution Architect for these settings.
Problem 5: Solr container is unhealthy
Solr container “container id” is unhealthy or solr-init container “container id” is unhealthy.
This SOLR or SOLR-init container issue occurs when multiple SOLR services are used.
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.
I tried to include the problem scenarios we encountered 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.