While I have previously written a blog where a few commands successfully resolved the problem, confronting this error while setting up a local XM cloud project was a challenging task for me this time around, as it could fail due to multiple reasons.
Today, I’m going to outline potential steps that could solve the problem if you’re also encountering the same issue and struggling to get the CM up.
Step1: Navigate to ‘Windows Defender Firewall with Advanced Security’ on your local computer.
Click on ‘Inbound Rules’ -> ‘New Rule’ -> and name it as ‘XM Cloud’
as per above screen shot allow all the ports required for solr and sql server
Step 2: I created another inbound rule for the CM container and added the CM container’s IPs, which are actually dynamic IPs. So, each time I was running the ‘up.ps1’ script, I would then run ‘docker inspect sxastarter-cm-1’ to get the IP address and add it into the created rule for XM Cloud.
Here’s the command to fetch the IP of the container.
docker inspect sxastarter-cm-1
Step 4: I installed SQL Server locally and verified that the login is working correctly and that services are up and running. (Note — this step isn’t necessary for Docker, but I still attempted it to verify whether SQL is functioning properly locally or not.)
Step5: Execute the following command, which will provide you with a detailed error message.
docker logs sxastarter-cm-1
The above error distinctly states that the SQL server is failing. Although there are solutions on the internet to check the ports, I attempted to do that as well. Since this was my first time setting up Docker on my system, a port conflict was not the reason.
Step 5: Navigate to the project root directory and open the ‘docker-compose.yml’ file.
Make the following changes as per the screenshot.
After making all these changes, I was finally able to see that all the containers are up and running.
Step 6: To resolve dotnet-tools.json error go to project root directory in my case path is as follows
C:\projects\JayaXMCloud\xmcloud-foundation-head-staging-main\.config\dotnet-tools.json
Go to this file in your project and right-click on it and select Properties
. At the bottom, check the checkbox where it says Unblock
.
The screenshot below showcases the state after unblocking the file.
And at last, after much struggle, I arrived at the most awaited screen.
Conclusion:
Even after running the following commands,
docker network prune
docker compose down
docker system prune
/up.ps1
if your issue isn’t resolved, consider revisiting the aforementioned steps to potentially save some time. In my case, this struggle was shared by my colleague, Jitender Monga, who was dealing with the same error. He managed to resolve it by following the steps outlined above.
Happy Sitecore XM Cloud Learning…