Quantcast

problem in configuring sonar and sonar-runner with postgresql database

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

problem in configuring sonar and sonar-runner with postgresql database

arc.dream
Hi,

i have installed sonar on windows machine with database as postgresql. the sonar is up and running and i can the webpage also with system page showing all the details. My project is on linux machine where i am running sonar-runner. i have installed c++ plugin also on sonar. 

when i am running sonar-runner on linux machine it try to connect to local database. the error is mentioned below ..

Runner configuration file: /home/arcdream/sonar/sonar-runner-1.3/conf/sonar-runner.properties
Project configuration file: /home/arcdream/sonar/MyProject/CdrGenerator/sonar-project.properties
Runner version: 1.3
Java version: 1.6.0_13, vendor: Sun Microsystems Inc.
OS name: "Linux", version: "2.6.32-131.4.1.el6.x86_64", arch: "amd64"
Work directory: /home/arcdream/sonar/MyProject/CdrGenerator/.sonar
07:01:36.078 INFO      o.s.c.p.Database - Create JDBC datasource
Total time: 18.043s
Final Memory: 1M/7M
Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public final org.sonar.core.persistence.DefaultDatabase org.sonar.core.persistence.DefaultDatabase.start()', instance 'org.sonar.batch.bootstrap.BatchDatabase@75bc16f0, java.lang.RuntimeException: wrapper
     at org.sonar.runner.Runner.delegateExecution(Runner.java:189)
     at org.sonar.runner.Runner.execute(Runner.java:78)
     at org.sonar.runner.Main.main(Main.java:61)
Caused by: org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public final org.sonar.core.persistence.DefaultDatabase org.sonar.core.persistence.DefaultDatabase.start()', instance 'org.sonar.batch.bootstrap.BatchDatabase@75bc16f0, java.lang.RuntimeException: wrapper
     at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFailed(NullComponentMonitor.java:77)
     at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:132)
     at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:115)
     at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
     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:1009)
     at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002)
     at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:760)
     at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:70)
     at org.sonar.batch.bootstrap.Module.start(Module.java:82)
     at org.sonar.batch.Batch.execute(Batch.java:104)
     at org.sonar.runner.Launcher.executeBatch(Launcher.java:70)
     at org.sonar.runner.Launcher.execute(Launcher.java:64)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.sonar.runner.Runner.delegateExecution(Runner.java:186)
     ... 2 more
Caused by: java.lang.RuntimeException: wrapper
     at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)
     ... 21 more
Caused by: java.lang.IllegalStateException: Fail to connect to database
     at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:64)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
     ... 20 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: no pg_hba.conf entry for host "192.168.7.240", user "sonar", database "sonar", SSL off)
     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.getLogWriter(BasicDataSource.java:1098)
     at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(BasicDataSourceFactory.java:350)
     at org.sonar.core.persistence.DefaultDatabase.initDatasource(DefaultDatabase.java:114)
     at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:60)
     ... 25 more
Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "192.168.7.240", user "sonar", database "sonar", SSL off
     at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
     at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
     at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
     at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
     at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
     at org.postgresql.Driver.makeConnection(Driver.java:393)
     at org.postgresql.Driver.connect(Driver.java:267)
     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)
     ... 30 more


My configuration file is in attachment.

is it required to run sonar on project machine also? 

thanks,
Amit kumar



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

sonar.properties (8K) Download Attachment
sonar-project.properties (942 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem in configuring sonar and sonar-runner with postgresql database

David Racodon-2
Hi Amit,

Your issue is not related to Sonar. See the log:
...
Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "192.168.7.240", user "sonar", database "sonar", SSL off 
...
Your PostgreSQL database is not configured to accept remote connections.
I'll let you browse Google to fix the issue.

Thank you

Regards,

David RACODON | SonarSource
Senior Consultant



On 4 July 2012 16:00, Amit Kumar <[hidden email]> wrote:
Hi,

i have installed sonar on windows machine with database as postgresql. the sonar is up and running and i can the webpage also with system page showing all the details. My project is on linux machine where i am running sonar-runner. i have installed c++ plugin also on sonar. 

when i am running sonar-runner on linux machine it try to connect to local database. the error is mentioned below ..

Runner configuration file: /home/arcdream/sonar/sonar-runner-1.3/conf/sonar-runner.properties
Project configuration file: /home/arcdream/sonar/MyProject/CdrGenerator/sonar-project.properties
Runner version: 1.3
Java version: 1.6.0_13, vendor: Sun Microsystems Inc.
OS name: "Linux", version: "2.6.32-131.4.1.el6.x86_64", arch: "amd64"
Work directory: /home/arcdream/sonar/MyProject/CdrGenerator/.sonar
07:01:36.078 INFO      o.s.c.p.Database - Create JDBC datasource
Total time: 18.043s
Final Memory: 1M/7M
Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public final org.sonar.core.persistence.DefaultDatabase org.sonar.core.persistence.DefaultDatabase.start()', instance 'org.sonar.batch.bootstrap.BatchDatabase@75bc16f0, java.lang.RuntimeException: wrapper
     at org.sonar.runner.Runner.delegateExecution(Runner.java:189)
     at org.sonar.runner.Runner.execute(Runner.java:78)
     at org.sonar.runner.Main.main(Main.java:61)
Caused by: org.picocontainer.PicoLifecycleException: PicoLifecycleException: method 'public final org.sonar.core.persistence.DefaultDatabase org.sonar.core.persistence.DefaultDatabase.start()', instance 'org.sonar.batch.bootstrap.BatchDatabase@75bc16f0, java.lang.RuntimeException: wrapper
     at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFailed(NullComponentMonitor.java:77)
     at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:132)
     at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:115)
     at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
     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:1009)
     at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1002)
     at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:760)
     at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:70)
     at org.sonar.batch.bootstrap.Module.start(Module.java:82)
     at org.sonar.batch.Batch.execute(Batch.java:104)
     at org.sonar.runner.Launcher.executeBatch(Launcher.java:70)
     at org.sonar.runner.Launcher.execute(Launcher.java:64)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.sonar.runner.Runner.delegateExecution(Runner.java:186)
     ... 2 more
Caused by: java.lang.RuntimeException: wrapper
     at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(ReflectionLifecycleStrategy.java:130)
     ... 21 more
Caused by: java.lang.IllegalStateException: Fail to connect to database
     at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:64)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
     at java.lang.reflect.Method.invoke(Method.java:597)
     at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
     ... 20 more
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (FATAL: no pg_hba.conf entry for host "192.168.7.240", user "sonar", database "sonar", SSL off)
     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.getLogWriter(BasicDataSource.java:1098)
     at org.apache.commons.dbcp.BasicDataSourceFactory.createDataSource(BasicDataSourceFactory.java:350)
     at org.sonar.core.persistence.DefaultDatabase.initDatasource(DefaultDatabase.java:114)
     at org.sonar.core.persistence.DefaultDatabase.start(DefaultDatabase.java:60)
     ... 25 more
Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host "192.168.7.240", user "sonar", database "sonar", SSL off
     at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:291)
     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:108)
     at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66)
     at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:125)
     at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
     at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
     at org.postgresql.Driver.makeConnection(Driver.java:393)
     at org.postgresql.Driver.connect(Driver.java:267)
     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)
     ... 30 more


My configuration file is in attachment.

is it required to run sonar on project machine also? 

thanks,
Amit kumar



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...