Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

升级到3.2.8后,每隔4分钟会自动断开连接并报错(Triple协议) #13375

Closed
ldcsaa opened this issue Nov 16, 2023 · 2 comments
Closed
Labels
type/bug Bugs to being fixed

Comments

@ldcsaa
Copy link

ldcsaa commented Nov 16, 2023

Dubbo consumer 与 provider 之间以 Triple 协议连接。不做任何操作,每隔4分钟会自动断开连接并报错。
注:3.2.7 版本不会报错,3.2.8 版本换成 dubbo 协议也不会报错。

provider dubbo 配置:

# dubbo
dubbo.protocols:
  #dubbo:
  #  name: dubbo
  #  port: 5006
  tri:
    name: tri
    port: 6006

consumer 日志

2023-11-16 10:54:34.698 INFO  [NettyClientWorker-4-3] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50806 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 10:58:35.710 INFO  [NettyClientWorker-4-4] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50904 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:02:36.720 INFO  [NettyClientWorker-4-5] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50993 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:06:37.729 INFO  [NettyClientWorker-4-6] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51122 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:10:38.740 INFO  [NettyClientWorker-4-7] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51229 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:14:39.750 INFO  [NettyClientWorker-4-8] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51318 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:18:40.760 INFO  [NettyClientWorker-4-9] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51446 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:22:41.770 INFO  [NettyClientWorker-4-10] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51557 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:26:42.785 INFO  [NettyClientWorker-4-11] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51709 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:30:43.802 INFO  [NettyClientWorker-4-12] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51791 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1

provider 日志:

2023-11-16 10:54:33.696 INFO  [NettyServerWorker-3-2] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50353 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 10:54:33.698 WARN  [NettyServerWorker-3-2] o.a.d.common.logger.log4j2.Log4j2Logger#warn(L:76) ->  [DUBBO] All clients has disconnected from /192.168.56.1:6006. You can graceful shutdown now., dubbo version: 3.2.8, current host: 192.168.56.1, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. 
2023-11-16 10:54:33.704 INFO  [NettyServerWorker-3-2] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50353 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 10:54:34.697 INFO  [NettyServerWorker-3-3] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50806 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 10:58:34.706 INFO  [NettyServerWorker-3-3] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50806 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 10:58:34.708 WARN  [NettyServerWorker-3-3] o.a.d.common.logger.log4j2.Log4j2Logger#warn(L:76) ->  [DUBBO] All clients has disconnected from /192.168.56.1:6006. You can graceful shutdown now., dubbo version: 3.2.8, current host: 192.168.56.1, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. 
2023-11-16 10:58:34.710 INFO  [NettyServerWorker-3-3] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50806 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 10:58:35.709 INFO  [NettyServerWorker-3-4] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50904 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:02:35.717 INFO  [NettyServerWorker-3-4] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50904 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:02:35.719 WARN  [NettyServerWorker-3-4] o.a.d.common.logger.log4j2.Log4j2Logger#warn(L:76) ->  [DUBBO] All clients has disconnected from /192.168.56.1:6006. You can graceful shutdown now., dubbo version: 3.2.8, current host: 192.168.56.1, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. 
2023-11-16 11:02:35.722 INFO  [NettyServerWorker-3-4] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50904 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:02:36.720 INFO  [NettyServerWorker-3-5] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50993 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:06:36.728 INFO  [NettyServerWorker-3-5] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50993 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:06:36.731 WARN  [NettyServerWorker-3-5] o.a.d.common.logger.log4j2.Log4j2Logger#warn(L:76) ->  [DUBBO] All clients has disconnected from /192.168.56.1:6006. You can graceful shutdown now., dubbo version: 3.2.8, current host: 192.168.56.1, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. 
2023-11-16 11:06:36.733 INFO  [NettyServerWorker-3-5] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:50993 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:06:37.729 INFO  [NettyServerWorker-3-6] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51122 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:10:37.737 INFO  [NettyServerWorker-3-6] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51122 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:10:37.739 WARN  [NettyServerWorker-3-6] o.a.d.common.logger.log4j2.Log4j2Logger#warn(L:76) ->  [DUBBO] All clients has disconnected from /192.168.56.1:6006. You can graceful shutdown now., dubbo version: 3.2.8, current host: 192.168.56.1, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. 
2023-11-16 11:10:37.741 INFO  [NettyServerWorker-3-6] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51122 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:10:38.741 INFO  [NettyServerWorker-3-7] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51229 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:14:38.748 INFO  [NettyServerWorker-3-7] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51229 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:14:38.751 WARN  [NettyServerWorker-3-7] o.a.d.common.logger.log4j2.Log4j2Logger#warn(L:76) ->  [DUBBO] All clients has disconnected from /192.168.56.1:6006. You can graceful shutdown now., dubbo version: 3.2.8, current host: 192.168.56.1, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. 
2023-11-16 11:14:38.753 INFO  [NettyServerWorker-3-7] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51229 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:14:39.750 INFO  [NettyServerWorker-3-8] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51318 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:18:39.756 INFO  [NettyServerWorker-3-8] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51318 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:18:39.759 WARN  [NettyServerWorker-3-8] o.a.d.common.logger.log4j2.Log4j2Logger#warn(L:76) ->  [DUBBO] All clients has disconnected from /192.168.56.1:6006. You can graceful shutdown now., dubbo version: 3.2.8, current host: 192.168.56.1, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. 
2023-11-16 11:18:39.761 INFO  [NettyServerWorker-3-8] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51318 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:18:40.760 INFO  [NettyServerWorker-3-9] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51446 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:22:40.768 INFO  [NettyServerWorker-3-9] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51446 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:22:40.771 WARN  [NettyServerWorker-3-9] o.a.d.common.logger.log4j2.Log4j2Logger#warn(L:76) ->  [DUBBO] All clients has disconnected from /192.168.56.1:6006. You can graceful shutdown now., dubbo version: 3.2.8, current host: 192.168.56.1, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. 
2023-11-16 11:22:40.773 INFO  [NettyServerWorker-3-9] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51446 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:22:41.770 INFO  [NettyServerWorker-3-10] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51557 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:26:41.778 INFO  [NettyServerWorker-3-10] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51557 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:26:41.780 WARN  [NettyServerWorker-3-10] o.a.d.common.logger.log4j2.Log4j2Logger#warn(L:76) ->  [DUBBO] All clients has disconnected from /192.168.56.1:6006. You can graceful shutdown now., dubbo version: 3.2.8, current host: 192.168.56.1, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. 
2023-11-16 11:26:41.782 INFO  [NettyServerWorker-3-10] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51557 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:26:42.785 INFO  [NettyServerWorker-3-11] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51709 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:30:42.795 INFO  [NettyServerWorker-3-11] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51709 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:30:42.799 WARN  [NettyServerWorker-3-11] o.a.d.common.logger.log4j2.Log4j2Logger#warn(L:76) ->  [DUBBO] All clients has disconnected from /192.168.56.1:6006. You can graceful shutdown now., dubbo version: 3.2.8, current host: 192.168.56.1, error code: 99-0. This may be caused by unknown error in remoting module, go to https://dubbo.apache.org/faq/99/0 to find instructions. 
2023-11-16 11:30:42.801 INFO  [NettyServerWorker-3-11] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51709 -> /192.168.56.1:6006 is disconnected., dubbo version: 3.2.8, current host: 192.168.56.1
2023-11-16 11:30:43.799 INFO  [NettyServerWorker-3-12] o.a.d.common.logger.log4j2.Log4j2Logger#info(L:61) ->  [DUBBO] The connection of /192.168.56.1:51791 -> /192.168.56.1:6006 is established., dubbo version: 3.2.8, current host: 192.168.56.1

Environment

  • Dubbo version: 3.2.8
  • Operating System version: win10
  • Java version: jdk17

Steps to reproduce this issue

  1. 启动 dubbo provider
  2. 启动 dubbo consumer
  3. 不做任何操作,等待报错日志

Expected Behavior

不报错

Actual Behavior

报错

@ldcsaa ldcsaa added the type/bug Bugs to being fixed label Nov 16, 2023
@ldcsaa ldcsaa changed the title 升级到3.2.8后,每隔4分钟会自动断开连接并报错。 升级到3.2.8后,每隔4分钟会自动断开连接并报错(Triple协议) Nov 16, 2023
@AlbumenJ
Copy link
Member

@icodening @EarthChen PTAL

@icodening
Copy link
Contributor

看代码后发现问题所在。

handlers.add(new ChannelHandlerPretender(new Http2MultiplexHandler(new ChannelDuplexHandler())));
handlers.add(new ChannelHandlerPretender(new TripleGoAwayHandler()));//此handler没有将PingAck传递给TriplePingPongHandler导致连接被关闭
handlers.add(new ChannelHandlerPretender(new TriplePingPongHandler(UrlUtils.getCloseTimeout(url))));
handlers.add(new ChannelHandlerPretender(new TripleTailHandler()));

以下是TripleGoAwayHandler的源码,并没有将Ping Ack传递给后续handler处理

@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
    if (msg instanceof Http2GoAwayFrame) {
        final ConnectionHandler connectionHandler = (ConnectionHandler) ctx.pipeline().get(Constants.CONNECTION_HANDLER_NAME);
        if (logger.isInfoEnabled()) {
            logger.info("Receive go away frame of " + ctx.channel().localAddress() + " -> " + ctx.channel().remoteAddress() + " and will reconnect later.");
        }
        connectionHandler.onGoAway(ctx.channel());
    }
    ReferenceCountUtil.release(msg);
}

@icodening icodening mentioned this issue Nov 16, 2023
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bugs to being fixed
Projects
None yet
Development

No branches or pull requests

4 participants