Postgres连接重置(Windows 10)

时间:2017-03-13 09:38:57

标签: windows postgresql

我在Windows 10上使用全新安装的Postgres 9.6,并且从简单的JDBC代码(连接重置)中获得虚假的连接错误。请注意,我也有来自pgadmin的奇怪错误。请注意,连接到Linux Postgres服务器时代码工作正常。

有没有办法访问服务器日志以查看我的安装有什么问题?

JDBC stacktrace:

org.postgresql.util.PSQLException: The connection attempt failed.
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:275)
    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
    at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:194)
    at org.postgresql.Driver.makeConnection(Driver.java:431)
    at org.postgresql.Driver.connect(Driver.java:247)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:247)
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:209)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:140)
    at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:109)
    at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:67)
    at org.postgresql.core.PGStream.receiveChar(PGStream.java:282)
    at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:418)
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:222)
    ... 44 more

[edit]评论后的更多细节:

在Java代码中,它在请求连接,处理语句等时随机发生......

仅限本地计算机:服务器和位于同一Windows 10机器上的计算机。

PGAdmin行为奇怪(再次随机)说它无法连接到服务器,说服务器已经停止等等......

是否使用BIGsql Windows安装程序(9.6.2-1a)重新安装,现在服务器看起来没问题。 抱歉记不起以前安装的软件包。

0 个答案:

没有答案