0
点赞
收藏
分享

微信扫一扫

Zookeeper 使用中出现的错误排查

小桥流水2016 2022-04-03 阅读 76

Zookeeper 使用中出现的错误排查

启动

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

错误日志-01

2022-04-03 16:00:12.139 ERROR 21600 --- [p-nio-80-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://payment-service/payment/zk": connect timed out; nested exception is java.net.SocketTimeoutException: connect timed out] with root cause

java.net.SocketTimeoutException: connect timed out

在这里插入图片描述

解决方案如下:

  1. 查看 linux 服务器上防火墙是否关闭,或者开放该 2181 端口
  2. 如在虚拟机安装的zookeeper,查看本机是否能ping通 linux 服务器IP和端口,cmd命令:telnet 192.168.15.130 2181
  3. 如win10本机有防火墙,检查是否关闭防火墙,或者防火墙开放端口
  4. 如使用 RestTemplate 作为客户端访问zookeeper服务,确认是否已在RestTemplate配置类上添加注解:@LoadBalanced
举报

相关推荐

0 条评论