apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.3k stars 26.38k forks source link

Why does the console always appear ‘All clients has disconnected from....’ #11121

Open q920447939 opened 1 year ago

q920447939 commented 1 year ago

Dubbo version : 3.1.3

consumer console log :

 [WARN ] [NettyServerWorker-5-4]    2022-12-12 16:33:34.472  org.apache.dubbo.remoting.transport.AbstractServer[] -  [DUBBO] All clients has disconnected from /172.18.13.33:20882. You can graceful shutdown now., dubbo version: 3.1.3, current host: 172.18.13.33, error code: 6-4. This may be caused by , go to https://dubbo.apache.org/faq/6/4 to find instructions. 

 [INFO ] [NettyServerWorker-5-4]    2022-12-12 16:33:34.473  org.apache.dubbo.remoting.transport.netty4.NettyServerHandler[90] -  [DUBBO] The connection of /172.18.200.166:46124 -> /172.18.13.33:20882 is disconnected., dubbo version: 3.1.3, current host: 172.18.13.33

 [INFO ] [NettyServerWorker-5-5]    2022-12-12 16:33:45.477  org.apache.dubbo.remoting.transport.netty4.NettyServerHandler[75] -  [DUBBO] The connection of /172.18.200.166:46128 -> /172.18.13.33:20882 is established., dubbo version: 3.1.3, current host: 172.18.13.33

consumer application yaml config

dubbo:
  registry:
    protocol: zookeeper
    address: 172.18.200.57:2181
    timeout: 250000
    parameters:
      blockUnitConnectedWait: 250
  protocol:
    name: dubbo
    port: 20882
  config-center:
    timeout: 10000

provider config:

dubbo:
  registry:
    protocol: zookeeper
    address: 172.18.200.57:2181
    timeout: 250000
    parameters:
      blockUnitConnectedWait: 250
  protocol:
    host:  172.18.200.166  // because 166 server has Multiple network, use special ip 

provider log:

port.netty4.NettyServerHandler[90] -  [DUBBO] The connection of /172.18.13.33:58987 -> /172.18.200.166:20881 is disconnected., dubbo version: 3.1.3, current host: 192.168.20.231
port.netty4.NettyServerHandler[75] -  [DUBBO] The connection of /172.18.13.33:59027 -> /172.18.200.166:20881 is established., dubbo version: 3.1.3, current host: 192.168.20.231
port.netty4.NettyServerHandler[90] -  [DUBBO] The connection of /172.18.13.33:59027 -> /172.18.200.166:20881 is disconnected., dubbo version: 3.1.3, current host: 192.168.20.231
port.netty4.NettyServerHandler[75] -  [DUBBO] The connection of /172.18.13.33:59028 -> /172.18.200.166:20881 is established., dubbo version: 3.1.3, current host: 192.168.20.231
port.netty4.NettyServerHandler[90] -  [DUBBO] The connection of /172.18.13.33:59028 -> /172.18.200.166:20881 is disconnected., dubbo version: 3.1.3, current host: 192.168.20.231

172.18.13.33 is my machine IP(that is consumer )

AlbumenJ commented 1 year ago

This can indicate that all consumer for this provider has been shutdown, which means no one can request current server.

q920447939 commented 1 year ago

This can indicate that all consumer for this provider has been shutdown, which means no one can request current server.

But the consumer server keeps running。 Although it does not affect calling,But I feel that this will generate frequent socket connections

AlbumenJ commented 1 year ago

This can indicate that all consumer for this provider has been shutdown, which means no one can request current server.

But the consumer server keeps running。 Although it does not affect calling,But I feel that this will generate frequent socket connections

If the consumer keep running, provider should not print connection closed message except connection lose, which may be caused by heartbeat failed or registry push.

pengten commented 1 year ago

I have the same question, server keeps running

AlbumenJ commented 1 year ago

If we need to optimize this problem, we can print after offline or shutdownhook is triggered.

KeroZhai commented 5 months ago

Same here. The consumer keeps disconnecting and reconnecting about every 3 minutes. Any help?

chenliang7558 commented 1 month ago

I have the same question