You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2019/07/25 01:56:11 UTC

[GitHub] [dubbo-js] wushanchao commented on issue #80: Node进程会偶尔与zk集群断开连接,导致socket无可用agent

wushanchao commented on issue #80: Node进程会偶尔与zk集群断开连接,导致socket无可用agent
URL: https://github.com/apache/dubbo-js/issues/80#issuecomment-514863518
 
 
   > 发现一个 "似乎是" 的复现步骤。
   > 
   > 首先在本地启动一个可以运行的实例:
   > 
   > ```shell
   > # start docker
   > $ docker-compose up 
   > # start providers
   > $ java -jar target/dubbo-demo-provider-2.6.3-jar-with-dependencies.jar
   > # start example/hello-koa
   > $ npm run debug:start
   > ```
   > 
   > 详细的启动步骤参考 [for-contributors](https://github.com/apache/dubbo-js#for-contributors)
   > 
   > 在复现问题前,确保实例已经运行起来:
   > 
   > ```shell
   > curl http://localhost:3000/hello
   > ```
   > 
   > 如果看到 `Hello World` 的话,则可以开始复现问题
   > 
   > 第一步,手动删除 `/dubbo` 节点
   > 
   > ```shell
   > ```bash
   > # replace below port according your env
   > zkcli -server localhost:2182
   > # check what's in our ZK
   > ls /
   > # delete node `/dubbo`
   > rmr /dubbo/com.alibaba.dubbo.demo.BasicTypeProvider/consumers
   > rmr /dubbo/com.alibaba.dubbo.demo.ErrorProvider
   > rmr /dubbo
   > # check `/dubbo` has been deleted if it isn't in the output of below command
   > ls /
   > ```
   > 
   > 第二步,停止 java providers,可以 `kill -9 pid` 或 `CTRL+C`
   > 第三步,启动 java providers,启动命令和之前的一样
   > 
   > 此时再次通过:
   > 
   > ```shell
   > curl http://localhost:3000/hello
   > ```
   > 
   > 会得到输出:
   > 
   > ```
   > uuid:  invoke com.alibaba.dubbo.demo.DemoProvider#sayHello was error, Zookeeper Can not be find any agents
   > ```
   > 
   > 根据输出发现,node 和 ZK 之间的连接是通的,但是无法连接到 java providers
   > 
   > 此时重启 node,然后再次运行上面的 curl 命令,会发现 node 可以连接到 java providers,故障已经排除
   > 
   > 虽然上述复现步骤的报错信息和前面的 issue 中的 log 内容不同,不过不能排除前面的 log 有可能和问题并不对应,又或者该复现步骤反应了新的问题
   
   操作系统 : Centos7.2
   Node : 10.16.0
   Dubbo2.js : 2.3.9
   
   我本机可重现你的问题。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org