On Tue, May 20, 2014 at 9:31 AM, Bhathiya Jayasekara <[email protected]>wrote:

> Hi Chamara,
>
> Where do you have the database server? Locally or remote? If it's remote
> you will have to enable TCP/IP connections for db server (
> *tcpip_socket=true* in postgresql.conf) and allow connections from APIM
> machine. You can do this by adding a host entry to *pg_hba.conf.*
>

Refer http://www.postgresql.org/docs/8.2/static/auth-pg-hba-conf.html


>
> Thanks,
> Bhathiya
>
>
>
>
> On Tue, May 20, 2014 at 7:50 AM, Chamara Ariyarathne <[email protected]>wrote:
>
>> Has anyone seen this error before with a WSO2 product? I'm getting this
>> connection error when API Manager is configured to use a postgresql
>> database.
>>
>> [2014-05-20 17:14:36,796] FATAL - DatabaseCreator Failed to create
>> database tables for registry resource store. FATAL: no pg_hba.conf entry
>> for host "10.100.1.90", user "chamara", database "am160carbon", SSL off
>> org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry for host
>> "10.100.1.90", user "chamara", database "am160carbon", SSL off
>> at
>> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:289)
>>  at
>> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:106)
>> at
>> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
>>  at
>> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:123)
>> at
>> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:28)
>>  at
>> org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:19)
>> at
>> org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:28)
>>  at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:22)
>> at org.postgresql.Driver.makeConnection(Driver.java:391)
>>  at org.postgresql.Driver.connect(Driver.java:265)
>> at
>> org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
>>  at
>> org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
>> at
>> org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
>>  at
>> org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
>> at
>> org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
>>  at
>> org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)
>> at
>> org.wso2.carbon.utils.dbcreator.DatabaseCreator.createRegistryDatabase(DatabaseCreator.java:58)
>>  at
>> org.wso2.carbon.user.core.common.DefaultRealmService.initializeDatabase(DefaultRealmService.java:278)
>> at
>> org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:90)
>>  at
>> org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:114)
>> at
>> org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:69)
>>  at
>> org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
>>  at java.security.AccessController.doPrivileged(Native Method)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
>>  at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
>>  at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
>> at
>> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
>>  at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
>>  at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
>>  at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
>>  at
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
>> [2014-05-20 17:14:36,797] ERROR - Activator Cannot start User Manager
>> Core bundle
>> java.lang.Exception: Error in creating the database
>> at
>> org.wso2.carbon.user.core.common.DefaultRealmService.initializeDatabase(DefaultRealmService.java:285)
>>  at
>> org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:90)
>> at
>> org.wso2.carbon.user.core.common.DefaultRealmService.<init>(DefaultRealmService.java:114)
>>  at
>> org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:69)
>> at
>> org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
>>  at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
>> at java.security.AccessController.doPrivileged(Native Method)
>>  at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
>> at
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
>>  at
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
>> at
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)
>>  at
>> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
>>  at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
>>  at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
>> at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
>>  at
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
>> at
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>>  at
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
>> Caused by: java.lang.Exception: Failed to create database tables for
>> registry resource store. FATAL: no pg_hba.conf entry for host
>> "10.100.1.90", user "chamara", database "am160carbon", SSL off
>>  at
>> org.wso2.carbon.utils.dbcreator.DatabaseCreator.createRegistryDatabase(DatabaseCreator.java:69)
>> at
>> org.wso2.carbon.user.core.common.DefaultRealmService.initializeDatabase(DefaultRealmService.java:278)
>>  ... 19 more
>> Caused by: org.postgresql.util.PSQLException: FATAL: no pg_hba.conf entry
>> for host "10.100.1.90", user "chamara", database "am160carbon", SSL off
>>  at
>> org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:289)
>> at
>> org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:106)
>>  at
>> org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)
>> at
>> org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:123)
>>  at
>> org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:28)
>> at
>> org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(AbstractJdbc3gConnection.java:19)
>>  at
>> org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(AbstractJdbc4Connection.java:28)
>> at org.postgresql.jdbc4.Jdbc4Connection.<init>(Jdbc4Connection.java:22)
>>  at org.postgresql.Driver.makeConnection(Driver.java:391)
>> at org.postgresql.Driver.connect(Driver.java:265)
>>  at
>> org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
>> at
>> org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
>>  at
>> org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
>> at
>> org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
>>  at
>> org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)
>> at
>> org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)
>>  at
>> org.wso2.carbon.utils.dbcreator.DatabaseCreator.createRegistryDatabase(DatabaseCreator.java:58)
>> ... 20 more
>>
>>
>> --
>> *Chamara Ariyarathne*
>> Senior Software Engineer - QA;
>> WSO2 Inc; http://www.wso2.com/.
>> Mobile; *+94772786766 <%2B94772786766>*
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Bhathiya Jayasekara*
> *Software Engineer,*
> *WSO2 inc., http://wso2.com <http://wso2.com>*
>
> *Phone: +94715478185 <%2B94715478185>*
> *LinkedIn: http://www.linkedin.com/in/bhathiyaj
> <http://www.linkedin.com/in/bhathiyaj>*
> *Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
> *Blog: http://movingaheadblog.blogspot.com
> <http://movingaheadblog.blogspot.com/>*
>



-- 
*Bhathiya Jayasekara*
*Software Engineer,*
*WSO2 inc., http://wso2.com <http://wso2.com>*

*Phone: +94715478185*
*LinkedIn: http://www.linkedin.com/in/bhathiyaj
<http://www.linkedin.com/in/bhathiyaj>*
*Twitter: https://twitter.com/bhathiyax <https://twitter.com/bhathiyax>*
*Blog: http://movingaheadblog.blogspot.com
<http://movingaheadblog.blogspot.com/>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to