由于某种原因,今天重启了服务器,然后悲剧了:nacos无法启动了。
看日志(start.out):
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'memoryMonitor' defined in URL [jar:file:/usr/local/QLM-Run/QLM-Base/qlm-nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-config-2.2.0.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 :
No DataSource set
意思就是没有设置数据库链接。头脑里第一反映,昨天还正常运行,今天就没有配置了?
检查application.properties,果然没有错!
那就是Mysql出问题了?打开Navicat试试,毫无问题。
见鬼了,只好网上搜素了,没抱希望,就想有枣没枣打一杆看看。果然是毫无进展,所有都是一口笃定配置错了或者网络问题或者mysql问题。
关键问题,还的自力更生。
登录服务器使用telnet链接mysql看看,果然有信息提示:
Escape character is '^]'.
kHost '101.201.35.41' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'Connection closed by foreign host.
由于某种原因,服务器端阻塞了客户端。问题清楚了,解决就是一句sql的事,服务器上执行FLUSH HOSTS;问题排除。
nacos开发者:能不能把数据库的返回原样输出下?不要笼统给出包罗万象的提示“No DataSource set”,这也太坑爹了。
另:数据库链接配置中超时加大些,估计是超时太短诱发的阻塞。
3121

被折叠的 条评论
为什么被折叠?



