Issue Deploy SonarQube on App Service with Sql Azure

Hello,

I am trying to install SonarQube using a Docker Container on an App Service. If I start it without any specific configuration, it runs and works fine.

Now, I am trying to connect it to an external database (SQL Azure) by adding environment variables in the App Service under Environment Variables → App Settings.

I have added the following:

SONAR_JDBC_URL
jdbc:sqlserver://<server>.database.windows.net:1433;databaseName=<dbname>;encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;

SONAR_JDBC_USERNAME
<user>@<server>

SONAR_JDBC_PASSWORD
<password>

After setting these, the container attempts to start, but the logs end with the following error:

2025-02-21T08:59:47.274Z INFO  - Initiating warmup request to container sonarqube-anemone_0_8a8433e3 for site sonarqube-anemone
2025-02-21T09:00:18.294Z INFO  - Waiting for response to warmup request for container sonarqube-anemone_0_8a8433e3. Elapsed time = 31.021201 sec
2025-02-21T09:00:33.792Z INFO  - Waiting for response to warmup request for container sonarqube-anemone_0_8a8433e3. Elapsed time = 46.5190809 sec
2025-02-21T09:00:43.121Z ERROR - Container sonarqube-anemone_0_8a8433e3 for site sonarqube-anemone has exited, failing site start
2025-02-21T09:00:43.135Z ERROR - Container sonarqube-anemone_0_8a8433e3 didn't respond to HTTP pings on port: 9000, failing site start. See container logs for debugging.
2025-02-21T09:00:43.145Z INFO  - Stopping site sonarqube-anemone because it failed during startup.

Could you help me understand what might be causing this issue and how to resolve it?

Thank you in advance!

Best regards,
ronkpunk

Hey there.

Take a look at our docs here.

You cannot deploy SonarQube Server with Azure App Service because Azure App Service does not allow the configuration required on Linux to comply with Elasticsearch. Using Azure App Service may cause issues that will ultimately make SonarQube Server unreliable and unsuitable for enterprise production use.

Why does it work when you don’t set the DB configuration? This triggers Elasticsearch to perform certain “bootstrap checks”, which Azure App Service cannot accomodate.

I had already read that it wasn’t supported, but the fact is that without configuring the database, the web interface works correctly. However, when I specify the database details, it gets stuck in a boot loop and then stops.

Since without a database configuration, it starts in evaluation mode with no data persistence, I wanted to configure an external database to properly test the container.

I haven’t disabled any initial checks (even though I read that there is a variable to do so). Could it be that the ElasticSearch limit is not actually blocking the process?

Like I said:

So this behavior makes perfect sense (working without DB creds, not working with).

You can certainly give a try setting sonar.es.bootstrap.checks.disable=true, but we don’t recommend this for production workloads.

You’d have to check the logs.