afan321 opened a new issue #1436: 微服务间接口调用失败
URL: https://github.com/apache/servicecomb-java-chassis/issues/1436
 
 
   同一个应用下3个服务A B C. A 去调用C 的接口是好的.但当B 去调用C的接口时报错 Probably invoke a service 
before it is registered, or no instance found for it. 
想问下消费者这边那些配置可能会影响到这种接口的调用. 报错的信息如下2019-12-03 18:59:17,647 [pool-8-thread-2] 
INFO  o.a.s.s.consumer.MicroserviceVersions:83 - create MicroserviceVersions, 
appId=CloudTest, microserviceName=userAuth.
   2019-12-03 18:59:17,653 [pool-8-thread-2] INFO  
o.a.s.s.registry.AbstractServiceRegistry:260 - find instances[1] from service 
center success. service=CloudTest/userAuth/0.0.0+, old revision=null, new 
revision=2726e0d04cc69c18cbf5689585a7baf56b90f175
   2019-12-03 18:59:17,653 [pool-8-thread-2] INFO  
o.a.s.s.registry.AbstractServiceRegistry:268 - service 
id=a55095d8049aa5fe2eea91d84f7b4ee454627221, instance 
id=960fc60415b911eab7bd286ed48991d4, endpoints=[rest://127.0.0.1:12582]
   2019-12-03 18:59:17,655 [pool-8-thread-2] INFO  
o.a.s.core.definition.MicroserviceVersionMeta:56 - get or create 
MicroserviceMeta from microserviceMetaManager for userAuth.
   2019-12-03 18:59:17,655 [pool-8-thread-2] INFO  
o.a.s.c.d.classloader.MicroserviceClassLoader:41 - create classloader for 
microservice CloudTest:userAuth:0.0.2.
   2019-12-03 18:59:17,656 [pool-8-thread-2] INFO  
o.a.s.core.definition.schema.ConsumerSchemaFactory:73 - load schema from 
service center, microservice=CloudTest:userAuth:0.0.2, 
schemaId=AuthencationController, result=true
   2019-12-03 18:59:17,659 [pool-8-thread-2] ERROR 
o.a.s.s.consumer.MicroserviceVersions:166 - Failed to setInstances, 
appId=CloudTest, microserviceName=userAuth.
   org.apache.servicecomb.foundation.common.exceptions.ServiceCombException: 
**Parse swagger from content failed,** 
        at 
org.apache.servicecomb.swagger.SwaggerUtils.parseSwagger(SwaggerUtils.java:75)
        at 
org.apache.servicecomb.core.definition.SchemaUtils.parseSwagger(SchemaUtils.java:48)
        at 
org.apache.servicecomb.core.definition.schema.ConsumerSchemaFactory.loadSwagger(ConsumerSchemaFactory.java:81)
        at 
org.apache.servicecomb.core.definition.schema.ConsumerSchemaFactory.createSchema(ConsumerSchemaFactory.java:58)
        at 
org.apache.servicecomb.core.definition.schema.ConsumerSchemaFactory.createSchema(ConsumerSchemaFactory.java:33)
        at 
org.apache.servicecomb.core.definition.schema.AbstractSchemaFactory.getOrCreateSchema(AbstractSchemaFactory.java:58)
        at 
org.apache.servicecomb.core.definition.schema.ConsumerSchemaFactory.createConsumerSchema(ConsumerSchemaFactory.java:48)
        at 
org.apache.servicecomb.core.definition.MicroserviceVersionMeta.<init>(MicroserviceVersionMeta.java:70)
        at 
org.apache.servicecomb.core.definition.MicroserviceVersionMetaFactory.create(MicroserviceVersionMetaFactory.java:38)
        at 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.lambda$setInstances$0(MicroserviceVersions.java:184)
        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.serviceregistry.consumer.MicroserviceVersions.setInstances(MicroserviceVersions.java:183)
        at 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.safeSetInstances(MicroserviceVersions.java:163)
        at 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.pullInstances(MicroserviceVersions.java:158)Caused
 by: **java.lang.NoSuchMethodError: 
com.fasterxml.jackson.core.JsonStreamContext.<init>(II)V
        at 
com.fasterxml.jackson.databind.util.TokenBufferReadContext.<init>**(TokenBufferReadContext.java:59)
        at 
com.fasterxml.jackson.databind.util.TokenBufferReadContext.createRootContext(TokenBufferReadContext.java:89)
        at 
com.fasterxml.jackson.databind.util.TokenBuffer$Parser.<init>(TokenBuffer.java:1298)
        at 
com.fasterxml.jackson.databind.util.TokenBuffer.asParser(TokenBuffer.java:276)
        at 
com.fasterxml.jackson.databind.util.TokenBuffer.asParser(TokenBuffer.java:242)
        at 
com.fasterxml.jackson.databind.ObjectMapper._convert(ObjectMapper.java:3731)
        at 
com.fasterxml.jackson.databind.ObjectMapper.convertValue(ObjectMapper.java:3668)
        at 
io.swagger.util.PathDeserializer.deserialize(PathDeserializer.java:27)
        at 
io.swagger.util.PathDeserializer.deserialize(PathDeserializer.java:14)
        at 
com.fasterxml.jackson.databind.deser.std.MapDeserializer._readAndBindStringKeyMap(MapDeserializer.java:527)
        at 
com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:364)
        at 
com.fasterxml.jackson.databind.deser.std.MapDeserializer.deserialize(MapDeserializer.java:29)
        at 
com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:127)
        at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
        at 
com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
        at 
com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4013)
        at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3004)
        at 
org.apache.servicecomb.swagger.SwaggerUtils.internalParseSwagger(SwaggerUtils.java:102)
        at 
org.apache.servicecomb.swagger.SwaggerUtils.parseSwagger(SwaggerUtils.java:73)
        ... 105 common frames omitted
   2019-12-03 18:59:17,659 [pool-8-thread-2] INFO  
o.a.s.serviceregistry.consumer.MicroserviceManager:76 - remove microservice, 
appId=CloudTest, microserviceName=userAuth.
   2019-12-03 18:59:17,660 [pool-8-thread-2] INFO  
o.a.s.s.consumer.MicroserviceVersions:227 - create MicroserviceVersionRule, 
appId=CloudTest, microserviceName=userAuth, versionRule=0+.
   2019-12-03 18:59:17,660 [pool-8-thread-2] INFO  
o.a.s.s.consumer.MicroserviceVersionRule:113 - update instances to be empty 
caused by version rule, appId=CloudTest, microserviceName=userAuth, 
versionRule=0.0.0.0+, latestVersion=null, inputVersionCount=0, 
inputInstanceCount=1
   2019-12-03 18:59:17,661 [pool-8-thread-2] ERROR 
o.a.s.s.i.e.DefaultExceptionToProducerResponseConverter:35 - invoke failed, 
invocation=PRODUCER rest commom.CaseSuitBatchesController.test
   java.lang.IllegalStateException: **Probably invoke a service before it is 
registered, or no instance found for it, appId=CloudTest, name=userAuth**
        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:332)
        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:735)
        at 
org.springframework.web.client.RestTemplate.execute(RestTemplate.java:670)
        at 
org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:579)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to