问题描述:
2021.10.20 研发同事反馈一个关于JDBC Connection错误的问题,具体情况如下:
JDBC connection with TCPS from Orcle Enterprise Manager fails with IO error:
SEVERE: IO Error: Connection reset by peer, connect lapse 1 ms., Authentication lapse 0 ms.
oracle.sysman.assistants.common.dbutil.SQLFatalErrorException: IO Error: Connection reset by peer, connect lapse 1 ms., Authentication lapse 0 ms.
at oracle.sysman.assistants.common.dbutil.jdbc.JDBCEngine.connect(JDBCEngine.java:656)
at oracle.sysman.assistants.common.dbutil.jdbc.JDBCEngine.connect(JDBCEngine.java:629)
at oracle.sysman.assistants.common.dbutil.jdbc.JDBCEngine.main(JDBCEngine.java:2877
SQL*Plus connection with the same connection string works successfully.
From a standalone JDBC program, the same connection fails with:
SQL Exception occurred:
java.sql.SQLRecoverableException: IO Error: Connection reset
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:752)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566)
at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:317)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:241)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:184)
at JDBCSSLTester.getConnection(JDBCSSLTester.java:79)
at JDBCSSLTester.run(JDBCSSLTester.java:39)
at JDBCSSLTester.main(JDBCSSLTester.java:93)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:750)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
at oracle.net.ns.Packet.send(Packet.java:419)
at oracle.net.ns.ConnectPacket.send(ConnectPacket.java:241)
at oracle.net.ns.NSProtocolStream.negotiateConnection(NSProtocolStream.java:157)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:264)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1452)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:496)
… 9 more
他找到了一个Oracle Support 官方给出的指导方法链接,
发我看了,但是该链接需要登录MOS账户才可以查看solution。
问题解决:
由于没有MOS账号,因此我将该问题丢到DBA群里面请同行帮我查下了一下该CASE问题应对的解决方法(再次感谢同行网名为朝阳的朋友):
本次也为了记录一下这个CASE,希望对后续遇到该问题或者类似问题的朋友有所帮助。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)