windghost817 2018-12-12 07:03 采纳率: 71.4%
浏览 2884
已采纳

什么情况会造成dubbo链接中断?

一个手动调用的dubbo服务,调用后,服务端正常执行完了。但是客户端没有接受到任何返回信息。
检查日志后
服务端:
2018-12-12 02:51:26 [org.I0Itec.zkclient.ZkClient]-[DEBUG] Received event: WatchedEvent state:Disconnected type:None path:null
2018-12-12 02:51:26 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] New event: ZkEvent[State changed to Disconnected sent to com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient$1@28ce7d23]
2018-12-12 02:51:26 [org.I0Itec.zkclient.ZkClient]-[DEBUG] Leaving process event
2018-12-12 02:51:26 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] Delivering event #1 ZkEvent[State changed to Disconnected sent to com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient$1@28ce7d23]
2018-12-12 02:51:26 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] Delivering event #1 done
2018-12-12 02:51:46 [org.I0Itec.zkclient.ZkClient]-[DEBUG] Received event: WatchedEvent state:Expired type:None path:null
2018-12-12 02:51:46 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] New event: ZkEvent[State changed to Expired sent to com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient$1@28ce7d23]
2018-12-12 02:51:46 [org.I0Itec.zkclient.ZkConnection]-[DEBUG] Closing ZooKeeper connected to 10.1.10.91:2181,10.1.10.92:2181,10.1.10.93:2181
2018-12-12 02:51:46 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] Delivering event #2 ZkEvent[State changed to Expired sent to com.alibaba.dubbo.remoting.zookeeper.zkclient.ZkclientZookeeperClient$1@28ce7d23]
2018-12-12 02:51:46 [org.I0Itec.zkclient.ZkEventThread]-[DEBUG] Delivering event #2 done
2018-12-12 02:51:46 [org.apache.zookeeper.ZooKeeper]-[DEBUG] Close called on already closed client

zk日志:
2018-12-12 02:51:46,630 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /10.1.10.47:47124
2018-12-12 02:51:46,637 [myid:1] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@896] - Connection request from old client /10.1.10.47:47124; will be dropped if server is in r-o mode
2018-12-12 02:51:46,638 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@935] - Client attempting to renew session 0x365ee3f0f34002c at /10.1.10.47:47124
2018-12-12 02:51:46,638 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:Learner@108] - Revalidating client: 0x365ee3f0f34002c
2018-12-12 02:51:46,639 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer@680] - Invalid session 0x365ee3f0f34002c for client /10.1.10.47:47124, probably expired
2018-12-12 02:51:46,640 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1044] - Closed socket connection for client /10.1.10.47:47124 which had sessionid 0x365ee3f0f34002c
2018-12-12 02:52:23,235 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /10.1.10.47:47284
2018-12-12 02:52:23,236 [myid:1] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@896] - Connection request from old client /10.1.10.47:47284; will be dropped if server is in r-o mode
2018-12-12 02:52:23,238 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@942] - Client attempting to establish new session at /10.1.10.47:47284
2018-12-12 02:52:23,244 [myid:1] - INFO [CommitProcessor:1:ZooKeeperServer@687] - Established session 0x165ee402a7d003d with negotiated timeout 30000 for client /10.1.10.47:47284


服务端的方法是一个多线程方法,执行期间没有任何报错,想请教大神们一下,什么情况下才会造成dubbo链接的中断?通常这种问题要怎么调整?


zkserver端日志
2018-12-12 02:51:46,630 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket connection from /10.1.10.47:47124
2018-12-12 02:51:46,637 [myid:1] - WARN [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@896] - Connection request from old client /10.1.10.47:47124; will be dropped if server is in r-o mode
2018-12-12 02:51:46,638 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:ZooKeeperServer@935] - Client attempting to renew session 0x365ee3f0f34002c at /10.1.10.47:47124
2018-12-12 02:51:46,638 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:Learner@108] - Revalidating client: 0x365ee3f0f34002c
2018-12-12 02:51:46,639 [myid:1] - INFO [QuorumPeer[myid=1]/0:0:0:0:0:0:0:0:2181:ZooKeeperServer@680] - Invalid session 0x365ee3f0f34002c for client /10.1.10.47:47124, probably expired
2018-12-12 02:51:46,640 [myid:1] - INFO [NIOServerCxn.Factory:0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1044] - Closed socket connection for client /10.1.10.47:47124 which had sessionid 0x365ee3f0f34002c

  • 写回答

3条回答 默认 最新

  • October- 2019-01-30 17:59
    关注

    多种原因吧
    (1)同步调用,服务端超时
    (2)服务端意外停止服务
    (3)worker线程池爆池了
    (4)服务端限流,导致有些请求无法完成
    (5)服务端执行过程中遇到死锁,尤其是数据库死锁。
    (6)如果是远程服务,网络波动的概率还是很大的。
    等等吧,

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 curl 命令调用正常,程序调用报 java.net.ConnectException: connection refused
  • ¥20 关于web前端如何播放二次加密m3u8视频的问题
  • ¥15 使用百度地图api 位置函数报错?
  • ¥15 metamask如何添加TRON自定义网络
  • ¥66 关于川崎机器人调速问题
  • ¥15 winFrom界面无法打开
  • ¥30 crossover21 ARM64版本安装软件问题
  • ¥15 mymetaobjecthandler没有进入
  • ¥15 mmo能不能做客户端怪物
  • ¥15 osm下载到arcgis出错