问题:

2023-03-14 03:44:06.182 ERROR [xxxx-job_Worker-4] druid.sql.Statement - {conn-110107, pstmt-203154} execute error. SELECT * FROM qrtz_LOCKS WHERE SCHED_NAME = 'xxxx' AND LOCK_NAME = ? FOR UPDATE

java.sql.SQLException: ORA-12592: TNS:bad packet

at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:509)

at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:456)

at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:557)

at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:269)

at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:655)

at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:270)

at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:91)

at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:807)

at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:983)

at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)

at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3666)

at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1426)

at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3713)

问题说明解决:

https://stackoverflow.com/questions/41019939/jdbc-oracle-error-java-sql-sqlexception-ora-12592-tnsbad-packet

Root Cause:

Due to a defect or configuration issue in the operating environment.

May be a firewall was intermittently interrupting database requests on the network which led to this exception.

More help: http://www.tek-tips.com/viewthread.cfm?qid=1673903

The following workaround has been proven to resolve the issue (in most cases) until the patch can be applied, but with a warning and important note:

Add this parameter to the sqlnet.ora file at BOTH the origin (or client) and at the Database server / instance:

SQLNET.SEND_TIMEOUT=n

Where n is a value in seconds. The setting itself, and not the value, should resolve this issue, so a relatively high setting should eliminate this problem but with no impact to normal functions.

E.g.

SQLNET.SEND_TIMEOUT=60000

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐