Are you facing SQL and SOLR Errors when trying to install Sitecore 10.3 with Docker ?

Weird error when trying to install Sitecore 10.3 with Docker

Introduction

I was trying to install Sitecore 10.3 with Docker containers in my local machine when I found some peculiar errors. The errors were about starting the mssql and solr services. The reason I am writing this post is so it can help others that are having the same issue. Let's start with the baiscs. I was trying to install Sitecore 10.3 with the following link: Install Sitecore 10.3 with Docker.

The Problem

Everthing was running smoothly on the installation. The problem starts a few minutes after I run the command:
 docker-compose up -d   
When I run the above command everyhting seemed  to be in order and in place. So I said, yeah let's continue and Sitecore 10.3 will be installed within a few minutes. I went for a break and left my laptop running the compose script for about 20min, and when I returned excited to start using the new Sitecore platform I found a surprise. The surprise was that I found errors on the machine. These were the errors:



As you can see in the image above, it says that the mssql service and solr service could not start. Naturally, I googled searched the problem for about 4 hours and found out that this problem occurs when your virtualization was not enabled. So I followed the steps in order to enable virtualization and tried all the steps presented here: Enable Windows 10 Virtualization. I also tried enabling the virtualization at the BIOS, but to my surprise everything was enabled
I had no other choice than restarting my computer thinking it was a problem that the computer did not run correctly. So I restarted my computer and tried to open the docker containers once again. This time, the Docker containers displayed the following error: 


This is when I realized the problem did not have to do with the Sitecore Docker Containers, nor with the installation. It had to do with my machine and somehow the virtualization was not enabled; thus, it could not start the solr and mssql services. 
What I did was uninstall Docker and reinstall everything again but this time selecting the use WSL2 instead of Hyper V (recommended) option as shown in the figure below.  


 
This time, I got the same error on Docker, the one that stated that  the Hardware assited virtualization virtualazitaion was not enabled. Which again by surprised I saw everything enabled. 

The Solution

Finally, after looking how to enable virtualization; eventhough it was enabled in the BIOS, the Windows Fetaures dialogue box, and also running the following command: 
  Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All  
with no success, the issue persisted. 
I remebered that one time in my computer I had to shut off virtualization in order to create a VM with Virtual Box. Not quite sure what the command was but it had something to do with the bcedit. So I searched the command of the bcedit in order to reactivate virtualization and run this command on my machine: 
  bcdedit /set hypervisorlaunchtype auto  
After I ran that command, and restarted my computer the error from the Docker Containers disappeared. I followed the steps on installing Sitecore one more time and my local machine was able to install Sitecore 10.3 with Docker successfully. 

I stood up and executed my victory dance !🥳🥳


 

Comments

Popular posts from this blog

Guide to Fixing the 'SSC API Key Required' Error while Testing GraphQL Queries from Sitecore 10.3 Using Postman

Simulating Success: How to Test iPhone Apps in Xcode Simulator with Sitecore 10.3 Docker Containers

Troubleshooting Guide: Resolving the 'Cannot Query Field "id" on "ItemSearchResults"' Issue in a JSS App with Sitecore 10.3"