Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-7580

Consider only sonar.embeddedDatabase.port when set and ignore sonar.jdbc.url

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6
    • Component/s: Database
    • Labels:

      Description

      The property "sonar.embeddedDatabase.port" can not be set to another value than 9092 :

      2016.04.30 11:15:39 INFO  web[o.s.s.d.EmbeddedDatabase] Starting embedded database on port 9094 with url jdbc:h2:tcp://localhost:9092/sonar
      2016.04.30 11:15:39 INFO  web[o.s.s.d.EmbeddedDatabase] Embedded database started. Data stored in: /Users/sbrandhof/dev/core/sonarqube/sonar-application/target/sonarqube-5.6-SNAPSHOT/data
      2016.04.30 11:15:39 INFO  web[o.sonar.db.Database] Create JDBC data source for jdbc:h2:tcp://localhost:9092/sonar
      2016.04.30 11:15:41 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
      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:104) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:71) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_80]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_80]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_80]
      	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_80]
      	at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.15.jar:na]
      	at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.15.jar:na]
      	at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320) ~[sonar-core-5.6-SNAPSHOT.jar:na]
      	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.15.jar:na]
      	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.15.jar:na]
      	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.15.jar:na]
      	at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.15.jar:na]
      	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) ~[picocontainer-2.15.jar:na]
      	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) ~[picocontainer-2.15.jar:na]
      	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) ~[picocontainer-2.15.jar:na]
      	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:141) ~[sonar-core-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:84) ~[sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.platform.Platform.start(Platform.java:216) ~[sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:175) ~[sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.platform.Platform.init(Platform.java:90) ~[sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) ~[sonar-server-5.6-SNAPSHOT.jar:na]
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812) [tomcat-embed-core-8.0.30.jar:8.0.30]
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255) [tomcat-embed-core-8.0.30.jar:8.0.30]
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.30.jar:8.0.30]
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408) [tomcat-embed-core-8.0.30.jar:8.0.30]
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398) [tomcat-embed-core-8.0.30.jar:8.0.30]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_80]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_80]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_80]
      	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_80]
      Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection is broken: "java.net.ConnectException: Connection refused: localhost:9092" [90067-176])
      	at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) ~[commons-dbcp-1.4.jar:1.4]
      	at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) ~[commons-dbcp-1.4.jar:1.4]
      	at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) ~[commons-dbcp-1.4.jar:1.4]
      	at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(NullConnectionInterceptor.java:31) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:323) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:102) ~[sonar-db-5.6-SNAPSHOT.jar:na]
      	... 30 common frames omitted
      Caused by: org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused: localhost:9092" [90067-176]
      	at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) ~[h2-1.3.176.jar:1.3.176]
      	at org.h2.message.DbException.get(DbException.java:167) ~[h2-1.3.176.jar:1.3.176]
      	at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:434) ~[h2-1.3.176.jar:1.3.176]
      	at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:311) ~[h2-1.3.176.jar:1.3.176]
      	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:107) ~[h2-1.3.176.jar:1.3.176]
      	at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:91) ~[h2-1.3.176.jar:1.3.176]
      	at org.h2.Driver.connect(Driver.java:74) ~[h2-1.3.176.jar:1.3.176]
      	at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38) ~[commons-dbcp-1.4.jar:1.4]
      	at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582) ~[commons-dbcp-1.4.jar:1.4]
      	at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556) ~[commons-dbcp-1.4.jar:1.4]
      	at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545) ~[commons-dbcp-1.4.jar:1.4]
      	... 35 common frames omitted
      Caused by: java.net.ConnectException: Connection refused
      	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.7.0_80]
      	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) ~[na:1.7.0_80]
      	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) ~[na:1.7.0_80]
      	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) ~[na:1.7.0_80]
      	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.7.0_80]
      	at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_80]
      	at org.h2.util.NetUtils.createSocket(NetUtils.java:123) ~[h2-1.3.176.jar:1.3.176]
      	at org.h2.util.NetUtils.createSocket(NetUtils.java:103) ~[h2-1.3.176.jar:1.3.176]
      	at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:100) ~[h2-1.3.176.jar:1.3.176]
      	at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:430) ~[h2-1.3.176.jar:1.3.176]
      	... 43 common frames omitted
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sebastien.lesaint Sebastien Lesaint
              Reporter:
              simon.brandhof Simon Brandhof (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: