You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/11/28 11:04:09 UTC

[GitHub] [dubbo] twz007 opened a new issue, #11044: in mesh mode with triple protocol, remoteApplicationName is null

twz007 opened a new issue, #11044:
URL: https://github.com/apache/dubbo/issues/11044

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.1.1
   * Operating System version: k8s
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1. 启动生产者消费者,消费者开启mesh,默认tri协议调用生产者,定位到消费者发送端代码org.apache.dubbo.rpc.protocol.tri.call.TripleClientCall#sendMessage
   └── requestMetadata.toHeaders()
   &nbsp;└── StreamUtils.convertAttachment(header, attachments) 
   &nbsp;&nbsp;└──TripleHeaderEnum.containsExcludeAttachments(key) 
   &nbsp;&nbsp;&nbsp;└── excludeAttachmentsSet.contains(key)
   上述代码会直接过滤掉 `remote.application` 这个key,在consumer端取而代之发送的是`CONSUMER_APP_NAME_KEY("tri-consumer-appname")`,以上看起来没有问题
   2. 回到提供者,定位接受消息处代码
   org.apache.dubbo.rpc.protocol.tri.call.AbstractServerCallListener#invoke
   ![provider_20221128183754](https://user-images.githubusercontent.com/26647353/204257589-da1a1bf2-3902-4204-b82d-24e0d0b765fd.png)
   上面成功设置了remoteApplicationName。
   之后定位到
   org.apache.dubbo.rpc.filter.ContextFilter#invoke
   ![provider_20221128184758](https://user-images.githubusercontent.com/26647353/204259160-f70db50e-dd31-4670-89b4-306f4708fa14.png)
   此时还能获取到remoteApplicationName,执行完后
   ![provider_20221128185037](https://user-images.githubusercontent.com/26647353/204259712-10aee375-495d-444e-8a37-ea5e7c2e01db.png)
   可见已无法获取到remoteApplicationName。
   4. 总结下,消费者使用`tri-consumer-appname`代替 `remote.application` 发送到provider端,provider端成功解析`remoteApplicationName`,但是在最高优先级的`ContextFilter`中重新被设置成了null,而这个null是因为读取的是消费者不传的`remote.application` .
   5. 所以现在现象是提供者后续都无法获取到remoteApplicationName.
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Behavior
   正常获取remoteApplicationName
   <!-- What do you expect from the above steps?-->
   
   ### Actual Behavior
   获取到的是null
   <!-- What actually happens? -->
   不确定是让消费者还是提供者修改对应的代码,需要考虑一下
   If there is an exception, please attach the exception trace:
   
   ```
   Just put your stack trace here!
   ```
   


-- 
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-unsubscribe@dubbo.apache.org.apache.org

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


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


[GitHub] [dubbo] AlbumenJ commented on issue #11044: in mesh mode with triple protocol, remoteApplicationName is null

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #11044:
URL: https://github.com/apache/dubbo/issues/11044#issuecomment-1330559035

   @EarthChen PTAL


-- 
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-unsubscribe@dubbo.apache.org

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


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


[GitHub] [dubbo] gold-fisher commented on issue #11044: in mesh mode with triple protocol, remoteApplicationName is null

Posted by GitBox <gi...@apache.org>.
gold-fisher commented on issue #11044:
URL: https://github.com/apache/dubbo/issues/11044#issuecomment-1331917426

   let me do it! 


-- 
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-unsubscribe@dubbo.apache.org

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


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


[GitHub] [dubbo] EarthChen closed issue #11044: in mesh mode with triple protocol, remoteApplicationName is null

Posted by GitBox <gi...@apache.org>.
EarthChen closed issue #11044: in mesh mode with triple protocol, remoteApplicationName is null
URL: https://github.com/apache/dubbo/issues/11044


-- 
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-unsubscribe@dubbo.apache.org

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


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


[GitHub] [dubbo] EarthChen commented on issue #11044: in mesh mode with triple protocol, remoteApplicationName is null

Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #11044:
URL: https://github.com/apache/dubbo/issues/11044#issuecomment-1331928580

   > let me do it! @EarthChen
   
   fine, go ahead.


-- 
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-unsubscribe@dubbo.apache.org

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


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


[GitHub] [dubbo] EarthChen commented on issue #11044: in mesh mode with triple protocol, remoteApplicationName is null

Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #11044:
URL: https://github.com/apache/dubbo/issues/11044#issuecomment-1331582522

   解决这个问题应该是改一下provider 的 key 的设置,做个转换放在invocation里一下。tri 协议自定义了一些 header,之前的 pr 是为了防止用户的 header 与协议 header 冲突,做的过滤。而 `tri-consumer-appname`则是一开始tri 协议自定义的 header。


-- 
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-unsubscribe@dubbo.apache.org

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


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


[GitHub] [dubbo] EarthChen commented on issue #11044: in mesh mode with triple protocol, remoteApplicationName is null

Posted by GitBox <gi...@apache.org>.
EarthChen commented on issue #11044:
URL: https://github.com/apache/dubbo/issues/11044#issuecomment-1331582894

   你愿意提个pr fix一下这个问题嘛?


-- 
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-unsubscribe@dubbo.apache.org

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


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