iJIAJIA commented on issue #12344:
URL: https://github.com/apache/dubbo/issues/12344#issuecomment-1818369252

   @AlbumenJ 
   我们也碰到这个问题. 
   
   具体原因已经定位到了:
   triple协议调用超时, 
主要是首次连接请求时org.apache.dubbo.remoting.transport.netty4.NettyPortUnificationServerHandler#decode
   进行协议检测的逻辑问题.
   WirProtocol目前有4个实现, 其中 
GrpcHttp2Protocol和TriHttp2Protocol都使用的Http2ProtocolDetector 进行的协议检测.
   dubbo进行spi加载时, GrpcHttp2Protocol先于TriHttp2Protocol, 
故所有tri协议都会被识别为GrpcHttp2Protocol.
   
   NettyPortUnificationServerHandler在识别到协议后, 会基于实际的协议重新构造localUrl,  
   `java
   // 这里因为获取到的protocolName是grpc,  故返回的是默认的url, 即dubbo://
   URL localURL = this.urlMapper.getOrDefault(protocolName, url);
   `
   后续在执行NettyConfigOperator时, 会因为是dubbo协议, 多了两个dubbo的ChannelHandler.
   
![image](https://github.com/apache/dubbo/assets/10057108/2ad73596-d3ce-43b4-94cb-c6ba06b4f04f)
   
   


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

To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to