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 2021/07/31 02:20:22 UTC

[GitHub] [dubbo] pinxiong commented on issue #8225: 关于 @DubboReference 注解中不配置URL问题

pinxiong commented on issue #8225:
URL: https://github.com/apache/dubbo/issues/8225#issuecomment-890278065


   > org.apache.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service cn.raysonblog.shopservice.api.service.RpcShopService. No provider available for the service cn.raysonblog.shopservice.api.service.RpcShopService:1.0.0 from registry 192.168.0.20:8848 on the consumer 192.168.0.20 using the dubbo version 3.0.1. Please check if the providers have been started and registered.
   
   I have downloaded the [demo](https://wws.lanzoui.com/iRgEPrzde0j) you provided, and want to reproduce the issue you reported. 
   
   ```java
   org.apache.dubbo.rpc.RpcException: Failed to invoke the method sayHello in the service cn.raysonblog.shopservice.api.service.RpcShopService. No provider available for the service cn.raysonblog.shopservice.api.service.RpcShopService:1.0.0 from registry 192.168.31.167:8848 on the consumer 192.168.31.167 using the dubbo version 3.0.1. Please check if the providers have been started and registered.
   	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.checkInvokers(AbstractClusterInvoker.java:288) ~[dubbo-3.0.1.jar:3.0.1]
   	at org.apache.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:59) ~[dubbo-3.0.1.jar:3.0.1]
   	at org.apache.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:265) ~[dubbo-3.0.1.jar:3.0.1]
   	......
   ```
   
   I'm sure that there are something wrong with `Nacos` when exporting the provider, because the exception doesn't throw in `NacosRegistry`
   
   ```java
   private void execute(NamingServiceCallback callback) {
       try {
           callback.callback(namingService);
       } catch (NacosException e) {
           // don't throw any exception 
           if (logger.isErrorEnabled()) {
               logger.error(e.getErrMsg(), e);
           }
       }
   }
   ```
   
   By contrast, all exception will throw in `ZookeeperRegistry`, I'll provide a PR to fix this problem in `NacosRegistry` later
   ```java
   public void doRegister(URL url) {
       try {
           zkClient.create(toUrlPath(url), url.getParameter(DYNAMIC_KEY, true));
       } catch (Throwable e) {
           throw new RpcException("Failed to register " + url + " to zookeeper " + getUrl() + ", cause: " + e.getMessage(), e);
       }
   }
   ```
   
   Now, I need your help to provide more detailed error log, you can get it in `logs/nacos/remote.log` file


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