zonghaishang commented on issue #1522: 启动时检查依赖,无论我check设为true或者false,它都不检测直接启动成功
URL: 
https://github.com/apache/incubator-dubbo/issues/1522#issuecomment-378464573
 
 
   very sorry for the late reply, I think there are other services already 
started, so 'check' is correct.
   
   You can add breakpoints at the following line of code to determine if 
invoice.isAvailable() should return true.
   
   com.alibaba.dubbo.config.ReferenceConfig#createProxy:
   
   if (c && !invoker.isAvailable()) {
       throw new IllegalStateException("Failed to check the status of the 
service " + interfaceName + ". No provider available for the service " + (group 
== null ? "" : group + "/") + interfaceName + (version == null ? "" : ":" + 
version) + " from the url " + invoker.getUrl() + " to the consumer " + 
NetUtils.getLocalHost() + " use dubbo version " + Version.getVersion());
   }
   
   yiji
   
   在 2018年3月29日,20:42,zeng54088 
<[email protected]<mailto:[email protected]>> 写道:
   
   @zonghaishang<https://github.com/zonghaishang> 还是不行啊
   dubbo版本为2.6.0
   项目A依赖于项目B
   
   项目A configuration 如下
   @configuration<https://github.com/configuration>
   public class DubboConfiguration {
   @bean<https://github.com/bean>
   public ApplicationConfig applicationConfig() {
   ApplicationConfig applicationConfig = new ApplicationConfig();
   applicationConfig.setName("provider-test");
   return applicationConfig;
   }
   
   @Bean
   public RegistryConfig registryConfig() {
       RegistryConfig registryConfig = new RegistryConfig();
       registryConfig.setAddress("zookeeper://192.168.93.87:2182");
       registryConfig.setClient("curator");
       return registryConfig;
   }
   
   @Bean
   public ProtocolConfig protocolConfig(){
       ProtocolConfig protocolConfig=new ProtocolConfig();
       protocolConfig.setPort(20881);
       protocolConfig.setName("dubbo");
       return protocolConfig;
   }
   
   
   }
   
   项目B configuration 如下
   @configuration<https://github.com/configuration>
   public class DubboConfiguration {
   @bean<https://github.com/bean>
   public ApplicationConfig applicationConfig() {
   ApplicationConfig applicationConfig = new ApplicationConfig();
   applicationConfig.setName("provider-test1");
   return applicationConfig;
   }
   
   @Bean
   public RegistryConfig registryConfig() {
       RegistryConfig registryConfig = new RegistryConfig();
       registryConfig.setAddress("zookeeper://192.168.93.87:2182");
       registryConfig.setClient("curator");
       return registryConfig;
   }
   
   @Bean
   public ProtocolConfig protocolConfig(){
       ProtocolConfig protocolConfig=new ProtocolConfig();
       protocolConfig.setPort(20880);
       protocolConfig.setName("dubbo");
       return protocolConfig;
   }
   
   
   }
   
   —
   You are receiving this because you were mentioned.
   Reply to this email directly, view it on 
GitHub<https://github.com/apache/incubator-dubbo/issues/1522#issuecomment-377222554>,
 or mute the 
thread<https://github.com/notifications/unsubscribe-auth/AO1FUfF3vk3o7zM6iBHNMI6WBOiu8Mbuks5tjNazgaJpZM4S-2Qi>.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to