nacos 报错排查

报错内容 

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'memoryMonitor' defined in URL [jar:file:/home/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-config-2.2.3.jar!/com/alibaba/nacos/config/server/monitor/MemoryMonitor.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'asyncNotifyService': Unsatisfied dependency expressed through field 'dumpService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalDumpService': Invocation of init method failed; nested exception is ErrCode:500, ErrMsg:Nacos Server did not start because dumpservice bean construction failure :
docker-nacos-1  | No DataSource set

排查步骤:

  1.查看mysql服务是否正常 navicat工具正常连接,但telnet 显示 telnet: connect to address xxxxx:3306: Connection refused

  2.防火墙端口是否有问题(这个报错是频率性报错,一会好了一会坏了。所以排除这个可能)

  3.查看mysql最大连接数,以及正在连接的数量。

经过以上排查得出,mysql连接数达到了连接的极限。导致拒绝连接

查询当前连接数

SHOW STATUS WHERE `variable_name` = 'Threads_connected';

连接详情
SELECT * FROM information_schema.PROCESSLIST;

显示自 MySQL 服务器启动以来同时使用的最大连接数
SHOW GLOBAL STATUS LIKE 'Max_used_connections';
允许最大连接数
SHOW VARIABLES LIKE 'max_connections';

以下俩个设置超过时间杀掉连接

SET GLOBAL wait_timeout=300; -- 非交互连接空闲超时时间设置为300秒 (5分钟)

SET GLOBAL interactive_timeout=300; -- 交互式连接空闲超时时间设置为300秒 (5分钟)






SET GLOBAL wait_timeout=600;
SET GLOBAL interactive_timeout=600;

posted @   z-double  阅读(61)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
历史上的今天:
2024-01-03 idea 快捷键(eclipse版设置)
点击右上角即可分享
微信分享提示