为了账号安全,请及时绑定邮箱和手机立即绑定

连接被 MaxScale 终止:路由器无法从连接错误中恢复

连接被 MaxScale 终止:路由器无法从连接错误中恢复

临摹微笑 2021-09-12 20:24:26
请帮忙。我已经使用maxscale了一个月,但今天发生了一些事情。它不起作用。然后我看到了以下错误:这是我来自 Spring Boot 错误日志的错误日志:org.springframework.dao.DataAccessResourceFailureException:### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Connection killed by MaxScale: Router could not recover from connection errors### The error may exist in com/gop/exchange/mapper/MatchResultMapper.xml### The error may involve defaultParameterMap### The error occurred while setting parameters### SQL: select max(price)   maxPrice ,min(price) minPrice ,sum(number) amount   ,max(id)   closeid,min(id) openid from match_result_udc_iep where   create_time   >=   ?   and create_time < ?### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Connection killed by MaxScale: Router could not recover from connection errors; SQL []; Connection killed by MaxScale: Router could not recover from connection errors; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Connection killed by MaxScale: Router could not recover from connection errors        at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.doTranslate(SQLExceptionSubclassTranslator.java:79) ~[spring-jdbc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) ~[spring-jdbc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]我的 maxscale 版本:2.2.12 我的 maxscale 版本 maxscale 配置是:[maxscale]threads=auto[server1]type=serveraddress=192.168.133.15port=3306protocol=MySQLBackend[server2]type=serveraddress=192.168.133.16port=3306protocol=MySQLBackend
查看完整描述

2 回答

?
慕容3067478

TA贡献1773条经验 获得超3个赞

错误消息Connection killed by MaxScale: Router could not recover from connection errors告诉我们读写分离路由器遇到了无法恢复的网络连接错误。大多数情况下,这意味着与主服务器的连接丢失。

查看中的 MaxScale 日志文件/var/log/maxscale/maxscale.log,查看客户端错误时是否存在与 MaxScale 中配置的服务器相关的任何错误。如果错误与超时有关,将backend_connect_timeoutbackend_read_timeout增加到更高的值可能会解决它。


查看完整回答
反对 回复 2021-09-12
  • 2 回答
  • 0 关注
  • 731 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信