title: sonarqube didn't run web UI (java.net.UnknownHostException: localhost)
body: <p>Ubuntu 14
  Sonar 6.7.1
  Postgresql 9.5
  Java(TM) SE Runtime Environment (build 1.8.0_144-b01)</p>
  
  <p>Sonarqube didn't run web UI but sonar service was active. Could you help me
  java.net.UnknownHostException: localhost</p>
  
  <p>/opt/sonarqube-6.7.1/logs/web.log</p>
  
  <pre><code>ERROR web[][o.postgresql.Driver] Connection error:
  org.postgresql.util.PSQLException: The connection attempt failed.
          at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:275)
          at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
          at org.postgresql.jdbc.PgConnection.&lt;init&gt;(PgConnection.java:194)
          at org.postgresql.Driver.makeConnection(Driver.java:450)
          at org.postgresql.Driver.connect(Driver.java:252)
          at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
          at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
          at org.apache.commons.pool.impl.GenericObjectPool.addObject(GenericObjectPool.java:1617)
          at org.apache.commons.pool.impl.GenericObjectPool.ensureMinIdle(GenericObjectPool.java:1575)
          at org.apache.commons.pool.impl.GenericObjectPool.access$700(GenericObjectPool.java:190)
          at org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1709)
          at java.util.TimerThread.mainLoop(Timer.java:555)
          at java.util.TimerThread.run(Timer.java:505)
  Caused by: java.net.UnknownHostException: localhost
          at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184)
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
          at java.net.Socket.connect(Socket.java:589)
          at org.postgresql.core.PGStream.&lt;init&gt;(PGStream.java:68)
          at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)
  </code></pre>
  
  <p>/opt/sonarqube-6.7.1/logs/sonar.log</p>
  
  <pre><code>2018.01.31 16:37:21 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-6.7.1/temp
  2018.01.31 16:37:21 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
  2018.01.31 16:37:21 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube-6.7.1/elasticsearch]: /opt/sonarqube-6.7.1/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube-6.7.1/temp/conf/es
  2018.01.31 16:37:21 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
  2018.01.31 16:37:21 INFO  app[][o.e.p.PluginsService] no modules loaded
  2018.01.31 16:37:21 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
  2018.01.31 16:37:35 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
  2018.01.31 16:37:35 INFO  app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube-6.7.1]: /usr/lib/jvm/jdk1.8.0_144/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube-6.7.1/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttp.auth.ntlm.domain= -DsocksProxyHost= -DsocksProxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort= -cp ./lib/common/*:./lib/server/*:/opt/sonarqube-6.7.1/lib/jdbc/postgresql/postgresql-42.1.4.jar org.sonar.server.app.WebServer /opt/sonarqube-6.7.1/temp/sq-process3048603911980736431properties
  2018.01.31 16:40:27 INFO  app[][o.s.a.SchedulerImpl] Process [web] is stopped
  2018.01.31 16:40:27 INFO  app[][o.s.a.SchedulerImpl] Process [es] is stopped
  2018.01.31 16:40:27 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
  2018.01.31 16:40:27 WARN  app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143
  </code></pre>
  
  <p>Sonar.properties config</p>
  
  <pre><code>sonar.jdbc.username=sonarqube
  sonar.jdbc.password=sonarqube
  sonar.jdbc.url=jdbc:postgresql://localhost/sonar
  sonar.web.host=0.0.0.0
  sonar.web.port=9000
  </code></pre>