You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "kazetyan (via GitHub)" <gi...@apache.org> on 2023/03/04 02:36:00 UTC

[GitHub] [dubbo] kazetyan opened a new issue, #11720: provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取

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

   <!-- 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.1.7
   * Operating System version: centos 7.6.1810
   * Java version: 1.8.0_212
   
   ### Steps to reproduce this issue
   
   1. provider为tri时获取不到metadata
   2. 修改为dubbo时正常
   
   ### Actual Behavior
   
   <!-- What actually happens? -->
   报错日志
   
   ```
   2023-03-04 10:06:23  [ Dubbo-framework-SD-address-refresh-0-thread-1:53010625 ] - [ INFO ] org.apache.dubbo.rpc.model.ModuleModel.registerInternalConsumer(ModuleModel.java:196)  [DUBBO] Dynamically registering consumer model A/org.apache.dubbo.metadata.MetadataService:1.0.0 into model Dubbo Module[1.1.0], dubbo version: 3.1.7, current host: YYY
   2023-03-04 10:06:26  [ Dubbo-framework-SD-address-refresh-0-thread-1:53013627 ] - [ ERROR ]   [DUBBO] Failed to get app metadata for revision ***11b4a9a545f7 for type local from instance XXX:21779, dubbo version: 3.1.7, current host: YYY, error code: 1-39. This may be caused by , go to https://dubbo.apache.org/faq/1/39 to find instructions. 
   org.apache.dubbo.rpc.RpcException: Fail to invoke remote method: getMetadataInfo, provider: tri://XXX:21779/org.apache.dubbo.metadata.MetadataService?connections=1&corethreads=2&dubbo=2.0.2&group=A&port=21779&protocol=tri&release=3.1.7&retries=0&side=provider&threadpool=cached&threads=100&timeout=5000&version=1.0.0, cause: org.apache.dubbo.rpc.StatusRpcException: UNAVAILABLE : upstream XXX:21779 is unavailable
   	at org.apache.dubbo.rpc.protocol.AbstractInvoker.waitForResultIfSync(AbstractInvoker.java:281)
   	at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:186)
   	at org.apache.dubbo.rpc.listener.ListenerInvokerWrapper.invoke(ListenerInvokerWrapper.java:71)
   	at org.apache.dubbo.rpc.proxy.InvocationUtil.invoke(InvocationUtil.java:57)
   	at org.apache.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:75)
   	at org.apache.dubbo.metadata.MetadataServiceDubboProxy10.getMetadataInfo(MetadataServiceDubboProxy10.java)
   	at org.apache.dubbo.registry.client.metadata.MetadataUtils.getRemoteMetadata(MetadataUtils.java:173)
   	at org.apache.dubbo.registry.client.AbstractServiceDiscovery.getRemoteMetadata(AbstractServiceDiscovery.java:228)
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.lambda$doOnEvent$2(ServiceInstancesChangedListener.java:159)
   	at java.util.Optional.orElseGet(Optional.java:267)
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.doOnEvent(ServiceInstancesChangedListener.java:159)
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.onEvent(ServiceInstancesChangedListener.java:113)
   	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscoveryChangeWatcher$1.lambda$doNotify$0(ZookeeperServiceDiscoveryChangeWatcher.java:71)
   	at java.lang.Iterable.forEach(Iterable.java:75)
   	at org.apache.dubbo.registry.zookeeper.ZookeeperServiceDiscoveryChangeWatcher$1.doNotify(ZookeeperServiceDiscoveryChangeWatcher.java:71)
   	at org.apache.dubbo.registry.RegistryNotifier$NotificationTask.run(RegistryNotifier.java:106)
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
   	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
   	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
   	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   	at java.lang.Thread.run(Thread.java:748)
   Caused by: java.util.concurrent.ExecutionException: org.apache.dubbo.rpc.StatusRpcException: UNAVAILABLE : upstream XXX:21779 is unavailable
   	at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
   	at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
   	at org.apache.dubbo.rpc.AsyncRpcResult.get(AsyncRpcResult.java:196)
   	at org.apache.dubbo.rpc.protocol.AbstractInvoker.waitForResultIfSync(AbstractInvoker.java:266)
   	... 22 more
   Caused by: org.apache.dubbo.rpc.StatusRpcException: UNAVAILABLE : upstream XXX:21779 is unavailable
   	at org.apache.dubbo.rpc.TriRpcStatus.asException(TriRpcStatus.java:214)
   	at org.apache.dubbo.rpc.protocol.tri.TripleInvoker.doInvoke(TripleInvoker.java:105)
   	at org.apache.dubbo.rpc.protocol.AbstractInvoker.doInvokeAndReturn(AbstractInvoker.java:222)
   	at org.apache.dubbo.rpc.protocol.AbstractInvoker.invoke(AbstractInvoker.java:183)
   	... 21 more
   ```
   调试截图
   org.apache.dubbo.rpc.protocol.tri.TripleInvoker#doInvoke->org.apache.dubbo.remoting.api.Connection#isAvailable
   ![image](https://user-images.githubusercontent.com/50894526/222871443-aecbc9b3-9b0e-4e38-9055-e64f56a961f1.png)
   
   ![image](https://user-images.githubusercontent.com/50894526/222871127-bd02f000-6ed5-48bb-b195-06d8fa8c4730.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.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 #11720: provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取

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

   @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


Re: [I] provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取 [dubbo]

Posted by "CrazyHZM (via GitHub)" <gi...@apache.org>.
CrazyHZM closed issue #11720: provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取
URL: https://github.com/apache/dubbo/issues/11720


-- 
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] provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取 [dubbo]

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

   Try it in the latest version.


-- 
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] soiz-tor commented on issue #11720: provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取

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

   这个问题我遇到了  解决方法是在provider的pom或者gradle里添加org.apache.dubbo:dubbo-rpc-triple:3.2.0-beta.5
   在provider的application里dubbo.protocol.name=tri,在consumer里dubbo.consumer.protocol=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] EarthChen commented on issue #11720: provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取

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

   > > 你那里必现吗?能提供一个 demo 方便我们复现一下吗?
   > 
   > 现在我这边复现不了了,全部服务都回退到dubbo协议了
   > 
   > 是2.7.3升级到3.1.7过程中发现的问题 升级过程:升级依赖->修改服务发现模型为instance->修改协议为tri
   
   那我理解一下你是回到了2.x 不会吗?还是说3.1.7的 dubbo 协议使用应用级发现


-- 
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] kazetyan commented on issue #11720: provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取

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

   > > > 你那里必现吗?能提供一个 demo 方便我们复现一下吗?
   > > 
   > > 
   > > 现在我这边复现不了了,全部服务都回退到dubbo协议了
   > > 是2.7.3升级到3.1.7过程中发现的问题 升级过程:升级依赖->修改服务发现模型为instance->修改协议为tri
   > 
   > 那我理解一下你是回到了2.x 不会吗?还是说3.1.7的 dubbo 协议使用应用级发现
   
   是后者,只是回退了协议


-- 
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] kazetyan commented on issue #11720: provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取

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

   > 你那里必现吗?能提供一个 demo 方便我们复现一下吗?
   
   现在我这边复现不了了,全部服务都回退到dubbo协议了
   
   是2.7.3升级到3.1.7过程中发现的问题
   升级过程:升级依赖->修改服务发现模型为instance->修改协议为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] kazetyan commented on issue #11720: provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取

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

   > 这个问题我遇到了 解决方法是在provider的pom或者gradle里添加org.apache.dubbo:dubbo-rpc-triple:3.2.0-beta.5 在provider的application里dubbo.protocol.name=tri,在consumer里dubbo.consumer.protocol=tri
   
   那说明3.1的tri协议还是有点问题,暂时先不折腾了,等3.2release后升3.2,感谢回复😀


-- 
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 #11720: provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取

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

   你那里必现吗?能提供一个 demo 方便我们复现一下吗?


-- 
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] AlenZhai commented on issue #11720: provider使用triple协议时,consumer获取不到metadata,修改为dubbo协议时可以正常获取

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

   这个问题有可能是在升级后没有添加 dubbo-rpc-triple 这个包导致的,我之前测试的时候没有加这个包consumer就会报类似这个问题,同时prodiver也会报一个错误。
   consumer端会报:
   `invocation context:
   2023-06-16T05:06:14.176468303Z timeout=5000;
   2023-06-16T05:06:14.176522304Z group=dubbo-provider;
   2023-06-16T05:06:14.176569704Z thread info: 
   2023-06-16T05:06:14.176625005Z Start time: 13001516656092
   2023-06-16T05:06:14.176684706Z +-[ Offset: 0.000000ms; Usage: 5010.949001ms, 100% ] Receive request. Client invoke begin. ServiceKey: dubbo-provider/org.apache.dubbo.metadata.MetadataService:1.0.0 MethodName:getMetadataInfo, dubbo version: 3.1.8, current host: 172.17.0.4, error code: 3-4. This may be caused by , go to https://dubbo.apache.org/faq/3/4 to find instructions. 
   2023-06-16T05:06:14.181383383Z 2023-06-16 05:06:14.180 ERROR 1 --- [           main] o.a.d.r.client.metadata.MetadataUtils    :  [DUBBO] Failed to get app metadata for revision 5a8e40c3ff757148209bcc5b4ddfc815 for type local from instance 172.17.0.3:50051, dubbo version: 3.1.8, current host: 172.17.0.4, error code: 1-39. This may be caused by , go to https://dubbo.apache.org/faq/1/39 to find instructions. 
   2023-06-16T05:06:14.181481785Z 
   2023-06-16T05:06:14.181550886Z org.apache.dubbo.rpc.StatusRpcException: DEADLINE_EXCEEDED : Waiting server-side response timeout by scan timer. start time: 2023-06-16 05:06:09.171, end time: 2023-06-16 05:06:14.175, timeout: 5000 ms, service: org.apache.dubbo.metadata.MetadataService, method: getMetadataInfo`
   
   provider端会报找不到类Caused by: java.lang.ClassNotFoundException: com.google.protobuf.Message


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