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/03/07 02:10:05 UTC

[GitHub] [dubbo] leyou240 opened a new issue #9739: triple生成的客户端,访问grpc服务

leyou240 opened a new issue #9739:
URL: https://github.com/apache/dubbo/issues/9739


   <!-- 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.
   
   ## Ask your question here
   背景是这样的,我们有一个其他语言的grpc服务。
   然后我们java这边想使用triple协议生成的客户端来访问这个服务。
   通过相关文档的阅读,我认为triple也是兼容grpc的


-- 
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] leyou240 commented on issue #9739: triple生成的客户端,访问grpc服务

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


   目前按照建议,将两者保持一致依然有问题。unknown method sayHello for service helloworld.v1.Greeter
   期待新版本的修复~


-- 
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 #9739: triple生成的客户端,访问grpc服务

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






-- 
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 #9739: triple生成的客户端,访问grpc服务

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


   @leyou240 
   
   问题是这样的,客户端的方法描述是通过反射获取 class name 和 method name,根据 java 规范,方法名首字母应该小写,但是你的 proto 中方法首字母是大写。
   
   目前 triple 的 client 请求的 url 为 `helloword.v1.Greeter/sayHello`
   
   但你的 grpc server 暴露的method 为 `helloword.v1.Greeter/SayHello`
   
   所以会报上述错误
   
   ---
   
   该问题目前只能等待我们在新版本修复。
   
   
   ps: 如果你用 grpc 的 client 调用 triple 的 server 目前这样是可以的,目前服务端有做兼容处理


-- 
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 #9739: triple生成的客户端,访问grpc服务

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


   https://github.com/apache/dubbo-samples/tree/master/dubbo-samples-triple


-- 
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 #9739: triple生成的客户端,访问grpc服务

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


   所以,你的问题是什么


-- 
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 #9739: triple生成的客户端,访问grpc服务

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


   > 是的,我们目前的解决方案确实是用的grpc的client。 麻烦你们修复了,及时通知
   
   如果你的 proto 文件中将方法名改为小写开头目前就是可以的  `SayHello` --> `sayHello`


-- 
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 #9739: triple生成的客户端,访问grpc服务

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


   @leyou240  
   
   我这边已经发现了问题  这是个已知问题,等待我们修改 compiler 插件即可
   
   此时生成的 client 调用的是如下接口
   <img width="1261" alt="image" src="https://user-images.githubusercontent.com/20179425/158609240-cfb45201-06fb-4e3c-afcf-d0f28dc0411a.png">
   
   但是实际 grpc 暴露的 url 为如下
   <img width="732" alt="image" src="https://user-images.githubusercontent.com/20179425/158609448-bb0072ad-9370-4ee7-800f-138bb8fff87e.png">
   
   
   造成问题的原因来源于 dubbo 是通过反射生成请求 path,这个在未来版本会跟 stub 的支持一起发布。
   
   ## 临时解决方案:
   
   将如下两者保持一致
   
   <img width="785" alt="image" src="https://user-images.githubusercontent.com/20179425/158609984-0914d970-d263-4bd4-9bf8-5e1caf1c404d.png">
   
   
   
   
   


-- 
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] leyou240 commented on issue #9739: triple生成的客户端,访问grpc服务

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


   https://github.com/leyou240/triple-consumer
   @EarthChen 请看这个代码,readme中有详细描述。我用go写的grpc服务,用triple生成的客户端,无法访问。


-- 
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] leyou240 commented on issue #9739: triple生成的客户端,访问grpc服务

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


   是的,我们目前的解决方案确实是用的grpc的client。
   麻烦你们修复了,及时通知


-- 
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] leyou240 commented on issue #9739: triple生成的客户端,访问grpc服务

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


   是的,我们目前的解决方案确实是用的grpc的client。
   麻烦你们修复了,及时通知


-- 
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] leyou240 commented on issue #9739: triple生成的客户端,访问grpc服务

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


   有例子吗?请问


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