You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "crazyStar00 (via GitHub)" <gi...@apache.org> on 2024/03/22 07:39:40 UTC

[I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo Java 3.2.11 Oracle JDK 1.8 windows 10
    
   
   ### Steps to reproduce this issue
   
   This test is based on the dubbo-samples-triple-grpc module of the project [dubbo-samples](https://github.com/apache/dubbo-samples/tree/master/2-advanced/dubbo-samples-triple-grpc)
   
   1. Modify the `greeter.proto` file, modify the package for the `hello`, add configuration `option java_package = "org.apache.dubbo.samples.tri.grpc"`";
   ![1](https://github.com/apache/dubbo/assets/18380553/a5130d3f-2238-4192-ad37-b733f366ea8d)
   
   2. start grpc java server: org.apache.dubbo.samples.tri.grpc.interop.client.GrpcServer.main()
   3. start grpc dubbo tri client: org.apache.dubbo.samples.tri.grpc.interop.client.TriOpClient.main()
      error log: 
         Exception in thread "main" org.apache.dubbo.rpc.RpcException: java.util.concurrent.ExecutionException: org.apache.dubbo.rpc.StatusRpcException: UNIMPLEMENTED : Method not found: org.apache.dubbo.samples.tri.grpc.Greeter/greet
   	at org.apache.dubbo.rpc.AsyncRpcResult.getAppResponse(AsyncRpcResult.java:180)
   	at org.apache.dubbo.rpc.AsyncRpcResult.recreate(AsyncRpcResult.java:245)
   	at org.apache.dubbo.rpc.proxy.InvocationUtil.invoke(InvocationUtil.java:64)
   	at org.apache.dubbo.rpc.stub.StubInvocationUtil.call(StubInvocationUtil.java:64)
   	at org.apache.dubbo.rpc.stub.StubInvocationUtil.unaryCall(StubInvocationUtil.java:29)
   	at org.apache.dubbo.samples.tri.grpc.DubboGreeterTriple$GreeterStub.greet(DubboGreeterTriple.java:107)
   	at org.apache.dubbo.samples.tri.grpc.interop.client.TriOpClient.unary(TriOpClient.java:64)
   	at org.apache.dubbo.samples.tri.grpc.interop.client.TriOpClient.main(TriOpClient.java:55)
   Caused by: java.util.concurrent.ExecutionException: org.apache.dubbo.rpc.StatusRpcException: UNIMPLEMENTED : Method not found: org.apache.dubbo.samples.tri.grpc.Greeter/greet
   	at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
   	at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
   	at org.apache.dubbo.rpc.AsyncRpcResult.getAppResponse(AsyncRpcResult.java:171)
   	... 7 more
   Caused by: org.apache.dubbo.rpc.StatusRpcException: UNIMPLEMENTED : Method not found: org.apache.dubbo.samples.tri.grpc.Greeter/greet
   	at org.apache.dubbo.rpc.TriRpcStatus.asException(TriRpcStatus.java:213)
   	at org.apache.dubbo.rpc.protocol.tri.call.UnaryClientCallListener.onClose(UnaryClientCallListener.java:53)
   	at org.apache.dubbo.rpc.protocol.tri.call.TripleClientCall.onComplete(TripleClientCall.java:127)
   	at org.apache.dubbo.rpc.protocol.tri.stream.TripleClientStream$ClientTransportListener.finishProcess(TripleClientStream.java:243)
   	at org.apache.dubbo.rpc.protocol.tri.stream.TripleClientStream$ClientTransportListener.onTrailersReceived(TripleClientStream.java:328)
   	at org.apache.dubbo.rpc.protocol.tri.stream.TripleClientStream$ClientTransportListener.lambda$onHeader$1(TripleClientStream.java:431)
   	at org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:105)
   	at org.apache.dubbo.common.threadpool.ThreadlessExecutor$RunnableWrapper.run(ThreadlessExecutor.java:151)
   	at org.apache.dubbo.common.threadpool.ThreadlessExecutor.waitAndDrain(ThreadlessExecutor.java:77)
   	at org.apache.dubbo.rpc.AsyncRpcResult.get(AsyncRpcResult.java:219)
   	at org.apache.dubbo.rpc.protocol.AbstractInvoker.waitForResultIfSync(AbstractInvoker.java:292)
   	at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:194)
   	at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:71)
   	at org.apache.dubbo.rpc.filter.RpcExceptionFilter.invoke(RpcExceptionFilter.java:40)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:197)
   	at org.apache.dubbo.rpc.protocol.ReferenceCountInvokerWrapper.invoke(ReferenceCountInvokerWrapper.java:106)
   	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invokeWithContext(AbstractClusterInvoker.java:412)
   	at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:82)
   	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:366)
   	at org.apache.dubbo.rpc.cluster.router.RouterSnapshotFilter.invoke(RouterSnapshotFilter.java:46)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.monitor.support.MonitorFilter.invoke(MonitorFilter.java:108)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.rpc.cluster.filter.support.MetricsClusterFilter.invoke(MetricsClusterFilter.java:57)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.rpc.protocol.dubbo.filter.FutureFilter.invoke(FutureFilter.java:52)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.spring.security.filter.ContextHolderParametersSelectedTransferFilter.invoke(ContextHolderParametersSelectedTransferFilter.java:40)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.metrics.filter.MetricsFilter.invoke(MetricsFilter.java:86)
   	at org.apache.dubbo.rpc.cluster.filter.support.MetricsConsumerFilter.invoke(MetricsConsumerFilter.java:38)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.rpc.cluster.filter.support.ConsumerClassLoaderFilter.invoke(ConsumerClassLoaderFilter.java:40)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.rpc.cluster.filter.support.ConsumerContextFilter.invoke(ConsumerContextFilter.java:123)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CopyOfFilterChainNode.invoke(FilterChainBuilder.java:349)
   	at org.apache.dubbo.rpc.cluster.filter.FilterChainBuilder$CallbackRegistrationInvoker.invoke(FilterChainBuilder.java:197)
   	at org.apache.dubbo.rpc.cluster.support.wrapper.AbstractCluster$ClusterFilterInvoker.invoke(AbstractCluster.java:101)
   	at org.apache.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:106)
   	at org.apache.dubbo.rpc.cluster.support.wrapper.ScopeClusterInvoker.invoke(ScopeClusterInvoker.java:156)
   	... 6 more
   
   The solution:
   1. don't modify proto file
      Without modify proto file, you must modify the protobuf generated package path, from `org.apache.dubbo.samples.tri.grpc` modified to `hello`
   2. Change the package of the proto file to be consistent with the option java_package.   
   
   ### What you expected to happen
   
   Expect the dubbo tri client to support the option java_package configuration
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [X] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   > > > ```proto
   > > > option java_package = "org.apache.dubbo.demo.tri.grpc";
   > > > package pkg;
   > > > ```
   > > > 
   > > > 
   > > >     
   > > >       
   > > >     
   > > > 
   > > >       
   > > >     
   > > > 
   > > >     
   > > >   
   > > > org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java:303
   > > > 获取服务是从url里get到的路径和JAVA_SERVICE_NAME(org.apache.dubbo.demo.tri.grpc.Greeter)
   > > > `meta.service = url.getPath();`
   > > > 修改为实际的SERVICE_NAME( pkg.Greeter)后请求正常:
   > > > 考虑在url里维护SERVICE_NAME,构建请求时就可以了
   > > > ![图像](https://private-user-images.githubusercontent.com/50894526/317644990-e01cd9c7-67c7-47a0-a8a7-87f102010850.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTE2MTk2NDQsIm5iZiI6MTcxMTYxOTM0NCwicGF0aCI6Ii81MDg5NDUyNi8zMTc2NDQ5OTAtZTAxY2Q5YzctNjdjNy00N2EwLWE4YTctODdmMTAyMDEwODUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzI4VDA5NDkwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkMjgzMjIyYTgxNmRkOWMwODc2YWJmZDE3MDkxMjkwNTUyMTAwMjhhNzE3YmQzZTE1MzEwNTk1Mjg4YmU1NWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RbnmUJPwNsvr4zoIsbZbQ_8x2tD1wcXIg08MMDCWT2g)
   > > 
   > > 
   > > 想了想,希望这样并不行,这是在dubbo客户端调用不一致用于grpc服务器的情况下,才需要SERVICE_NAME,如果是调用dubbo三重服务器,还是使用JAVA_SERVICE_NAME的
   > 
   > 或者说,从最初grpc服务不会注册到注册中心考虑,判断没有走注册中心,是直连的,就用SERVICE_NAME,否则用JAVA_SERVICE_NAME
   
   主要是我们公司考虑将原生的grpc服务实例信息,通过手动的方式写入zk,这样,对java dubbo 客户端来说,就不用考虑是否原生的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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   > ```proto
   > option java_package = "org.apache.dubbo.demo.tri.grpc";
   > package pkg;
   > ```
   > 
   > org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java:303
   > 
   > 获取服务是从url里get到的路径和JAVA_SERVICE_NAME(org.apache.dubbo.demo.tri.grpc.Greeter)
   > 
   > `meta.service = url.getPath();`
   > 
   > 修改为实际的SERVICE_NAME(pkg.Greeter)后请求正常:
   > 
   > ![图像](https://private-user-images.githubusercontent.com/50894526/317644990-e01cd9c7-67c7-47a0-a8a7-87f102010850.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTE2MTk2NDQsIm5iZiI6MTcxMTYxOTM0NCwicGF0aCI6Ii81MDg5NDUyNi8zMTc2NDQ5OTAtZTAxY2Q5YzctNjdjNy00N2EwLWE4YTctODdmMTAyMDEwODUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzI4VDA5NDkwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkMjgzMjIyYTgxNmRkOWMwODc2YWJmZDE3MDkxMjkwNTUyMTAwMjhhNzE3YmQzZTE1MzEwNTk1Mjg4YmU1NWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RbnmUJPwNsvr4zoIsbZbQ_8x2tD1wcXIg08MMDCWT2g)
   > 
   > 考虑在url里维护SERVICE_NAME,构建请求时就可以了
   
   想了想,好像这样并不行,这是在dubbo客户端调用原生grpc server的情况下,才需要SERVICE_NAME,如果是调用dubbo triple server,还是要用JAVA_SERVICE_NAME的


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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   我发现直连的情况下,指定path的话也可以正常调用
   不确定是使用方式的问题,还是代码问题,蹲一个官方回复
   ![image](https://github.com/apache/dubbo/assets/50894526/dba879ba-80c5-49c7-a321-f32ab7c5e407)
   


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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   I also try to use c + + GRPC server and dubbo tri client, also fail, an error is `org.apache.dubbo.rpc.StatusRpcException: UNIMPLEMENTED`


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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   看了一下3.3才做了server端的兼容处理。如果将client改成使用pkg发
   
   > ![image](https://github.com/apache/dubbo-samples/raw/master/2-advanced/dubbo-samples-triple-grpc/docs/triple-grpc.png) 借用dubbo-samples的一张图,只有第一种情况有问题
   
   看了下提交记录是3.3才有的JAVA_SERVICE/SERVICE兼容处理。  
   如果在低于该版本下做处理,将client修改成pkg发起请求,那么server端也需要一起修改以支持原本java pkg请求的接入。


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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   ```proto
   option java_package = "org.apache.dubbo.demo.tri.grpc";
   package pkg;
   ```
   org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java:303
   
   获取service是从url里get到的path也就是JAVA_SERVICE_NAME(org.apache.dubbo.demo.tri.grpc.Greeter)
   
   `meta.service = url.getPath();`
   
   修改为实际的SERVICE_NAME(pkg.Greeter)后请求正常:
   
   ![image](https://github.com/apache/dubbo/assets/50894526/e01cd9c7-67c7-47a0-a8a7-87f102010850)
   
   考虑在url里维护SERVICE_NAME,构建request时get就好了
   


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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   ![image](https://github.com/apache/dubbo-samples/raw/master/2-advanced/dubbo-samples-triple-grpc/docs/triple-grpc.png)
   借用dubbo-samples的一张图,只有第一种情况有问题


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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   @EarthChen @icodening 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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   > > > > ```proto
   > > > > option java_package = "org.apache.dubbo.demo.tri.grpc";
   > > > > package pkg;
   > > > > ```
   > > > > 
   > > > > 
   > > > >     
   > > > >       
   > > > >     
   > > > > 
   > > > >       
   > > > >     
   > > > > 
   > > > >     
   > > > >   
   > > > > org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java:303
   > > > > 获取服务是从url里get到的路径和JAVA_SERVICE_NAME(org.apache.dubbo.demo.tri.grpc.Greeter)
   > > > > `meta.service = url.getPath();`
   > > > > 修改为实际的SERVICE_NAME( pkg.Greeter)后请求正常:
   > > > > 考虑在url里维护SERVICE_NAME,构建请求时就可以了
   > > > > ![图像](https://private-user-images.githubusercontent.com/50894526/317644990-e01cd9c7-67c7-47a0-a8a7-87f102010850.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTE2MTk2NDQsIm5iZiI6MTcxMTYxOTM0NCwicGF0aCI6Ii81MDg5NDUyNi8zMTc2NDQ5OTAtZTAxY2Q5YzctNjdjNy00N2EwLWE4YTctODdmMTAyMDEwODUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzI4VDA5NDkwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkMjgzMjIyYTgxNmRkOWMwODc2YWJmZDE3MDkxMjkwNTUyMTAwMjhhNzE3YmQzZTE1MzEwNTk1Mjg4YmU1NWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RbnmUJPwNsvr4zoIsbZbQ_8x2tD1wcXIg08MMDCWT2g)
   > > > 
   > > > 
   > > > 想了想,希望这样并不行,这是在dubbo客户端调用不一致用于grpc服务器的情况下,才需要SERVICE_NAME,如果是调用dubbo三重服务器,还是使用JAVA_SERVICE_NAME的
   > > 
   > > 
   > > 或者说,从最初grpc服务不会注册到注册中心考虑,判断没有走注册中心,是直连的,就用SERVICE_NAME,否则用JAVA_SERVICE_NAME
   > 
   > 主要是我们公司考虑将原生的grpc服务实例信息,通过手动的方式写入zk,这样,对java dubbo 客户端来说,就不用考虑是否原生的grpc服务了,使用都是一样的。
   
   ![image](https://github.com/apache/dubbo/assets/50894526/12ac3287-bc3b-44c3-8b96-900adcf2d2f1)
   ![image](https://github.com/apache/dubbo/assets/50894526/d30e9f6d-88e8-4a06-a89a-159f53d9129f)
   
   dubbo server做了兼容的,JAVA_SERVICE_NAME和SERVICE_NAME都可以,现在问题在dubbo client请求时用的是JAVA_SERVICE_NAME,导致server如果不是dubbo就会识别不出,所以只要把dubbo client也就是请求时改成SERVICE_NAME即可.


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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   > ```proto
   > option java_package = "org.apache.dubbo.demo.tri.grpc";
   > package pkg;
   > ```
   > 
   > org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java:303
   > 
   > 获取service是从url里get到的path也就是JAVA_SERVICE_NAME(org.apache.dubbo.demo.tri.grpc.Greeter)
   > 
   > `meta.service = url.getPath();`
   > 
   > 修改为实际的SERVICE_NAME(pkg.Greeter)后请求正常:
   > 
   > ![image](https://private-user-images.githubusercontent.com/50894526/317644990-e01cd9c7-67c7-47a0-a8a7-87f102010850.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTE2MTk2NDQsIm5iZiI6MTcxMTYxOTM0NCwicGF0aCI6Ii81MDg5NDUyNi8zMTc2NDQ5OTAtZTAxY2Q5YzctNjdjNy00N2EwLWE4YTctODdmMTAyMDEwODUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzI4VDA5NDkwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkMjgzMjIyYTgxNmRkOWMwODc2YWJmZDE3MDkxMjkwNTUyMTAwMjhhNzE3YmQzZTE1MzEwNTk1Mjg4YmU1NWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RbnmUJPwNsvr4zoIsbZbQ_8x2tD1wcXIg08MMDCWT2g)
   > 
   > 考虑在url里维护SERVICE_NAME,构建request时get就好了
   
   是的,我直连时,在url中,将service修改为SERVICE_NAME,也可以调用通了。


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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

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

   > > ```proto
   > > option java_package = "org.apache.dubbo.demo.tri.grpc";
   > > package pkg;
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > org/apache/dubbo/rpc/protocol/tri/TripleInvoker.java:303
   > > 获取服务是从url里get到的路径和JAVA_SERVICE_NAME(org.apache.dubbo.demo.tri.grpc.Greeter)
   > > `meta.service = url.getPath();`
   > > 修改为实际的SERVICE_NAME(pkg.Greeter)后请求正常:
   > > ![图像](https://private-user-images.githubusercontent.com/50894526/317644990-e01cd9c7-67c7-47a0-a8a7-87f102010850.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTE2MTk2NDQsIm5iZiI6MTcxMTYxOTM0NCwicGF0aCI6Ii81MDg5NDUyNi8zMTc2NDQ5OTAtZTAxY2Q5YzctNjdjNy00N2EwLWE4YTctODdmMTAyMDEwODUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzI4VDA5NDkwNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkMjgzMjIyYTgxNmRkOWMwODc2YWJmZDE3MDkxMjkwNTUyMTAwMjhhNzE3YmQzZTE1MzEwNTk1Mjg4YmU1NWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.RbnmUJPwNsvr4zoIsbZbQ_8x2tD1wcXIg08MMDCWT2g)
   > > 考虑在url里维护SERVICE_NAME,构建请求时就可以了
   > 
   > 想了想,希望这样并不行,这是在dubbo客户端调用不适用于grpc服务器的情况下,才需要SERVICE_NAME,如果是调用dubbo三重服务器,还是使用JAVA_SERVICE_NAME的
   
   或者说,从原生grpc服务不会注册到注册中心考虑,判断没有走注册中心,是直连的,就用SERVICE_NAME,否则用JAVA_SERVICE_NAME


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


Re: [I] [Bug] dubbo interacts with native grpc java_package is unavailable [dubbo]

Posted by "EarthChen (via GitHub)" <gi...@apache.org>.
EarthChen closed issue #13980: [Bug] dubbo interacts with native grpc java_package is unavailable
URL: https://github.com/apache/dubbo/issues/13980


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