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

[GitHub] [dubbo] wangjunjie92 opened a new issue, #12694: dubbo3 应用级服务发现 泛化调用异常

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

   <!-- 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.
   
   ### Environment
   
   * Dubbo version:3.1.0
   * Operating System version: Windows
   * Java version: 1.8
   
   生产者
   ```
           ServiceConfig<GreetingsService> service = new ServiceConfig<>();
           service.setInterface(GreetingsService.class);
           service.setRef(new GreetingsServiceImpl());
           service.setGeneric("true");
   
           RegistryConfig registryConfig = new RegistryConfig();
           registryConfig.setAddress("nacos://127.0.0.1:8848");
           Map<String,String> paramMap = new HashMap<String, String>();
           paramMap.put("namespace","test");
           registryConfig.setParameters(paramMap);
           registryConfig.setCheck(false);
   
           ApplicationConfig applicationConfig = new ApplicationConfig();
           applicationConfig.setName("first-dubbo-provider");
           applicationConfig.setRegisterMode("instance");
   
           DubboBootstrap.getInstance()
                   .application(applicationConfig)
                   .registry(registryConfig)
                   .protocol(new ProtocolConfig("dubbo", -1))
                   .service(service)
                   .start()
                   .await();
   ```
   消费者
   
   ```
           //创建ApplicationConfig
           ApplicationConfig applicationConfig = new ApplicationConfig();
           applicationConfig.setName("generic-call-consumer");
           applicationConfig.setRegisterMode("instance");
           RegistryConfig registryConfig = new RegistryConfig();
           registryConfig.setAddress("nacos://127.0.0.1:8848");
           Map<String,String> paramMap = new HashMap<String, String>();
           paramMap.put("namespace","test");
           registryConfig.setParameters(paramMap);
           registryConfig.setCheck(false);
   
           ProtocolConfig protocolConfig = new ProtocolConfig();
           protocolConfig.setName("dubbo");
           protocolConfig.setPort(-1);
   
           ReferenceConfig<GenericService> referenceConfig = new ReferenceConfig<>();
           referenceConfig.setInterface("com.wang.student.student.dubbo.api.GreetingsService");
           applicationConfig.setRegistry(registryConfig);
           applicationConfig.setProtocol("dubbo");
           referenceConfig.setApplication(applicationConfig);
           referenceConfig.setGeneric("true");
           referenceConfig.setAsync(false);
           referenceConfig.setTimeout(7000);
           GenericService genericService = referenceConfig.get();
           Object result = genericService.$invoke("sayHi", new String[]{"java.lang.String"}, new Object[]{"world genericService"});
   ```
   异常信息
   ```
   Exception in thread "main" java.lang.IllegalStateException: Failed to check the status of the service com.wang.student.student.dubbo.api.GreetingsService. No provider available for the service com.wang.student.student.dubbo.api.GreetingsService from the url consumer://192.168.56.1/com.wang.student.student.dubbo.api.GreetingsService?application=generic-call-consumer&async=false&background=false&dubbo=2.0.2&generic=true&interface=com.wang.student.student.dubbo.api.GreetingsService&pid=21052&register-mode=instance&register.ip=192.168.56.1&release=3.1.10&side=consumer&sticky=false&timeout=7000&timestamp=1688720882572&unloadClusterRelated=false to the consumer 192.168.56.1 use dubbo version 3.1.10
   	at org.apache.dubbo.config.ReferenceConfig.checkInvokerAvailable(ReferenceConfig.java:668)
   	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:309)
   	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232)
   	at com.wang.student.student.dubbo.GenericServiceTest.main(GenericServiceTest.java:58)
   ```
   
   
   
   
   
   


-- 
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] dubbo3 应用级服务发现 泛化调用异常 [dubbo]

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

   @CrazyHZM 当前不支持应用级服务注册的泛化调用吗


-- 
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] xieshouyu commented on issue #12694: dubbo3 应用级服务发现 泛化调用异常

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

   no provider 是不是 因为 没有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


Re: [I] dubbo3 应用级服务发现 泛化调用异常 [dubbo]

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

   Supported, please try the latest version.
   @cy1ng 
   


-- 
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] dubbo3 应用级服务发现 泛化调用异常 [dubbo]

Posted by "CrazyHZM (via GitHub)" <gi...@apache.org>.
CrazyHZM closed issue #12694: dubbo3 应用级服务发现 泛化调用异常
URL: https://github.com/apache/dubbo/issues/12694


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