org.postgresql.util.PSQLException

The connection attempt failed.

Samebug tips1

Check if you don't have a VPN or something like this messing with your connection. Also, check Jenkins DNS configurations (try to start it with "--dns 8.8.8.8".


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web769

  • via GitHub by ljbade
    ,
  • via GitHub by giray
    ,
  • Stack trace

    • org.postgresql.util.PSQLException: The connection attempt failed. at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:280) at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:66) at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:211) at org.postgresql.Driver.makeConnection(Driver.java:407) at org.postgresql.Driver.connect(Driver.java:275) at org.apache.catalina.realm.JDBCRealm.open(JDBCRealm.java:661) at org.apache.catalina.realm.JDBCRealm.startInternal(JDBCRealm.java:724) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5054) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:596) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1805) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.UnknownHostException: postgres-service at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at org.postgresql.core.PGStream.<init>(PGStream.java:64) at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:150) ... 19 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown UserUnknown User
    Once,
    derproggerderprogger
    Once,
    guizmaiiguizmaii
    16 times, last one
    musketyrmusketyr
    2 times, last one
    oddodd
    Once,
    113 more bugmates