title: SonarQube don't start
body: <p>I'm trying to install SonarQube on my CentOS7 server.</p>
  
  <p>When i try to access via web I see this:</p>
  
  <p><a href="https://i.stack.imgur.com/Me9Cm.png" rel="nofollow noreferrer">web_page</a></p>
  
  <p>It's supposed to show a SonarQube page right??</p>
  
  <p>Here i put my logs and configs:</p>
  
  <p><strong>web.log:</strong></p>
  
  <pre><code>2019.08.29 17:24:54 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
  2019.08.29 17:25:05 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
  2019.08.29 17:25:05 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
  2019.08.29 17:25:06 INFO  web[][o.e.plugins] [Kurt Wagner] modules [], plugins [], sites []
  2019.08.29 17:25:06 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
  2019.08.29 17:25:06 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 6.4.0.25310 / ad64a17b531c0e1f6fef0ce7e4d0d0b060977754
  2019.08.29 17:25:06 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost/sonar
  2019.08.29 17:25:06 ERROR web[][o.s.s.p.Platform] Web server startup failed
  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:108)
          at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:75)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
          at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
          at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320)
          at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
          at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
          at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
          at org.picocontainer.behaviors.Stored.start(Stored.java:110)
          at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
          at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
          at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
          at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:143)
          at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:88)
          at org.sonar.server.platform.Platform.start(Platform.java:231)
          at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:190)
          at org.sonar.server.platform.Platform.init(Platform.java:86)
          at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43)
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5189)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:748)
  Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user "sonar")
          at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
          at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
          at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
          at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(NullConnectionInterceptor.java:31)
          at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:323)
          at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:106)
          ... 30 common frames omitted
  Caused by: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "sonar"
          at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:451)
          at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:223)
          at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
          at org.postgresql.jdbc.PgConnection.&lt;init&gt;(PgConnection.java:211)
          at org.postgresql.Driver.makeConnection(Driver.java:407)
          at org.postgresql.Driver.connect(Driver.java:275)
          at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
          at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
          at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
          at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
          ... 35 common frames omitted
  </code></pre>
  
  <p><strong>sonar.log:</strong></p>
  
  <pre><code>2019.08.29 17:28:37 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
  2019.08.29 17:28:37 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
  2019.08.29 17:28:37 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
  &lt;-- Wrapper Stopped
  --&gt; Wrapper Started as Daemon
  Launching a JVM...
  Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
    Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
  
  2019.08.29 17:28:40 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
  2019.08.29 17:28:40 INFO  app[][o.s.a.p.JavaProcessLauncherImpl] Launch process[es]: /usr/java/jdk1.8.0_131/jre/bin/java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube/temp -cp ./lib/common/*:./lib/search/* org.sonar.search.SearchServer /opt/sonarqube/temp/sq-process6725369398987844378properties
  2019.08.29 17:28:45 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
  2019.08.29 17:28:45 INFO  app[][o.s.a.p.JavaProcessLauncherImpl] Launch process[web]: /usr/java/jdk1.8.0_131/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=/opt/sonarqube/temp -cp ./lib/common/*:./lib/server/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-9.4.1209.jre7.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process3428525909039640490properties
  </code></pre>
  
  <p><strong>systemctl status httpd:</strong></p>
  
  <pre><code>[oksmart@CLOUDSVRSONAR01 logs]$ systemctl status httpd -l
  ● httpd.service - The Apache HTTP Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
     Active: active (running) since Thu 2019-08-29 16:59:00 CEST; 33min ago
       Docs: man:httpd(8)
             man:apachectl(8)
    Process: 5697 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
   Main PID: 5834 (httpd)
     Status: "Total requests: 50; Current requests/sec: 0; Current traffic:   0 B/sec"
     CGroup: /system.slice/httpd.service
             ├─5834 /usr/sbin/httpd -DFOREGROUND
             ├─5835 /usr/sbin/httpd -DFOREGROUND
             ├─5836 /usr/sbin/httpd -DFOREGROUND
             ├─5837 /usr/sbin/httpd -DFOREGROUND
             ├─5839 /usr/sbin/httpd -DFOREGROUND
             ├─5900 /usr/sbin/httpd -DFOREGROUND
             ├─5901 /usr/sbin/httpd -DFOREGROUND
             ├─5903 /usr/sbin/httpd -DFOREGROUND
             ├─5904 /usr/sbin/httpd -DFOREGROUND
             ├─5905 /usr/sbin/httpd -DFOREGROUND
             └─5906 /usr/sbin/httpd -DFOREGROUND
  
  Aug 29 16:59:00 CLOUDSVRSONAR01 systemd[1]: Starting The Apache HTTP Server...
  Aug 29 16:59:00 CLOUDSVRSONAR01 httpd[5834]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::250:56ff:fe01:114a. Set the 'ServerName' directive globally to suppress this message
  Aug 29 16:59:00 CLOUDSVRSONAR01 systemd[1]: Started The Apache HTTP Server.
  </code></pre>
  
  <p><strong>/etc/httpd/conf.d/sonar.oksmart.es.conf :</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName localhost
  #   ProxyPreserveHost On
  #   ProxyPass / http://localhost:9000/
  #   ProxyPassReverse / http://localhost:9000/
      TransferLog /var/log/httpd/sonar.oksmart.es_access.log
      ErrorLog /var/log/httpd/sonar.oksmart.es_error.log
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>NOTE: I commented the proxy options because if i comment out those lines, i get an error on the web page.</p>
  
  <p><strong>sonar.sh :</strong></p>
  
  <pre><code>DEF_APP_NAME="SonarQube"
  DEF_APP_LONG_NAME="SonarQube"
  APP_NAME="${DEF_APP_NAME}"
  APP_LONG_NAME="${DEF_APP_LONG_NAME}"
  WRAPPER_CMD="./wrapper"
  WRAPPER_CONF="../../conf/wrapper.conf"
  PRIORITY=
  PIDDIR="."
  RUN_AS_USER=root
  ...
  </code></pre>
  
  <p><strong>sonar.service:</strong></p>
  
  <pre><code>[Unit]
  Description=SonarQube service
  After=syslog.target network.target
  [Service]
  Type=forking
  ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start
  ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop
  User=root
  Group=sonar
  Restart=always
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>Any idea of what am i doing wrong??</p>
  
  <p>Firewall is disabled.</p>
  
  <p>Thanks all!</p>