org.postgresql.util.PSQLException: The connection attempt failed.

JIRA | Brian Wong | 2 years ago
  1. 0

    Our database had some connectivity problems but was recovered within a few minutes. In the PuppetDB logs I saw: 2015-02-25 20:11:02,872 ERROR [c.j.b.h.AbstractConnectionHook] Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 5. Exception: java.net.NoRouteToHostException: No route to host 2015-02-25 20:11:11,890 ERROR [c.j.b.h.AbstractConnectionHook] Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 4. Exception: java.net.NoRouteToHostException: No route to host 2015-02-25 20:11:20,908 ERROR [c.j.b.h.AbstractConnectionHook] Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 3. Exception: java.net.NoRouteToHostException: No route to host 2015-02-25 20:11:29,926 ERROR [c.j.b.h.AbstractConnectionHook] Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 2. Exception: java.net.NoRouteToHostException: No route to host 2015-02-25 20:11:38,944 ERROR [c.j.b.h.AbstractConnectionHook] Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 1. Exception: java.net.NoRouteToHostException: No route to host 2015-02-25 20:11:45,945 ERROR [c.j.b.ConnectionHandle] Database access problem. Killing off all remaining connections in the connection pool. SQL State = 08001 2015-02-25 20:11:45,945 ERROR [c.j.b.PoolWatchThread] Error in trying to obtain a connection. Retrying in 7000ms org.postgresql.util.PSQLException: The connection attempt failed. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:225) ~[puppetdb.jar:na] etc.. As the database recovered, it seemed that PuppetDB recovered without intervention. This was not the case. The KahaDB grew unbounded and facts were not being recorded in PuppetDB. I had to follow the steps in https://docs.puppetlabs.com/puppetdb/latest/trouble_kahadb_corruption.html to recover. Can we ensure that PuppetDB recovers completely with KahaDB when a reconnection happens? If not, I would rather much have PuppetDB detect failures with its use of KahaDB and stop its own process and fail hard rather giving the impression that nothing is wrong until we notice either our disk space is filling up and/or our updates to puppet facts arent being taken. Thanks.

    JIRA | 2 years ago | Brian Wong
    org.postgresql.util.PSQLException: The connection attempt failed.
  2. 0

    Our database had some connectivity problems but was recovered within a few minutes. In the PuppetDB logs I saw: 2015-02-25 20:11:02,872 ERROR [c.j.b.h.AbstractConnectionHook] Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 5. Exception: java.net.NoRouteToHostException: No route to host 2015-02-25 20:11:11,890 ERROR [c.j.b.h.AbstractConnectionHook] Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 4. Exception: java.net.NoRouteToHostException: No route to host 2015-02-25 20:11:20,908 ERROR [c.j.b.h.AbstractConnectionHook] Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 3. Exception: java.net.NoRouteToHostException: No route to host 2015-02-25 20:11:29,926 ERROR [c.j.b.h.AbstractConnectionHook] Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 2. Exception: java.net.NoRouteToHostException: No route to host 2015-02-25 20:11:38,944 ERROR [c.j.b.h.AbstractConnectionHook] Failed to acquire connection Sleeping for 7000ms and trying again. Attempts left: 1. Exception: java.net.NoRouteToHostException: No route to host 2015-02-25 20:11:45,945 ERROR [c.j.b.ConnectionHandle] Database access problem. Killing off all remaining connections in the connection pool. SQL State = 08001 2015-02-25 20:11:45,945 ERROR [c.j.b.PoolWatchThread] Error in trying to obtain a connection. Retrying in 7000ms org.postgresql.util.PSQLException: The connection attempt failed. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:225) ~[puppetdb.jar:na] etc.. As the database recovered, it seemed that PuppetDB recovered without intervention. This was not the case. The KahaDB grew unbounded and facts were not being recorded in PuppetDB. I had to follow the steps in https://docs.puppetlabs.com/puppetdb/latest/trouble_kahadb_corruption.html to recover. Can we ensure that PuppetDB recovers completely with KahaDB when a reconnection happens? If not, I would rather much have PuppetDB detect failures with its use of KahaDB and stop its own process and fail hard rather giving the impression that nothing is wrong until we notice either our disk space is filling up and/or our updates to puppet facts arent being taken. Thanks.

    JIRA | 2 years ago | Brian Wong
    org.postgresql.util.PSQLException: The connection attempt failed.
  3. 0

    GitHub comment 8#57614329

    GitHub | 2 years ago | jangithub
    org.postgresql.util.PSQLException: The connection attempt failed.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    How do I log postgres driver messages with slf4j?

    Stack Overflow | 3 years ago | Kerb
    org.postgresql.util.PSQLException: пїЅпїЅпїЅпїЅпїЅ: пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ "traffic" пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ (пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ)
  6. 0

    Jboss 4.2.3 datasource can't connect to PostgreSQL

    Stack Overflow | 5 years ago | Oscar Calderon
    org.jboss.util.NestedSQLException: Could not create connection; - nested throwable: (org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "$

    3 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.postgresql.util.PSQLException

      The connection attempt failed.

      at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl()
    2. PostgreSQL JDBC Driver
      ConnectionFactoryImpl.openConnectionImpl
      1. org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:225)[puppetdb.jar:na]
      1 frame