[jira] [Commented] (SCB-1489) Micro-service instance wouldn't work after we shotdown our service center for updating while we had enable RSA authentication between services.

2019-10-17 Thread Ang Li (Jira)


[ 
https://issues.apache.org/jira/browse/SCB-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16954199#comment-16954199
 ] 

Ang Li commented on SCB-1489:
-

The re-registering process has been changed by [GitHub Pull Request 
#1355|https://github.com/apache/servicecomb-java-chassis/pull/1355], now 
instance will use instanceId obtained by service center at the beginning till 
the process termination.

It can be checked by following steps:
 # Start a servicecomb service and the instance will be registered to service 
center
 # Munally delete the instance in service center
 # Check the log, every instanceId will be the same now

> Micro-service instance wouldn't work after we shotdown our service center for 
> updating while we had enable RSA authentication between services.
> ---
>
> Key: SCB-1489
> URL: https://issues.apache.org/jira/browse/SCB-1489
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: Liu HuaiZhou
>Assignee: Ang Li
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> We had add RSA authentication between services following [Documents 
> |[https://docs.servicecomb.io/java-chassis/en_US/security/rsa.html]]. The 
> micro-service instances interrupted when we shutdown service center and 
> update it for latest version.Following are snap logs for comsumer and 
> provider instances.
> consumer log:
>  [2019-04-27 05:58:10,995/UTC][main][INFO]InvocationException: 
> code=490;msg=CommonExceptionData [message=Cse Internal Bad Request] 
> com.huawei.paas.cse.demo.pojo.client.PojoClient.main(PojoClient.java:119)
>  [2019-04-27 05:58:12,995/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,001/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersionRule, 
> appId=liushuang-noauth, microserviceName=pojolwx585706, versionRule=0.0.0+. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:231)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,004/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,004/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,004/UTC][main][ERROR]invoke failed, 
> pojolwx585706.helloworldGreeter.SayHello 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:80)
>  org.apache.servicecomb.foundation.common.exceptions.ServiceCombException: 
> org.apache.servicecomb.core.filter.OperationInstancesDiscoveryFilter 
> discovery return null.
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.doDiscovery(DiscoveryTree.java:169)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:130)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:123)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.getOrCreateLoadBalancer(LoadbalanceHandler.java:360)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.handle(LoadbalanceHandler.java:179)
>  at org.apache.servicecomb.core.Invocation.next(Invocation.java:151)
>  at 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:72)
>  at org.apache.servicecomb.provider.pojo.Invoker.sync

[jira] [Commented] (SCB-1489) Micro-service instance wouldn't work after we shotdown our service center for updating while we had enable RSA authentication between services.

2019-10-17 Thread Ang Li (Jira)


[ 
https://issues.apache.org/jira/browse/SCB-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16953688#comment-16953688
 ] 

Ang Li commented on SCB-1489:
-

We need to figure out why resetting instanceId when re-registering microservice 
to service center first.

If the root cause is correct, the problem will be solved when using old 
instanceId to re-register microservice

> Micro-service instance wouldn't work after we shotdown our service center for 
> updating while we had enable RSA authentication between services.
> ---
>
> Key: SCB-1489
> URL: https://issues.apache.org/jira/browse/SCB-1489
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: Liu HuaiZhou
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We had add RSA authentication between services following [Documents 
> |[https://docs.servicecomb.io/java-chassis/en_US/security/rsa.html]]. The 
> micro-service instances interrupted when we shutdown service center and 
> update it for latest version.Following are snap logs for comsumer and 
> provider instances.
> consumer log:
>  [2019-04-27 05:58:10,995/UTC][main][INFO]InvocationException: 
> code=490;msg=CommonExceptionData [message=Cse Internal Bad Request] 
> com.huawei.paas.cse.demo.pojo.client.PojoClient.main(PojoClient.java:119)
>  [2019-04-27 05:58:12,995/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,001/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersionRule, 
> appId=liushuang-noauth, microserviceName=pojolwx585706, versionRule=0.0.0+. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:231)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,004/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,004/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,004/UTC][main][ERROR]invoke failed, 
> pojolwx585706.helloworldGreeter.SayHello 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:80)
>  org.apache.servicecomb.foundation.common.exceptions.ServiceCombException: 
> org.apache.servicecomb.core.filter.OperationInstancesDiscoveryFilter 
> discovery return null.
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.doDiscovery(DiscoveryTree.java:169)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:130)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:123)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.getOrCreateLoadBalancer(LoadbalanceHandler.java:360)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.handle(LoadbalanceHandler.java:179)
>  at org.apache.servicecomb.core.Invocation.next(Invocation.java:151)
>  at 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:72)
>  at org.apache.servicecomb.provider.pojo.Invoker.syncInvoke(Invoker.java:161)
>  at org.apache.servicecomb.provider.pojo.Invoker.invoke(Invoker.java:157)
>  at com.sun.proxy.$Proxy28.SayHello(Unknown Source)
>  at com.huawei.paas.cse.demo.pojo.client.PojoClient.main(PojoClient.java:107)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Na

[jira] [Commented] (SCB-1489) Micro-service instance wouldn't work after we shotdown our service center for updating while we had enable RSA authentication between services.

2019-10-16 Thread Ang Li (Jira)


[ 
https://issues.apache.org/jira/browse/SCB-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16953349#comment-16953349
 ] 

Ang Li commented on SCB-1489:
-

The root cause is the instanceId changed while the token unchanged.

I think the problem will be solved after restarting the instance because both 
the token and the instanceId will be updated.

Maybe the problem can be easily solved just keeping the instanceId immutable 
while the instance running.

> Micro-service instance wouldn't work after we shotdown our service center for 
> updating while we had enable RSA authentication between services.
> ---
>
> Key: SCB-1489
> URL: https://issues.apache.org/jira/browse/SCB-1489
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: Liu HuaiZhou
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We had add RSA authentication between services following [Documents 
> |[https://docs.servicecomb.io/java-chassis/en_US/security/rsa.html]]. The 
> micro-service instances interrupted when we shutdown service center and 
> update it for latest version.Following are snap logs for comsumer and 
> provider instances.
> consumer log:
>  [2019-04-27 05:58:10,995/UTC][main][INFO]InvocationException: 
> code=490;msg=CommonExceptionData [message=Cse Internal Bad Request] 
> com.huawei.paas.cse.demo.pojo.client.PojoClient.main(PojoClient.java:119)
>  [2019-04-27 05:58:12,995/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,001/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersionRule, 
> appId=liushuang-noauth, microserviceName=pojolwx585706, versionRule=0.0.0+. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:231)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,004/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,004/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,004/UTC][main][ERROR]invoke failed, 
> pojolwx585706.helloworldGreeter.SayHello 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:80)
>  org.apache.servicecomb.foundation.common.exceptions.ServiceCombException: 
> org.apache.servicecomb.core.filter.OperationInstancesDiscoveryFilter 
> discovery return null.
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.doDiscovery(DiscoveryTree.java:169)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:130)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:123)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.getOrCreateLoadBalancer(LoadbalanceHandler.java:360)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.handle(LoadbalanceHandler.java:179)
>  at org.apache.servicecomb.core.Invocation.next(Invocation.java:151)
>  at 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:72)
>  at org.apache.servicecomb.provider.pojo.Invoker.syncInvoke(Invoker.java:161)
>  at org.apache.servicecomb.provider.pojo.Invoker.invoke(Invoker.java:157)
>  at com.sun.proxy.$Proxy28.SayHello(Unknown Source)
>  at com.huawei.paas.cse.demo.pojo.client.PojoClie

[jira] [Commented] (SCB-1489) Micro-service instance wouldn't work after we shotdown our service center for updating while we had enable RSA authentication between services.

2019-10-15 Thread Haishi Yao (Jira)


[ 
https://issues.apache.org/jira/browse/SCB-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16951966#comment-16951966
 ] 

Haishi Yao commented on SCB-1489:
-

I think there are at least two improvements should be done:
1. java-chassis should check the error response content from service-center. 
Not all kind of error cause the microservice instance rerun the 
microservice/instance register process.
2. once the instanceId is changed, the token cache in RSAConsumerTokenManager 
should be refreshed instantly.

> Micro-service instance wouldn't work after we shotdown our service center for 
> updating while we had enable RSA authentication between services.
> ---
>
> Key: SCB-1489
> URL: https://issues.apache.org/jira/browse/SCB-1489
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: Liu HuaiZhou
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We had add RSA authentication between services following [Documents 
> |[https://docs.servicecomb.io/java-chassis/en_US/security/rsa.html]]. The 
> micro-service instances interrupted when we shutdown service center and 
> update it for latest version.Following are snap logs for comsumer and 
> provider instances.
> consumer log:
>  [2019-04-27 05:58:10,995/UTC][main][INFO]InvocationException: 
> code=490;msg=CommonExceptionData [message=Cse Internal Bad Request] 
> com.huawei.paas.cse.demo.pojo.client.PojoClient.main(PojoClient.java:119)
>  [2019-04-27 05:58:12,995/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,001/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersionRule, 
> appId=liushuang-noauth, microserviceName=pojolwx585706, versionRule=0.0.0+. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:231)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,004/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,004/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,004/UTC][main][ERROR]invoke failed, 
> pojolwx585706.helloworldGreeter.SayHello 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:80)
>  org.apache.servicecomb.foundation.common.exceptions.ServiceCombException: 
> org.apache.servicecomb.core.filter.OperationInstancesDiscoveryFilter 
> discovery return null.
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.doDiscovery(DiscoveryTree.java:169)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:130)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:123)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.getOrCreateLoadBalancer(LoadbalanceHandler.java:360)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.handle(LoadbalanceHandler.java:179)
>  at org.apache.servicecomb.core.Invocation.next(Invocation.java:151)
>  at 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:72)
>  at org.apache.servicecomb.provider.pojo.Invoker.syncInvoke(Invoker.java:161)
>  at org.apache.servicecomb.provider.pojo.Invoker.invoke(Invoker.java:157)
>  at com.sun.proxy.$Proxy28.SayHello(Unknown

[jira] [Commented] (SCB-1489) Micro-service instance wouldn't work after we shotdown our service center for updating while we had enable RSA authentication between services.

2019-10-15 Thread Haishi Yao (Jira)


[ 
https://issues.apache.org/jira/browse/SCB-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16951964#comment-16951964
 ] 

Haishi Yao commented on SCB-1489:
-

Hello, I met the similar problem, and here may be the actual root cause:
1. service-center gets some error and may response error randomly.
2. consumer may get heartbeat failure and try to rerun the microservice 
register process. When it try to query the microservice record, service-center 
response a failure and mislead the consumer that its microservice record does 
not exist. As a result, the consumer clear its instanceId cache and rerun 
instance registry process. After that, the instanceId of consumer is changed, 
while the token cache in RSAConsumerTokenManager is not refreshed.
3. consumer send request to provider, with the old token. And provider parse 
the outdated consumer instanceId from the token. And there is no instance can 
be found in service-center by that instanceId.

> Micro-service instance wouldn't work after we shotdown our service center for 
> updating while we had enable RSA authentication between services.
> ---
>
> Key: SCB-1489
> URL: https://issues.apache.org/jira/browse/SCB-1489
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: Liu HuaiZhou
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We had add RSA authentication between services following [Documents 
> |[https://docs.servicecomb.io/java-chassis/en_US/security/rsa.html]]. The 
> micro-service instances interrupted when we shutdown service center and 
> update it for latest version.Following are snap logs for comsumer and 
> provider instances.
> consumer log:
>  [2019-04-27 05:58:10,995/UTC][main][INFO]InvocationException: 
> code=490;msg=CommonExceptionData [message=Cse Internal Bad Request] 
> com.huawei.paas.cse.demo.pojo.client.PojoClient.main(PojoClient.java:119)
>  [2019-04-27 05:58:12,995/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,001/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersionRule, 
> appId=liushuang-noauth, microserviceName=pojolwx585706, versionRule=0.0.0+. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:231)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,004/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,004/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,004/UTC][main][ERROR]invoke failed, 
> pojolwx585706.helloworldGreeter.SayHello 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:80)
>  org.apache.servicecomb.foundation.common.exceptions.ServiceCombException: 
> org.apache.servicecomb.core.filter.OperationInstancesDiscoveryFilter 
> discovery return null.
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.doDiscovery(DiscoveryTree.java:169)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:130)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:123)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.getOrCreateLoadBalancer(LoadbalanceHandler.java:360)
>  at 
> org.apache.servicecomb.l

[jira] [Commented] (SCB-1489) Micro-service instance wouldn't work after we shotdown our service center for updating while we had enable RSA authentication between services.

2019-09-19 Thread Liu HuaiZhou (Jira)


[ 
https://issues.apache.org/jira/browse/SCB-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16933929#comment-16933929
 ] 

Liu HuaiZhou commented on SCB-1489:
---

这个问题确实不太好复现,一般在长稳测试比较容易浮现。

1 在开启RSA认证的情况下,Consumer 需要携带token 才能访问其他服务,这个token 
由RSAConsumerTokenManager签发,在客户端有效期是

RSAAuthenticationToken.TOKEN_ACTIVE_TIME - 15 * 60 * 1000

> Micro-service instance wouldn't work after we shotdown our service center for 
> updating while we had enable RSA authentication between services.
> ---
>
> Key: SCB-1489
> URL: https://issues.apache.org/jira/browse/SCB-1489
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: Liu HuaiZhou
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We had add RSA authentication between services following [Documents 
> |[https://docs.servicecomb.io/java-chassis/en_US/security/rsa.html]]. The 
> micro-service instances interrupted when we shutdown service center and 
> update it for latest version.Following are snap logs for comsumer and 
> provider instances.
> consumer log:
>  [2019-04-27 05:58:10,995/UTC][main][INFO]InvocationException: 
> code=490;msg=CommonExceptionData [message=Cse Internal Bad Request] 
> com.huawei.paas.cse.demo.pojo.client.PojoClient.main(PojoClient.java:119)
>  [2019-04-27 05:58:12,995/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,001/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersionRule, 
> appId=liushuang-noauth, microserviceName=pojolwx585706, versionRule=0.0.0+. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:231)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,004/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,004/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,004/UTC][main][ERROR]invoke failed, 
> pojolwx585706.helloworldGreeter.SayHello 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:80)
>  org.apache.servicecomb.foundation.common.exceptions.ServiceCombException: 
> org.apache.servicecomb.core.filter.OperationInstancesDiscoveryFilter 
> discovery return null.
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.doDiscovery(DiscoveryTree.java:169)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:130)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:123)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.getOrCreateLoadBalancer(LoadbalanceHandler.java:360)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.handle(LoadbalanceHandler.java:179)
>  at org.apache.servicecomb.core.Invocation.next(Invocation.java:151)
>  at 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:72)
>  at org.apache.servicecomb.provider.pojo.Invoker.syncInvoke(Invoker.java:161)
>  at org.apache.servicecomb.provider.pojo.Invoker.invoke(Invoker.java:157)
>  at com.sun.proxy.$Proxy28.SayHello(Unknown Source)
>  at com.huawei.paas.cse.demo.pojo.client.PojoClient.main(PojoClient.java:107)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>  at 
> sun.reflec

[jira] [Commented] (SCB-1489) Micro-service instance wouldn't work after we shotdown our service center for updating while we had enable RSA authentication between services.

2019-09-18 Thread YaoHaishi (Jira)


[ 
https://issues.apache.org/jira/browse/SCB-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16932281#comment-16932281
 ] 

YaoHaishi commented on SCB-1489:


Hello, I cannot reproduce this problem. And I find that the stacktrack in your 
log is
{code:java}
at 
org.apache.servicecomb.foundation.common.utils.RSAUtils.verify(RSAUtils.java:106)
at 
org.apache.servicecomb.authentication.provider.RSAProviderTokenManager.valid(RSAProviderTokenManager.java:60)
{code}
But according to the lastest code of ServiceComb-Java-Chassis, the invocation 
stacktrack should be 
{code:java}
RSAProviderTokenManager#valid -> RSAProviderTokenManager#isValidToken -> 
RSAUtils#verify
{code}
Can you check the latest revision of master branch? If there is still the 
problem, please desribe the reproduce steps in details, thanks : )

> Micro-service instance wouldn't work after we shotdown our service center for 
> updating while we had enable RSA authentication between services.
> ---
>
> Key: SCB-1489
> URL: https://issues.apache.org/jira/browse/SCB-1489
> Project: Apache ServiceComb
>  Issue Type: Bug
>  Components: Java-Chassis
>Reporter: Liu HuaiZhou
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> We had add RSA authentication between services following [Documents 
> |[https://docs.servicecomb.io/java-chassis/en_US/security/rsa.html]]. The 
> micro-service instances interrupted when we shutdown service center and 
> update it for latest version.Following are snap logs for comsumer and 
> provider instances.
> consumer log:
>  [2019-04-27 05:58:10,995/UTC][main][INFO]InvocationException: 
> code=490;msg=CommonExceptionData [message=Cse Internal Bad Request] 
> com.huawei.paas.cse.demo.pojo.client.PojoClient.main(PojoClient.java:119)
>  [2019-04-27 05:58:12,995/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,001/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersionRule, 
> appId=liushuang-noauth, microserviceName=pojolwx585706, versionRule=0.0.0+. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:231)
>  [2019-04-27 05:58:13,001/UTC][main][INFO]create MicroserviceVersions, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.(MicroserviceVersions.java:84)
>  [2019-04-27 
> 05:58:13,004/UTC][registry-vert.x-eventloop-thread-0][WARN]failed to 
> findInstances:
> {"errorCode":"400012","errorMessage":"Micro-service does not 
> exist","detail":"Consumer does not exist."}
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl.lambda$null$4(ServiceRegistryClientImpl.java:213)
>  [2019-04-27 05:58:13,004/UTC][main][INFO]remove microservice, 
> appId=liushuang-noauth, microserviceName=pojolwx585706. 
> org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:76)
>  [2019-04-27 05:58:13,004/UTC][main][ERROR]invoke failed, 
> pojolwx585706.helloworldGreeter.SayHello 
> org.apache.servicecomb.core.provider.consumer.InvokerUtils.innerSyncInvoke(InvokerUtils.java:80)
>  org.apache.servicecomb.foundation.common.exceptions.ServiceCombException: 
> org.apache.servicecomb.core.filter.OperationInstancesDiscoveryFilter 
> discovery return null.
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.doDiscovery(DiscoveryTree.java:169)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:130)
>  at 
> org.apache.servicecomb.serviceregistry.discovery.DiscoveryTree.discovery(DiscoveryTree.java:123)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.getOrCreateLoadBalancer(LoadbalanceHandler.java:360)
>  at 
> org.apache.servicecomb.loadbalance.LoadbalanceHandler.handle(LoadbalanceHandler.java:179)
>  at org.apache.servicecomb.core.Invocation.next(Invocation.java:151)
>  a