DX Application Performance Management

Expand all | Collapse all

postgres error

  • 1.  postgres error

    Posted 06-10-2013 07:59 AM
    Hi,
    We were experiencing this postgres error below from MOM's log. I did restart the postgres and it has been working fine since the restart. Is there anyone has the similar issue before? Could you please advise what caused this error? Thanks.


    6/08/13 12:40:25.928 PM EDT [WARN] [CheckDatabase.Thread1] [Manager.com.timestock.tess.util.DbUtils] database inaccessible; will check later
    6/08/13 12:40:37.648 PM EDT [ERROR] [QuartzScheduler_ExportReports-one_MisfireHandler] [Manager.com.timestock.tess.util.QuartzDataSource] Can't allocate new session
    org.hibernate.exception.GenericJDBCException: Cannot open connection
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
    at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
    at com.timestock.tess.util.QuartzDataSource.getConnection(QuartzDataSource.java:101)
    at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:111)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:553)
    at org.quartz.impl.jdbcjobstore.JobStoreTX.doRecoverMisfires(JobStoreTX.java:1293)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:2409)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:2428)
    Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
    at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
    ... 7 more
    Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
    at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
    at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
    at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
    ... 10 more
    6/08/13 12:40:44.999 PM EDT [WARN] [CheckDatabase.Thread1] [Manager.com.timestock.tess.util.DbUtils] database inaccessible; will check later
    6/08/13 12:40:48.829 PM EDT [ERROR] [ExportReports_QuartzSchedulerThread] [Manager.com.timestock.tess.util.QuartzDataSource] Can't allocate new session
    org.hibernate.exception.GenericJDBCException: Cannot open connection
    at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
    at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
    at com.timestock.tess.util.QuartzDataSource.getConnection(QuartzDataSource.java:101)
    at org.quartz.utils.DBConnectionManager.getConnection(DBConnectionManager.java:111)
    at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:553)
    at org.quartz.impl.jdbcjobstore.JobStoreTX.acquireNextTrigger(JobStoreTX.java:1169)
    at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:233)
    Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
    at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:81)
    at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
    ... 6 more
    Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
    at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
    at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
    at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
    ... 9 more


  • 2.  RE: postgres error

    Posted 06-10-2013 08:34 AM
    Hi,

    So are you able to restart the "postgres" service successfully??
    Also, have changed your password for the user via which your service is running?

    Regards,
    Vaibhav


  • 3.  RE: postgres error

    Posted 06-10-2013 08:57 AM
    Yes, I was able to restart the postgres service. And no, I didn't change the passwd.
    Zhang


  • 4.  RE: postgres error

    Posted 06-10-2013 09:14 AM
    ok ...
    Check that your pb_hba.conf is configured correctly.

    Also is your Database is on the localhost???i.e. EM and DB are having the same IP? I
    If it is so, try to connect your database with pgAdmin III.


  • 5.  RE: postgres error

    Posted 06-10-2013 10:56 AM
    Hi,
    I don't think it's the config issue since I didn't change any configuration. This was my first time to see this error..
    And no EM and DB are on different servers. But I can get access to db via pgadmin.


  • 6.  RE: postgres error

    Posted 06-10-2013 01:17 PM
    Try resetting the password in <EM_HOME>/config/tess-db-cfg.xml.


  • 7.  RE: postgres error

    Posted 06-11-2013 10:14 AM
    Could you please tell me why it's a password issue? I didn't change my password. Thx..


  • 8.  RE: postgres error

    Posted 06-11-2013 01:42 PM
    Has the "last data modified" value changed on the file? Does it match when you previously installed the database?


  • 9.  RE: postgres error

    Posted 06-11-2013 01:47 PM
    Mar 30 18:22 tess-db-cfg.xml

    The file was modified on 30th, it doesn't match when I installed the db, but the issue happened on 7th June...


  • 10.  RE: postgres error

    Posted 06-11-2013 02:14 PM
    Check to see if you have a hung session on the port you've assigned for PostgreSQL.