Open linuke opened 7 years ago
有一定的几率出现这种情况
这个是select user()的返回啊。。。
实际使用中是使用count的时候,有时会出现这个错误,项目中没使用select user() ,mycat心跳使用的是select user()
这是哪个版本的?
最新版本,java程序压测1000的并发有时会出现这个问题,
1.6.5-beta 版本?mycat 后台日志有什么信息吗?
后台没错误日志
2017-08-18 21:13:31.092 WARN [$_NIOREACTOR-3-RW] (io.mycat.backend.mysql.nio.MySQLConnection.release(MySQLConnection.java:560)) - can't sure connection syn result,so close it MySQLConnection [id=18159, lastTime=1503062011086, user=mycat, schema=hermes_order, old shema=public_center, borrowed=true, fromSlaveDB=false, threadId=2053707, charset=utf8, txIsolation=3, autocommit=true, attachment=null, respHandler=SingleNodeHandler [node=hermes_order_dn{select count(1) from os_order}, packetId=4], host=10.168.41.51, port=15381, statusSync=io.mycat.backend.mysql.nio.MySQLConnection$StatusSync@744c9105, writeQueue=0, modifiedSQLExecuted=false] 2017-08-18 21:13:31.092 INFO [$_NIOREACTOR-3-RW] (io.mycat.net.AbstractConnection.close(AbstractConnection.java:514)) - close connection,reason:syn status unkown ,MySQLConnection [id=18159, lastTime=1503062011086, user=mycat, schema=hermes_order, old shema=public_center, borrowed=true, fromSlaveDB=false, threadId=2053707, charset=utf8, txIsolation=3, autocommit=true, attachment=null, respHandler=null, host=10.168.41.51, port=15381, statusSync=io.mycat.backend.mysql.nio.MySQLConnection$StatusSync@744c9105, writeQueue=0, modifiedSQLExecuted=false]
发生错误时mycat日志
我也遇到了同样的问题(最新版本),最后是怎样解决的?
未解决,最后换sharding-jdbc了,感觉mycat已死,无人维护了
org.springframework.dao.TransientDataAccessResourceException: Error attempting to get column 'user()' from result set. Cause: java.sql.SQLException: Invalid value for getInt() - 'mycat@10.47.101.137' ; SQL []; Invalid value for getInt() - 'mycat@10.47.101.137'; nested exception is java.sql.SQLException: Invalid value for getInt() - 'mycat@10.47.101.137' at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:108) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447) at com.sun.proxy.$Proxy23.selectOne(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:167) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:82) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53) at com.sun.proxy.$Proxy63.countInServiceOrder(Unknown Source)