-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Check hostname, port are correct and postmaster is accepting
PostPosted: Tue Feb 26, 2013 5:12 am 
Newbie

Joined: Tue Feb 26, 2013 5:06 am
Posts: 1
I upgraded from postgresql 8.4 to 9.2 and hibernate complains the following
WARN 02-26-13 07:25:51:198 PublishAcceptor.GridResourceLocation org.hibernate.cfg.SettingsFactory Could not obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:80)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)

Following are the details
1. Web application on Tomcat
2. Java platform
3. OS linux centOS
4. Upgraded from Postgres 8.4 to 9.2
5. Upgraded to latest JDBC 4 driver postgresql-9.2-1002.jdbc4.jar

I used pg_upgrade for the actual upgrade.
I have tried the following
1. ps -aux | grep postgres lists all my postgres processes with their expected ports
2. Telnet to localhost and port works fine
3. Listen address in postgresql.conf file is 'localhost'
4. Authentication method in pg_hba.conf file is 'trust'
5. psql -U <USER> -p <PORT> -d <DB> works fine
6. psql postgresql://<USER>@localhost:5432/<DB> works fine

I did not change any of the previous hibernate properties which worked fine with 8.4
From the exception it is clear that hibernate cannot get to the post master but I have no clue why.

Please let me know what I am missing here


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.