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

前端 未结 1 1272
攒了一身酷
攒了一身酷 2021-02-12 10:43

I am connecting to postgres data base using java web services (apache axis) with JDBC connections to get the data.But suddenly in most of times

相关标签:
1条回答
  • 2021-02-12 11:22

    The real problem is:

    Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read
    

    The connection was closed when Java tried to read from it. This can be caused by:

    • The PostgreSQL server being restarted
    • The PostgreSQL backend you were connected to being terminated
    • The PostgreSQL backend you were connected to crashing
    • Dodgy network connection
    • Badly behaved stateful firewalls
    • Idle connections timing out of the NAT connection tables of NAT firewall/routers

    ... and probably more. Check the PostgreSQL server logs to see if there's anything informative there; also consider doing some network tracing with a tool like Wireshark.

    0 讨论(0)
提交回复
热议问题