dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [dubbo-js] hsiaosiyuan0 commented on issue #80: Node进程会偶尔与zk集群断开连接,导致socket无可用agent
Date Wed, 12 Jun 2019 19:19:26 GMT
hsiaosiyuan0 commented on issue #80: Node进程会偶尔与zk集群断开连接,导致socket无可用agent
URL: https://github.com/apache/dubbo-js/issues/80#issuecomment-501419654
 
 
   发现一个 "似乎是" 的复现步骤。
   
   首先在本地启动一个可以运行的实例:
   
   ```bash
   # 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)
   
   在复现问题前,确保实例已经运行起来:
   
   ```bash
   curl http://localhost:3000/hello
   ```
   
   如果看到 `Hello World` 的话,则可以开始复现问题
   
   第一步,手动删除 `/dubbo` 节点
   
   ```bash
   ```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,启动命令和之前的一样
   
   此时再次通过:
   
   ```bash
   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,故障已经排除
   
   

----------------------------------------------------------------
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


Mime
View raw message