SonarQube Docker Container will not start

The Problem

We run our SonarQube instance in a Docker container hosted in an Azure Web App Service. Today, with no notice, it failed. We did the obvious, just tried to restart it and the startup process failed.

Looking at the Azure Web App's Log Stream we could see the following error repeated on each restart attempt

 12023-09-27T15:30:00.797Z INFO - Starting multi-container app..
 22023-09-27T15:30:01.024Z INFO - Pulling image: sonarqube:10.1-developer
 32023-09-27T15:30:02.100Z INFO - 10.1-developer Pulling from library/sonarqube
 42023-09-27T15:30:02.291Z INFO - Digest: sha256:45e7cf02e037b00028d20556a91111f8ae8ae2b2803e516cb0665dd605a6d8b2
 52023-09-27T15:30:02.292Z INFO - Status: Image is up to date for sonarqube:10.1-developer
 62023-09-27T15:30:02.326Z INFO - Pull Image successful, Time taken: 0 Minutes and 1 Seconds
 72023-09-27T15:30:02.344Z INFO - Starting container for site
 82023-09-27T15:30:02.346Z INFO - docker run -d -p 8289:9000 --name bmsonarqubeprodwebsite_sonarqube_0_ec31111b -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=bmsonarqubeprodwebsite -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=bmsonarqubeprodwebsite.azurewebsites.net -e WEBSITE_INSTANCE_ID=6d27706a6b4eb56feec6ef57ab9b360923c5761cabb3fb52eb6fc5f4cdfbace3 -e WEBSITE_USE_DIAGNOSTIC_SERVER=False sonarqube:10.1-developer -Dsonar.search.javaAdditionalOpts=-Dnode.store.allow_mmap=false
 92023-09-27T15:30:02.347Z INFO - Logging is not enabled for this container.
10Please use https://aka.ms/linux-diagnostics to enable logging to see container logs here.
112023-09-27T15:31:09 No new trace in the past 1 min(s).
122023-09-27T15:32:09 No new trace in the past 2 min(s).
132023-09-27T15:33:09 No new trace in the past 3 min(s).
142023-09-27T15:33:52.465Z ERROR - multi-container unit was not started successfully

The Solution

Something in the back of my mind, from when we ran an on-premises SonarQube instance, made me think of a corrupt ElasticSearch index.

Using Azure Cloud Storage Explorer, I connected to the sonarqube-data file share and deleted the ES8 data folder

I then restarted the container and it started OK, recreating the ES8 folder and re-indexing the SonarQube content.

Thus far all appears to be OK.