You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "TremblingV5 (via GitHub)" <gi...@apache.org> on 2023/06/05 09:39:58 UTC

[GitHub] [dubbo] TremblingV5 opened a new issue, #12459: Dubbo3 + grpc 远程调用的参数和结果均为空

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

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [x] 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.2.2 & 3.2.0
   * Operating System version: Windows 11
   * Java version: JDK 17
   
   ### Steps to reproduce this issue
   
   github url for this issue: https://github.com/TremblingV5/dubbo-grpc-demo
   
   我使用Dubbo3和grpc尝试搭建一个简单的demo,主要依赖库的版本信息如下:
   
   ```xml
   <dubbo.version>3.2.2</dubbo.version>
   <springboot.version>2.7.8</springboot.version>
   <protoc.version>3.7.1</protoc.version>
   <grpc.version>1.55.1</grpc.version>
   ```
   
   这个demo已经上传到了github,上方链接即这个demo的链接。我调用相关接口,获取远程调用的结果,发现是空字符串;使用Idea打断点debug发现,一开始构建的请求体和返回体是正常的,但是经过远程调用后全部变为了空,怀疑可能是序列化的问题?
   
   demo的配置文件如下:
   
   ```yml
   dubbo:
     application:
       name: Consumer
     registry:
       address: nacos://localhost:8848
     consumer:
       check: false
     protocol:
       name: dubbo
       host: 127.0.0.1
       port: 12346
   
   server:
     port: 9090
   ```
   
   ```yml
   dubbo:
     protocol:
       name: dubbo
       host: 127.0.0.1
       port: 12345
     application:
       name: Producer
     registry:
       address: nacos://localhost:8848
   ```
   
   发生这个问题时,控制台没有输出任何日志信息。


-- 
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] icodening commented on issue #12459: Dubbo3 + grpc 远程调用的参数和结果均为空

Posted by "icodening (via GitHub)" <gi...@apache.org>.
icodening commented on issue #12459:
URL: https://github.com/apache/dubbo/issues/12459#issuecomment-1576925784

   你使用了`dubbo`协议,换成`tri`试试


-- 
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] icodening commented on issue #12459: Dubbo3 + grpc 远程调用的参数和结果均为空

Posted by "icodening (via GitHub)" <gi...@apache.org>.
icodening commented on issue #12459:
URL: https://github.com/apache/dubbo/issues/12459#issuecomment-1584749505

   @TremblingV5 
   我看了下你的demo发现其中以下几个问题:
   1. consumer模块直接依赖了producer模块,实际上会走`injvm`导致没有走Triple的处理逻辑
   2. `hello.proto`中声明的方法名是大写,而生成的代码是小写的,会出现找不到方法
   


-- 
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] TremblingV5 commented on issue #12459: Dubbo3 + grpc 远程调用的参数和结果均为空

Posted by "TremblingV5 (via GitHub)" <gi...@apache.org>.
TremblingV5 commented on issue #12459:
URL: https://github.com/apache/dubbo/issues/12459#issuecomment-1581814755

   > 你使用了`dubbo`协议,换成`tri`试试
   
   我把`dubbo`分别换成了`tri`和`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] icodening commented on issue #12459: Dubbo3 + grpc 远程调用的参数和结果均为空

Posted by "icodening (via GitHub)" <gi...@apache.org>.
icodening commented on issue #12459:
URL: https://github.com/apache/dubbo/issues/12459#issuecomment-1584717478

   @TremblingV5 


-- 
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] TremblingV5 closed issue #12459: Dubbo3 + grpc 远程调用的参数和结果均为空

Posted by "TremblingV5 (via GitHub)" <gi...@apache.org>.
TremblingV5 closed issue #12459: Dubbo3 + grpc 远程调用的参数和结果均为空
URL: https://github.com/apache/dubbo/issues/12459


-- 
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] TremblingV5 commented on issue #12459: Dubbo3 + grpc 远程调用的参数和结果均为空

Posted by "TremblingV5 (via GitHub)" <gi...@apache.org>.
TremblingV5 commented on issue #12459:
URL: https://github.com/apache/dubbo/issues/12459#issuecomment-1585669920

   非常感谢您能查看我的代码帮我解决问题,按照您提出的问题进行修改后,现在已经没有这个问题了。
   
   解决问题的修改包括:
   
   1. 新增一个子项目用于存放`.proto`文件和生成的代码,使consumer不依赖producer
   2. `.proto`文件中声明方法名改为使用小写字母
   3. `application.yml`中指定`dubbo.protocol.name`的值为`grpc`
   
   非常感谢
   
   > @TremblingV5 我看了下你的demo发现其中以下几个问题:
   > 
   > 1. consumer模块直接依赖了producer模块,实际上会走`injvm`导致没有走Triple的处理逻辑
   > 2. `hello.proto`中声明的方法名是大写,而生成的代码是小写的,会出现找不到方法
   
   


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