oracle之Io异常: Got minus one from a read call

Posted chendeming

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle之Io异常: Got minus one from a read call相关的知识,希望对你有一定的参考价值。

一、问题表象:

  java.sql.SQLException: Io 异常: Got minus one from a read call
   at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
   at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
   at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)
   at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
   at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
   at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
   at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
   at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
   at java.sql.DriverManager.getConnection(Unknown Source)
   at java.sql.DriverManager.getConnection(Unknown Source)
   at sms.SMSDatabase.getConnection(SMSDatabase.java:27)
   at sms.SMSDatabase.remedy(SMSDatabase.java:158)
   at sms.ProcessMessages.processSms(ProcessMessages.java:24)
   at sms.ProcessSMSThread.run(ProcessSMSThread.java:27)
   at java.lang.Thread.run(Unknown Source)

  直接翻译就是从某个读操作返回了-1,即上一秒可能还正常,下一秒就不正常了

二、修改方案

  1、数据库连接满了,扩大数据库连接池
  2、所登录的机子IP不在sqlnet.ora内,加入后重启listerner即可
  3、数据库负载均衡时,指定了(SERVER=DEDICATED),去除这个即可
  4、网管在Oracle配置上限制了该台机子访问Oracle的权限,这个问题基本和2类似,也是修改Oracle配置即可

备注说明:

  有的时候网络的波动也会产生此类问题

 

摘抄自:https://blog.csdn.net/cdguogang/article/details/18791213



















以上是关于oracle之Io异常: Got minus one from a read call的主要内容,如果未能解决你的问题,请参考以下文章

Got minus one from a read call异常

Caught: java.sql.SQLException: Io 异常: Got minus one from a read call;create connection SQLException

连接Oracle数据库的时候报了“Got minus one from a read call”

kafka producer生产数据到kafka异常:Got error produce response with correlation id 16 on topic-partition...Er

《MySQL系列-主从相关》MySQL从库Slave_IO_Running异常,Last_IO_Error: Got fatal error 1236 from master when reading

MySQL案例09:Last_IO_Error: Got fatal error 1236 from master when reading data from binary log