Setting up Sonarqube DR

I’m setting up a DR (disaster recovery) in my Sonarqube application and the database that it’s configured to consume is from a Postgres Replica DB (a replica from the main DB).

The way Postgres replica DB works is that the DB being replicated is in read only mode and you’ll be able to write it on to it once you tell the main DB to stop it’s replication that’s how i understood it.

Now, that I’m done setting up Sonarqube on another region in Azure and wanted to test if it works. I started the sonarqube services but it fails in the ES.

2023.01.12 09:01:37 INFO es[o.e.c.s.ClusterApplierService] master node changed {previous , current [{sonarqube}{p9kc9zNsRwKxCvFHI4BX2w}{Fg-2EXkRSNuutGGGPK2Vpw}{}{}{cdfhimrsw}]}, term: 1, version: 1, reason: Publication{term=1, version=1}
2023.01.12 09:01:37 INFO es[o.e.h.AbstractHttpServerTransport] publish_address {}, bound_addresses {}
2023.01.12 09:01:37 INFO es[o.e.n.Node] started
2023.01.12 09:01:37 INFO es[o.e.g.GatewayService] recovered [0] indices into cluster_state
2023.01.12 09:01:43 INFO es[o.e.n.Node] stopping …
2023.01.12 09:01:43 INFO es[o.e.n.Node] stopped
2023.01.12 09:01:43 INFO es[o.e.n.Node] closing …
2023.01.12 09:01:43 INFO es[o.e.n.Node] closed

2023.01.12 09:01:31 INFO app[] Elasticsearch listening on [HTTP:, TCP:]
2023.01.12 09:01:31 INFO app[o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/jsso/sonarqube-]: /jsso/sonarqube-
2023.01.12 09:01:31 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2023.01.12 09:01:37 INFO app[o.s.a.SchedulerImpl] Process[es] is up
2023.01.12 09:01:37 INFO app[o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/jsso/sonarqube-]: /usr/lib/jvm/java-11-openjdk- -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/ --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/ -Dcom.redhat.fips=false -Xmx2G -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application- /jsso/sonarqube-
2023.01.12 09:01:43 INFO app[o.s.a.SchedulerImpl] Process[Web Server] is stopped
2023.01.12 09:01:43 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2023.01.12 09:01:43 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2023.01.12 09:01:43 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
← Wrapper Stopped

My question is, do I need to make the DB in read write mode before I can see the successful start up of Sonarqube? Currently it’s pointed to the Postgres replicated DB wherein it’s set to read only. Thanks!

Hey there

It looks like the web process is what stops first – is there any information in the web.log file about why it stopped?

there’s nothing that I can see why it stopped. Is there an option where I can turn on more details when Sonarqube starts to write log files?

You can adjust the log level in your conf/ file (or via environment variables if deployed via Docker).