[ 
https://issues.apache.org/jira/browse/SCB-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

mabin updated SCB-1109:
-----------------------
    Description: 
use IDEA to run local-service-registry sample, did not make any changes.

1. run local-registry-server successfully, info as below,

2019-01-11 10:41:57,144 [INFO] running microservice instance register task. 
org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask.doRegister(MicroserviceInstanceRegisterTask.java:59)
{color:red}2019-01-11 10:41:57,145 [INFO] Register microservice instance 
success. microserviceId=f8556dbd-3fc2-4ebf-a028-bd745c9b4536 
instanceId=eec80c40-cf39-4a22-be70-4ac97842cd67 
endpoints=[rest://192.168.88.137:8080, 
highway://192.168.88.137:7070?login=true] lease 120s 
org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask.doRegister(MicroserviceInstanceRegisterTask.java:77)
2019-01-11 10:41:57,145 [INFO] read MicroserviceInstanceRegisterTask status is 
FINISHED 
{color}org.apache.servicecomb.serviceregistry.task.ServiceCenterTask.onRegisterTask(ServiceCenterTask.java:51)
2019-01-11 10:41:57,145 [INFO] receive MicroserviceInstanceRegisterTask event, 
check instance Id... 
org.apache.servicecomb.core.SCBEngine$1.afterRegistryInstance(SCBEngine.java:182)
2019-01-11 10:41:57,145 [INFO] instance registry succeeds for the first time, 
will send AFTER_REGISTRY event. 
org.apache.servicecomb.core.SCBEngine$1.afterRegistryInstance(SCBEngine.java:184)
2019-01-11 10:41:57,145 [INFO] ServiceComb is ready. 
org.apache.servicecomb.core.SCBEngine$1.afterRegistryInstance(SCBEngine.java:188)
2019-01-11 10:41:57,148 [INFO] Waiting for status up. timeout: 10000ms 
org.apache.servicecomb.core.SCBEngine.waitStatusUp(SCBEngine.java:362)
2019-01-11 10:41:57,148 [INFO] Status already changed to up. 
org.apache.servicecomb.core.SCBEngine.waitStatusUp(SCBEngine.java:371)

2. but failed when running local-registry-client,errors as below,

2019-01-11 10:42:07,865 [INFO] create MicroserviceVersions, appId=localservreg, 
microserviceName=localserv. 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.<init>(MicroserviceVersions.java:83)
2019-01-11 10:42:07,867 [INFO] remove microservice, appId=localservreg, 
microserviceName=localserv. 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:73)
2019-01-11 10:42:07,867 [INFO] create MicroserviceVersionRule, 
appId=localservreg, microserviceName=localserv, versionRule=0.0.0+. 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:229)
{color:red}Exception in thread "main" java.lang.IllegalStateException: Probably 
invoke a service before it is registered, or no instance found for it, 
appId=localservreg, name=localserv{color}
        at 
org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager.createReferenceConfig(ConsumerProviderManager.java:61)
        at 
org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager.createReferenceConfig(ConsumerProviderManager.java:87)
        at 
java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
        at 
org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx.computeIfAbsent(ConcurrentHashMapEx.java:56)
        at 
org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager.getReferenceConfig(ConsumerProviderManager.java:91)
        at 
org.apache.servicecomb.core.SCBEngine.getReferenceConfigForInvoke(SCBEngine.java:331)
        at 
org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.findReferenceConfig(CseClientHttpRequest.java:170)
        at 
org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.createRequestMeta(CseClientHttpRequest.java:152)
        at 
org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.execute(CseClientHttpRequest.java:138)
        at 
org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:660)
        at 
org.springframework.web.client.RestTemplate.execute(RestTemplate.java:621)
        at 
org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:388)
        at 
org.apache.servicecomb.provider.springmvc.reference.RestTemplateWrapper.postForObject(RestTemplateWrapper.java:113)
        at 
org.apache.servicecomb.samples.localregistry.localregistryclient.LocalRegistryClient.testLocalRegistry(LocalRegistryClient.java:55)
        at 
org.apache.servicecomb.samples.localregistry.localregistryclient.LocalRegistryClient.run(LocalRegistryClient.java:45)
        at 
org.apache.servicecomb.samples.localregistry.localregistryclient.LocalRegistryClient.main(LocalRegistryClient.java:36)

  was:
use IDEA to run local-service-registry sample, 
run local-registry-server successfully, but failed when running 
local-registry-client,errors as below:
2019-01-11 10:42:07,865 [INFO] create MicroserviceVersions, appId=localservreg, 
microserviceName=localserv. 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.<init>(MicroserviceVersions.java:83)
2019-01-11 10:42:07,867 [INFO] remove microservice, appId=localservreg, 
microserviceName=localserv. 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:73)
2019-01-11 10:42:07,867 [INFO] create MicroserviceVersionRule, 
appId=localservreg, microserviceName=localserv, versionRule=0.0.0+. 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:229)
{color:red}Exception in thread "main" java.lang.IllegalStateException: Probably 
invoke a service before it is registered, or no instance found for it, 
appId=localservreg, name=localserv{color}
        at 
org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager.createReferenceConfig(ConsumerProviderManager.java:61)
        at 
org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager.createReferenceConfig(ConsumerProviderManager.java:87)
        at 
java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
        at 
org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx.computeIfAbsent(ConcurrentHashMapEx.java:56)
        at 
org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager.getReferenceConfig(ConsumerProviderManager.java:91)
        at 
org.apache.servicecomb.core.SCBEngine.getReferenceConfigForInvoke(SCBEngine.java:331)
        at 
org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.findReferenceConfig(CseClientHttpRequest.java:170)
        at 
org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.createRequestMeta(CseClientHttpRequest.java:152)
        at 
org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.execute(CseClientHttpRequest.java:138)
        at 
org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:660)
        at 
org.springframework.web.client.RestTemplate.execute(RestTemplate.java:621)
        at 
org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:388)
        at 
org.apache.servicecomb.provider.springmvc.reference.RestTemplateWrapper.postForObject(RestTemplateWrapper.java:113)
        at 
org.apache.servicecomb.samples.localregistry.localregistryclient.LocalRegistryClient.testLocalRegistry(LocalRegistryClient.java:55)
        at 
org.apache.servicecomb.samples.localregistry.localregistryclient.LocalRegistryClient.run(LocalRegistryClient.java:45)
        at 
org.apache.servicecomb.samples.localregistry.localregistryclient.LocalRegistryClient.main(LocalRegistryClient.java:36)


> local-service-registry sample of java-chassis can not run directly 
> -------------------------------------------------------------------
>
>                 Key: SCB-1109
>                 URL: https://issues.apache.org/jira/browse/SCB-1109
>             Project: Apache ServiceComb
>          Issue Type: Bug
>          Components: Java-Chassis
>    Affects Versions: java-chassis-1.1.0
>            Reporter: mabin
>            Assignee: mabin
>            Priority: Minor
>
> use IDEA to run local-service-registry sample, did not make any changes.
> 1. run local-registry-server successfully, info as below,
> 2019-01-11 10:41:57,144 [INFO] running microservice instance register task. 
> org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask.doRegister(MicroserviceInstanceRegisterTask.java:59)
> {color:red}2019-01-11 10:41:57,145 [INFO] Register microservice instance 
> success. microserviceId=f8556dbd-3fc2-4ebf-a028-bd745c9b4536 
> instanceId=eec80c40-cf39-4a22-be70-4ac97842cd67 
> endpoints=[rest://192.168.88.137:8080, 
> highway://192.168.88.137:7070?login=true] lease 120s 
> org.apache.servicecomb.serviceregistry.task.MicroserviceInstanceRegisterTask.doRegister(MicroserviceInstanceRegisterTask.java:77)
> 2019-01-11 10:41:57,145 [INFO] read MicroserviceInstanceRegisterTask status 
> is FINISHED 
> {color}org.apache.servicecomb.serviceregistry.task.ServiceCenterTask.onRegisterTask(ServiceCenterTask.java:51)
> 2019-01-11 10:41:57,145 [INFO] receive MicroserviceInstanceRegisterTask 
> event, check instance Id... 
> org.apache.servicecomb.core.SCBEngine$1.afterRegistryInstance(SCBEngine.java:182)
> 2019-01-11 10:41:57,145 [INFO] instance registry succeeds for the first time, 
> will send AFTER_REGISTRY event. 
> org.apache.servicecomb.core.SCBEngine$1.afterRegistryInstance(SCBEngine.java:184)
> 2019-01-11 10:41:57,145 [INFO] ServiceComb is ready. 
> org.apache.servicecomb.core.SCBEngine$1.afterRegistryInstance(SCBEngine.java:188)
> 2019-01-11 10:41:57,148 [INFO] Waiting for status up. timeout: 10000ms 
> org.apache.servicecomb.core.SCBEngine.waitStatusUp(SCBEngine.java:362)
> 2019-01-11 10:41:57,148 [INFO] Status already changed to up. 
> org.apache.servicecomb.core.SCBEngine.waitStatusUp(SCBEngine.java:371)
> 2. but failed when running local-registry-client,errors as below,
> 2019-01-11 10:42:07,865 [INFO] create MicroserviceVersions, 
> appId=localservreg, microserviceName=localserv. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.<init>(MicroserviceVersions.java:83)
> 2019-01-11 10:42:07,867 [INFO] remove microservice, appId=localservreg, 
> microserviceName=localserv. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:73)
> 2019-01-11 10:42:07,867 [INFO] create MicroserviceVersionRule, 
> appId=localservreg, microserviceName=localserv, versionRule=0.0.0+. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:229)
> {color:red}Exception in thread "main" java.lang.IllegalStateException: 
> Probably invoke a service before it is registered, or no instance found for 
> it, appId=localservreg, name=localserv{color}
>       at 
> org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager.createReferenceConfig(ConsumerProviderManager.java:61)
>       at 
> org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager.createReferenceConfig(ConsumerProviderManager.java:87)
>       at 
> java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
>       at 
> org.apache.servicecomb.foundation.common.concurrent.ConcurrentHashMapEx.computeIfAbsent(ConcurrentHashMapEx.java:56)
>       at 
> org.apache.servicecomb.core.provider.consumer.ConsumerProviderManager.getReferenceConfig(ConsumerProviderManager.java:91)
>       at 
> org.apache.servicecomb.core.SCBEngine.getReferenceConfigForInvoke(SCBEngine.java:331)
>       at 
> org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.findReferenceConfig(CseClientHttpRequest.java:170)
>       at 
> org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.createRequestMeta(CseClientHttpRequest.java:152)
>       at 
> org.apache.servicecomb.provider.springmvc.reference.CseClientHttpRequest.execute(CseClientHttpRequest.java:138)
>       at 
> org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:660)
>       at 
> org.springframework.web.client.RestTemplate.execute(RestTemplate.java:621)
>       at 
> org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:388)
>       at 
> org.apache.servicecomb.provider.springmvc.reference.RestTemplateWrapper.postForObject(RestTemplateWrapper.java:113)
>       at 
> org.apache.servicecomb.samples.localregistry.localregistryclient.LocalRegistryClient.testLocalRegistry(LocalRegistryClient.java:55)
>       at 
> org.apache.servicecomb.samples.localregistry.localregistryclient.LocalRegistryClient.run(LocalRegistryClient.java:45)
>       at 
> org.apache.servicecomb.samples.localregistry.localregistryclient.LocalRegistryClient.main(LocalRegistryClient.java:36)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to