mycat->oracle报java.sql.SQLException: 无法从套接字读取更多的数据
今天下午,测试环境清算的时候又出现了之前的一个异常,这次把错误信息全部打出来了,java.sql.SQLException: 无法从套接字读取更多的数据,是使用mycat连接oracle的,如下所示:

ORA-17410: No more data to read from socket
Your database connection has timed out, either due to network problems or due to Oracle reaching the IDLE_TIME profile limit.
Your application however tried to use the connection, but as the connection has closed, failed to do so.
This error mostly happens when using connection pools. Normally, when a connection is timed out or gone, the application should automatically reconnect.
Failure to do so results in this error.
经查,oracle后台以及alert.log没有任何异常,也不应该是oracle jdbc驱动的问题,trace文件也没有异常。
看了下mycat.log,13:00之后,心跳就没发了,如下:

重启mycat之后,应用没有重启,再次运行,就没有这个问题了。之前也是,mycat经常遇到各种奇葩问题,因为我们是两台虚拟机,不排除网络不稳定,但是都没有解决方案。看下用的是dataHost的连接数都很大,应该不是这个问题,只有三个心跳日志是因为配置了三个dataHost。
不过我们已经打算切换sharding-jdbc了。
参考:
https://blog.csdn.net/liduote/article/details/70227040
https://blog.csdn.net/sinat_33517300/article/details/78968181
http://www.iteye.com/problems/38600
https://blog.csdn.net/xiaopeng187/article/details/25797885
mycat->oracle报java.sql.SQLException: 无法从套接字读取更多的数据的更多相关文章
- sql查询报java.sql.SQLException: Column 'LC_ID' not found 的错误实际上是mysql在hibernate别名的问题
报java.sql.SQLException: Column 'LC_ID' not found 的错误实际上是mysql在hibernate别名的问题 我的查询sql是 String sql2 =& ...
- java.sql.SQLException:连接是只读的。不允许导致数据修改的查询
我的项目中 service的实现类少了写一个注解 : 只读事务(@Transactional(readOnly = true) 应用场合: 如果你一次执行单条查询语句,则没有必要启用事务支持,数据 ...
- java程序连接oracle12c报:java.sql.SQLException: ORA-28040: 没有匹配的验证协议。
报错信息: 2017-09-22 15:17:37,204 WARN [org.hibernate.cfg.SettingsFactory] - Could not obtain connection ...
- spring+ibatis问题1—— 程序报错:java.sql.SQLException: Io 异常: Connection reset by peer, socket write error; ”或“java.sql.SQLException 关闭的连接”异常
转自:http://blog.sina.com.cn/s/blog_1549fb0710102whz2.html spring+ibatis程序测试时报错:java.sql.SQLException: ...
- java.sql.SQLException: Io 异常: Connection reset
当数据库连接池中的连接被创建而长时间不使用的情况下,该连接会自动回收并失效,但客户端并不知道,在进行数据库操作时仍然使用的是无效的数据库连接,这样,就导致客户端程序报“ java.sql.SQLExc ...
- 解决java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone
使用spring boot整合MySQL时一直报 java.sql.SQLException: The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecog ...
- java.sql.SQLException: Incorrect string value: '\xE5\xB0‘
mysql插入中文字符报java.sql.SQLException: Incorrect string value: '\xE5\xB0‘ #原因:由于默认情况下,mysql的字符集是latin1(I ...
- java之java.sql.SQLException: ResultSet is from UPDATE. No Data.
问题解释:java调用存储过程的时候,查询结果不能通过ResultSet来查询,需要通过CallableStatement来查询, 比如: ResultSet rs = callableStateme ...
- java.sql.SQLException: Field 'id' doesn't have a default value解决方案
转自:https://blog.csdn.net/xinghuo0007/article/details/51810867 自增长:java.sql.SQLException: Field 'id' ...
随机推荐
- 利用TensorFlow实现线性回归模型
准备数据: import numpy as np import tensorflow as tf import matplotlib.pylot as plt # 随机生成1000个点,围绕在y=0. ...
- vue中连续点击3次且时间间隔不超过3秒,才显示div(刚开始隐藏的)
num:0,//点击次数timer0:'',//第一次点击的时间timer4:'',//第四次点击的时间centerDialogVisible: false // 连续4次点击显示模态框 change ...
- spring 对jdbc的简化
spring.xml <!-- 加载属性配置文件 --> <util:properties id="db" location="classpath:db ...
- efcore从数据库快速生成实体及context
有些项目开发时先建立数据库,再用codefirst来书写entity和EntityConfiguration,比较耗费功夫. 1.在vs2017中新建个asp.net core的web项目,或者其他项 ...
- SVN—使用总结
SVN使用教程总结 为什么要使用SVN? 在程序的编写过程中,每个程序员都会负责开发一个或多个模块,且开发中会生成很多不同的版本, 这就需要程序员有效的管理代码,在需要的时候可以迅速,准确取出相应的版 ...
- ruby中的alias和alias_method
ruby中的alias和alias_method都可以重命名一个方法,它们的区别如下: 1.alias是ruby的一个关键字,因此使用的时候是alias :newname :oldname alias ...
- java字符串转换总结
1.byte[]转String String str = new String(strByte); 2.String转byte[] byte[] byteArr = str.getBytes(); 3 ...
- git server 配置
因为后面要采用Git代替Subversion,花了点时间配置了Git服务端和客户端,像以前一样,仍然基于最新的Ubuntu11.10 server/desktop系统. 感谢这几篇文章的作者: htt ...
- html5-移动端布局模板
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8&qu ...
- quick-cocos2d-x 游戏开发之一】开发工具sublime text及其强力插件QuickXDev
http://blog.csdn.net/yihaiyiren/article/details/17220927