title: I am installing Sonarqube on kubernetes cluster but getting the following error
body: <p>My installation guide is : <a href="https://coderise.io/installing-sonarqube-in-kubernetes/" rel="nofollow noreferrer">https://coderise.io/installing-sonarqube-in-kubernetes/</a></p>
  <p>Dropping Privileges
  2022.09.13 06:13:51 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp</p>
  <p>2022.09.13 06:13:51 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:39635]</p>
  <p>2022.09.13 06:13:51 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch</p>
  <p>2022.09.13 06:13:51 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.n.Node] version[7.17.4], pid[32], build[default/tar/79878662c54c886ae89206c685d9f1051a9d6411/2022-05-18T18:04:20.964345128Z], OS[Linux/5.15.0-46-generic/amd64], JVM[Alpine/OpenJDK 64-Bit Server VM/11.0.15/11.0.15+10-alpine-r0]</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.n.Node] JVM home [/usr/lib/jvm/java-11-openjdk]</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseG1GC, -Djava.io.tmpdir=/opt/sonarqube/temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djna.tmpdir=/opt/sonarqube/temp, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=COMPAT, -Dcom.redhat.fips=false, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch, -Des.path.conf=/opt/sonarqube/temp/conf/es, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=false]</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.p.PluginsService] loaded module [reindex]</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.p.PluginsService] no plugins loaded</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/
  (overlay)]], net usable_space [80.4gb], net total_space [97.3gb], types [overlay]</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]</p>
  <p>2022.09.13 06:13:53 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [tOk27fUrTMifBRU7reFsEg], cluster name [sonarqube], roles [data_frozen, master, remote_cluster_client, data, data_content, data_hot, data_warm, data_cold, ingest]</p>
  <p>2022.09.13 06:13:56 INFO  es[][o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=256kb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=1mb, heap_size=512mb}]</p>
  <p>2022.09.13 06:13:56 INFO  es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
  2022.09.13 06:13:56 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.g.DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.n.Node] initialized</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.n.Node] starting ...</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:39635},
  bound_addresses {127.0.0.1:39635}</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.c.c.Coordinator] setting initial configuration to
  VotingConfiguration{tOk27fUrTMifBRU7reFsEg}</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{tOk27fUrTMifBRU7reFsEg}{ZoiIrM4KRCSGpxNobZ9XBQ}{127.0.0.1}{127.0.0.1:39635}{cdfhimrsw} elect leader, <em>BECOME_MASTER_TASK</em>, <em>FINISH_ELECTION</em>], term: 1, version: 1, delta: master node changed {previous [], current [{sonarqube}{tOk27fUrTMifBRU7reFsEg}{ZoiIrM4KRCSGpxNobZ9XBQ}{127.0.0.1}{127.0.0.1:39635}{cdfhimrsw}]}</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.c.c.CoordinationState] cluster UUID set to [wTkam3hWTNetjJf5zDVSKg]</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{tOk27fUrTMifBRU7reFsEg}{ZoiIrM4KRCSGpxNobZ9XBQ}{127.0.0.1}{127.0.0.1:39635}{cdfhimrsw}]}, term: 1, version: 1, reason: Publication{term=1, version=1}</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}</p>
  <p>2022.09.13 06:13:57 INFO  es[][o.e.n.Node] started
  2022.09.13 06:13:57 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
  2022.09.13 06:13:58 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up</p>
  <p>2022.09.13 06:13:58 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --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/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.6.1.59531.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.4.0.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process9305220359027514009properties</p>
  <p>2022.09.13 06:13:58 INFO  web[][o.s.p.ProcessEntryPoint] Starting Web Server</p>
  <p>2022.09.13 06:13:59 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.6.1.59531 / 7398ee51f5da9a64ea123c98c5225aa5c41f700c</p>
  <p>2022.09.13 06:13:59 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://sonar-postgres:5432/sonar</p>
  <p>2022.09.13 06:13:59 WARN  web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@5c29bfd-org.sonar.db.DefaultDatabase': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Fail to connect to database
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@5c29bfd-org.sonar.db.DefaultDatabase': Initialization of bean failed; nested exception is java.lang.IllegalStateException: Fail to connect to database
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
  at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
  at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
  at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:80)
  at org.sonar.server.platform.platformlevel.PlatformLevel1.start(PlatformLevel1.java:164)
  at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:196)
  at org.sonar.server.platform.PlatformImpl.startLevel1Container(PlatformImpl.java:162)
  at org.sonar.server.platform.PlatformImpl.init(PlatformImpl.java:76)
  at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4768)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5230)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)
  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
  at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
  at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)
  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
  at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:919)
  at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
  at org.apache.catalina.core.StandardService.startInternal(StandardService.java:432)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
  at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:927)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
  at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:72)
  at org.sonar.server.app.WebServer.start(WebServer.java:55)
  at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:97)
  at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81)
  at org.sonar.server.app.WebServer.main(WebServer.java:104)
  Caused by: java.lang.IllegalStateException: Fail to connect to database
  at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:86)
  at org.sonar.core.platform.StartableBeanPostProcessor.postProcessBeforeInitialization(StartableBeanPostProcessor.java:33)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
  ... 44 common frames omitted
  Caused by: java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
  at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:118)
  at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:83)
  ... 48 common frames omitted
  at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:653)
  at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:531)
  at org.apache.commons.dbcp2.BasicDataSource.lambda$getConnection$0(BasicDataSource.java:720)
  at java.base/java.security.AccessController.doPrivileged(Native Method)
  at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:722)
  at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(NullConnectionInterceptor.java:31)
  at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:317)
  at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:115)
  ... 49 common frames omitted
  at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:646)
  at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:180)
  at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:235)
  at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
  at org.postgresql.jdbc.PgConnection.(PgConnection.java:223)
  at org.postgresql.Driver.makeConnection(Driver.java:402)
  at org.postgresql.Driver.connect(Driver.java:261)
  at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52)
  at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:374)
  at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:106)
  at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:649)
  ... 56 common frames omitted
  at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:646)
  at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:180)
  at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:244)
  ... 64 common frames omitted</p>
  <p>2022.09.13 06:13:59 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000</p>
  <p>2022.09.13 06:13:59 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process</p>
  <p>2022.09.13 06:13:59 INFO  app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped</p>
  <p>2022.09.13 06:14:00 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143</p>
  <p>2022.09.13 06:14:00 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped</p>
  <p>2022.09.13 06:14:00 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped</p>