tangzhexu opened a new issue #2123:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2123


   Edge-service网关转发到servicecomb服务正常,但是转发到cloud-huawei的微服务,抛异常
   cse-dependency 版本:2.3.62
   cloud-huawe版本:1.3.7
   
   servicecomb服务和cloud-huawei微服务都正常注册到cse,并且注册契约正常
   
   edge-service配置信息:
     http:
       dispatcher:
         edge:
           url:
             enabled: true
             mappings:
               cloud-test:
                 prefixSegmentCount: 2
                 path: "/rest/test/.*"
                 microserviceName: cloud-test
                 versionRule: 0.0.1-2.0.0
               cloud-upms-biz:
                 prefixSegmentCount: 2
                 path: "/rest/admin/.*"
                 microserviceName: cloud-upms-biz
   #              versionRule: 0.0.1-2.0.0
   
   
   异常信息如下:
   java.lang.NullPointerException
        at org.apache.servicecomb.common.javassist.CtType.<init>(CtType.java:52)
        at 
org.apache.servicecomb.common.javassist.MethodConfig.addParameter(MethodConfig.java:72)
        at 
org.apache.servicecomb.swagger.converter.SwaggerToClassGenerator.convertToInterface(SwaggerToClassGenerator.java:229)
        at 
org.apache.servicecomb.swagger.converter.SwaggerToClassGenerator.convert(SwaggerToClassGenerator.java:144)
        at 
org.apache.servicecomb.core.definition.SchemaMeta.<init>(SchemaMeta.java:70)
        at 
org.apache.servicecomb.core.definition.loader.SchemaLoader.registerSchema(SchemaLoader.java:85)
        at 
org.apache.servicecomb.core.definition.schema.ConsumerSchemaFactory.createSchema(ConsumerSchemaFactory.java:61)
        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:45)
        at 
org.apache.servicecomb.core.definition.MicroserviceVersionMetaFactory.create(MicroserviceVersionMetaFactory.java:38)
        at 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.lambda$setInstances$0(MicroserviceVersions.java:181)
        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:179)
        at 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.safeSetInstances(MicroserviceVersions.java:159)
        at 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.pullInstances(MicroserviceVersions.java:154)
        at 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.submitPull(MicroserviceVersions.java:126)
        at 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.lambda$getOrCreateMicroserviceVersions$0(MicroserviceManager.java:55)
        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.MicroserviceManager.getOrCreateMicroserviceVersions(MicroserviceManager.java:53)
        at 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.getOrCreateMicroserviceVersionRule(MicroserviceManager.java:79)
        at 
org.apache.servicecomb.serviceregistry.consumer.AppManager.getOrCreateMicroserviceVersionRule(AppManager.java:67)
        at 
org.apache.servicecomb.edge.core.EdgeInvocation.findMicroserviceVersionMeta(EdgeInvocation.java:85)
        at 
org.apache.servicecomb.edge.core.EdgeInvocation.edgeInvoke(EdgeInvocation.java:68)
        at 
org.apache.servicecomb.edge.core.URLMappedEdgeDispatcher.onRequest(URLMappedEdgeDispatcher.java:159)
        at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:219)
        at 
io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:120)
        at 
io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:133)
        at 
org.apache.servicecomb.transport.rest.vertx.RestBodyHandler$BHandler.doEnd(RestBodyHandler.java:270)
        at 
org.apache.servicecomb.transport.rest.vertx.RestBodyHandler$BHandler.end(RestBodyHandler.java:251)
        at 
org.apache.servicecomb.transport.rest.vertx.RestBodyHandler.lambda$handle$0(RestBodyHandler.java:91)
        at 
io.vertx.core.http.impl.HttpServerRequestImpl.handleEnd(HttpServerRequestImpl.java:417)
        at 
io.vertx.core.http.impl.Http1xServerConnection.handleEnd(Http1xServerConnection.java:482)
        at 
io.vertx.core.http.impl.Http1xServerConnection.processMessage(Http1xServerConnection.java:456)
        at 
io.vertx.core.http.impl.Http1xServerConnection.handleMessage(Http1xServerConnection.java:144)
        at 
io.vertx.core.http.impl.HttpServerImpl$ServerHandlerWithWebSockets.handleMessage(HttpServerImpl.java:712)
        at 
io.vertx.core.http.impl.HttpServerImpl$ServerHandlerWithWebSockets.handleMessage(HttpServerImpl.java:619)
        at 
io.vertx.core.net.impl.VertxHandler.lambda$channelRead$1(VertxHandler.java:146)
        at 
io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:337)
        at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:195)
        at 
io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:144)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at 
io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
        at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
   2020-12-10 16:18:00,447 [INFO] remove microservice, appId=cloud-huawei, 
microserviceName=cloud-upms-biz. 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceManager.removeMicroservice(MicroserviceManager.java:73)
   2020-12-10 16:18:00,447 [INFO] create MicroserviceVersionRule, 
appId=cloud-huawei, microserviceName=cloud-upms-biz, versionRule=0.0.0+. 
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions.createAndInitMicroserviceVersionRule(MicroserviceVersions.java:229)
   2020-12-10 16:18:00,447 [ERROR] unexpected failure happened 
org.apache.servicecomb.transport.rest.vertx.RestServerVerticle.lambda$mountGlobalRestFailureHandler$2(RestServerVerticle.java:143)
   org.apache.servicecomb.foundation.common.exceptions.ServiceCombException: 
Failed to find latest MicroserviceVersionMeta, appId=cloud-huawei, 
microserviceName=cloud-upms-biz, versionRule=0.0.0+.
        at 
org.apache.servicecomb.edge.core.EdgeInvocation.findMicroserviceVersionMeta(EdgeInvocation.java:90)
        at 
org.apache.servicecomb.edge.core.EdgeInvocation.edgeInvoke(EdgeInvocation.java:68)
        at 
org.apache.servicecomb.edge.core.URLMappedEdgeDispatcher.onRequest(URLMappedEdgeDispatcher.java:159)
        at io.vertx.ext.web.impl.RouteImpl.handleContext(RouteImpl.java:219)
        at 
io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:120)
        at 
io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:133)
        at 
org.apache.servicecomb.transport.rest.vertx.RestBodyHandler$BHandler.doEnd(RestBodyHandler.java:270)
        at 
org.apache.servicecomb.transport.rest.vertx.RestBodyHandler$BHandler.end(RestBodyHandler.java:251)
        at 
org.apache.servicecomb.transport.rest.vertx.RestBodyHandler.lambda$handle$0(RestBodyHandler.java:91)
        at 
io.vertx.core.http.impl.HttpServerRequestImpl.handleEnd(HttpServerRequestImpl.java:417)
        at 
io.vertx.core.http.impl.Http1xServerConnection.handleEnd(Http1xServerConnection.java:482)
        at 
io.vertx.core.http.impl.Http1xServerConnection.processMessage(Http1xServerConnection.java:456)
        at 
io.vertx.core.http.impl.Http1xServerConnection.handleMessage(Http1xServerConnection.java:144)
        at 
io.vertx.core.http.impl.HttpServerImpl$ServerHandlerWithWebSockets.handleMessage(HttpServerImpl.java:712)
        at 
io.vertx.core.http.impl.HttpServerImpl$ServerHandlerWithWebSockets.handleMessage(HttpServerImpl.java:619)
        at 
io.vertx.core.net.impl.VertxHandler.lambda$channelRead$1(VertxHandler.java:146)
        at 
io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:337)
        at io.vertx.core.impl.ContextImpl.executeFromIO(ContextImpl.java:195)
        at 
io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:144)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at 
io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at 
io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
        at 
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
        at 
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
        at 
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
        at 
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
        at 
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
        at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to