You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicecomb.apache.org by Willem Jiang <wi...@gmail.com> on 2018/07/24 03:17:47 UTC

Cannot find the instance in ServiceComb Discovery

Hi

When I recovery the old saga code in the SCB-692 branch[1] , I got the
error when running the ServiceCenterDiscoveryRestTransportTest in the
ServiceComb Discovery module.
It looks like the service provide already registered, but the Service Path
Manager cannot find the right instance. I tried to debug the code, but
there are some points those I missed.

You can reproduce the error by checking out the saga code and switch to
SCB-692 branch.

[1]https://github.com/apache/incubator-servicecomb-saga/tree/SCB-692

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

Re: Cannot find the instance in ServiceComb Discovery

Posted by wjm wjm <zz...@gmail.com>.
about saga can not find hotel:
you did not have a correct running order:
    hotel did not start, but saga begin to invoke it.

service-center> 2018-07-25 08:24:49.714 +00:00 INFO
service/microservice.go:182 create micro-service successful,
saga/hotel-reservation-service/0.0.1, serviceId:
327ca84d8fe411e8a8b70242ac110002. operator: 172.17.0.6

......

saga> 08:25:23.724 [registry-vert.x-eventloop-thread-0] WARN
org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl
- {"errorCode":"400012","errorMessage":"Micro-service does not
exist","detail":"provider not exist, consumer
44d4c3a88fe411e8a8b70242ac110002 find provider
saga/hotel-reservation-service/0.0.0+"}

......

hotel> 2018-07-25 08:25:25.658  INFO 1 --- [       Thread-5]
o.a.s.s.r.AbstractServiceRegistry        : Unregister microservice
instance success. microserviceId=327ca84d8fe411e8a8b70242ac110002
instanceId=329b2c168fe411e8a8b70242ac110002



2018-07-25 20:28 GMT+08:00 wjm wjm <zz...@gmail.com>:

> 1.saga-spring project, some classes import io.servicecomb packages, should
> update to org.apache.servicecomb
> 2.org.apache.servicecomb.saga.spring.SagaServiceDiscoveryTest#setUpLocalRegistry
> has the same registry declare problem
>
> 2018-07-25 17:02 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>
>> FYI,  you can find full log file here[1]
>>
>> [1]https://api.travis-ci.org/v3/job/407953904/log.txt
>>
>>
>> Willem Jiang
>>
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>> On Wed, Jul 25, 2018 at 4:09 PM, Willem Jiang <wi...@gmail.com>
>> wrote:
>>
>> > It looks like there is still some thing wrong when using the
>> > service-center to discover the published services when running the
>> > integration test of dependency-free-transaction-demo: demo-tests.
>> > You can reproduce the error by checking out the SCB-692 and running the
>> > test from saga-demo/dependency-free-transaction-demo/demo-tests
>> >
>> > saga> 07:27:11.094 [saga-pool-thread-3] INFO
>> org.apache.servicecomb.saga.core.LoggingRecoveryPolicy
>> > - Starting request id=request-hotel for service
>> hotel-reservation-service
>> > saga> 07:27:11.136 [saga-pool-thread-2] INFO  org.apache.servicecomb.
>> > serviceregistry.consumer.MicroserviceVersions - create
>> > MicroserviceVersions, appId=saga, microserviceName=car-rental-service.
>> > saga> 07:27:11.137 [saga-pool-thread-4] INFO  org.apache.servicecomb.
>> > serviceregistry.consumer.MicroserviceVersions - create
>> > MicroserviceVersions, appId=saga, microserviceName=flight-bookin
>> g-service.
>> > saga> 07:27:11.137 [saga-pool-thread-3] INFO  org.apache.servicecomb.
>> > serviceregistry.consumer.MicroserviceVersions - create
>> > MicroserviceVersions, appId=saga, microserviceName=hotel-
>> > reservation-service.
>> > service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
>> > service/instance.go:538 find instance failed, provider not exist,
>> consumer
>> > 2342a4c78fdc11e8a80c0242ac110002 find provider
>> > saga/flight-booking-service/0.0.0+
>> > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
>> > service/instance.go:538 find instance failed, provider not exist,
>> consumer
>> > 2342a4c78fdc11e8a80c0242ac110002 find provider
>> > saga/car-rental-service/0.0.0+
>> > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
>> > service/instance.go:538 find instance failed, provider not exist,
>> consumer
>> > 2342a4c78fdc11e8a80c0242ac110002 find provider saga/hotel-reservation-
>> > service/0.0.0+
>> > saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
>> > org.apache.servicecomb.serviceregistry.client.http.ServiceRe
>> gistryClientImpl
>> > - {"errorCode":"400012","errorMessage":"Micro-service does not
>> > exist","detail":"provider not exist, consumer
>> 2342a4c78fdc11e8a80c0242ac110002
>> > find provider saga/flight-booking-service/0.0.0+"}
>> > saga>
>> > saga> 07:27:11.151 [saga-pool-thread-4] ERROR org.apache.servicecomb.
>> > serviceregistry.registry.AbstractServiceRegistry - Can not find any
>> > instances from service center due to previous errors.
>> > service=saga/flight-booking-service/0.0.0+
>> > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
>> > org.apache.servicecomb.serviceregistry.client.http.ServiceRe
>> gistryClientImpl
>> > - {"errorCode":"400012","errorMessage":"Micro-service does not
>> > exist","detail":"provider not exist, consumer
>> 2342a4c78fdc11e8a80c0242ac110002
>> > find provider saga/car-rental-service/0.0.0+"}
>> > saga>
>> > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
>> > org.apache.servicecomb.serviceregistry.client.http.ServiceRe
>> gistryClientImpl
>> > - {"errorCode":"400012","errorMessage":"Micro-service does not
>> > exist","detail":"provider not exist, consumer
>> 2342a4c78fdc11e8a80c0242ac110002
>> > find provider saga/hotel-reservation-service/0.0.0+"}
>> >
>> > Just checked the saga instance log, there are some WARN message,
>> >
>> > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.foundat
>> ion.vertx.VertxTLSBuilder
>> > - keyStore [server.p12] file not exist, please check!
>> > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.foundat
>> ion.vertx.VertxTLSBuilder
>> > - trustStore [trust.jks] file not exist, please check!
>> > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.foundat
>> ion.vertx.VertxTLSBuilder
>> > - keyStore [server.p12] file not exist, please check!
>> > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.foundat
>> ion.vertx.VertxTLSBuilder
>> > - trustStore [trust.jks] file not exist, please check!
>> > saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
>> > org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
>> > saga> io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS
>> > engine
>> > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(SSLHel
>> per.java:90)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(HttpClientImpl
>> .java:131)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.java
>> :296)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at org.apache.servicecomb.foundation.vertx.client.http.
>> > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:36)
>> > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
>> > saga> at org.apache.servicecomb.foundation.vertx.client.http.
>> > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:27)
>> > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
>> > saga> at org.apache.servicecomb.foundation.vertx.client.ClientPoolMan
>> ager.
>> > createClientPool(ClientPoolManager.java:60)
>> ~[foundation-vertx-1.0.0-m2.
>> > jar!/:1.0.0-m2]
>> > saga> at org.apache.servicecomb.foundation.vertx.client.
>> > ClientVerticle.start(ClientVerticle.java:35)
>> ~[foundation-vertx-1.0.0-m2.
>> > jar!/:1.0.0-m2]
>> > saga> at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:
>> 111)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.vertx.core.impl.DeploymentManager.lambda$
>> > doDeploy$10(DeploymentManager.java:481) ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl
>> .java:344)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
>> > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
>> > jar!/:4.1.24.Final]
>> > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTas
>> ks(
>> > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
>> > jar!/:4.1.24.Final]
>> > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
>> > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
>> > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
>> > run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.24.Final.
>> > jar!/:4.1.24.Final]
>> > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
>> > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
>> > jar!/:4.1.24.Final]
>> > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
>> > saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
>> > org.apache.servicecomb.foundation.vertx.VertxUtils - deploy vertx
>> failed,
>> > cause
>> > saga> io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS
>> > engine
>> > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(SSLHel
>> per.java:90)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(HttpClientImpl
>> .java:131)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.java
>> :296)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at org.apache.servicecomb.foundation.vertx.client.http.
>> > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:36)
>> > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
>> > saga> at org.apache.servicecomb.foundation.vertx.client.http.
>> > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:27)
>> > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
>> > saga> at org.apache.servicecomb.foundation.vertx.client.ClientPoolMan
>> ager.
>> > createClientPool(ClientPoolManager.java:60)
>> ~[foundation-vertx-1.0.0-m2.
>> > jar!/:1.0.0-m2]
>> > saga> at org.apache.servicecomb.foundation.vertx.client.
>> > ClientVerticle.start(ClientVerticle.java:35)
>> ~[foundation-vertx-1.0.0-m2.
>> > jar!/:1.0.0-m2]
>> > saga> at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:
>> 111)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.vertx.core.impl.DeploymentManager.lambda$
>> > doDeploy$10(DeploymentManager.java:481) ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl
>> .java:344)
>> > ~[vertx-core-3.5.0.jar!/:?]
>> > saga> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
>> > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
>> > jar!/:4.1.24.Final]
>> > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTas
>> ks(
>> > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
>> > jar!/:4.1.24.Final]
>> > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
>> > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
>> > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
>> > run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.24.Final.
>> > jar!/:4.1.24.Final]
>> > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
>> > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
>> > jar!/:4.1.24.Final]
>> > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
>> >
>> >
>> > But it looks like the service is registered rightly.
>> >
>> > service-center> 2018-07-25 08:00:43.056 +00:00 INFO
>> > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 18,
>> > succeed: true}, watch prefix /cse-sr/ms/indexes/, start rev 15+1,
>> > service-center> 2018-07-25 08:00:43.060 +00:00 INFO
>> > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 18,
>> > succeed: true}, watch prefix /cse-sr/ms/alias/, start rev 3+1,
>> > payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
>> > o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
>> > successfully. id=[d435f3f78fe011e89bc30242ac110002]
>> > appId=[saga-crossapp], name=[payment-service], version=[0.0.1],
>> > schemaIds=[payment-endpoint], env=[]
>> > payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
>> > o.a.s.s.task.MicroserviceRegisterTask    : schemaId [payment-endpoint]
>> > exists [true], summary exists [false]
>> > service-center> 2018-07-25 08:00:43.064 +00:00 ERROR
>> service/schema.go:69
>> > get schema failed, serviceId d435f3f78fe011e89bc30242ac110002, schemaId
>> > payment-endpoint: schema not exists.
>> > payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0]
>> o.a.s.s.c.h.ServiceRegistryClientImpl
>> >   : get response for org.apache.servicecomb.service
>> registry.api.response.GetSchemaResponse
>> > failed, 400:Bad Request, {"errorCode":"400016","errorMessage":"Schema
>> > does not exist","detail":"Do not have this schema info."}
>> > payment>
>> > service-center> 2018-07-25 08:00:43.086 +00:00 INFO
>> service/schema.go:564
>> > start to modify schema, serviceId  d435f3f78fe011e89bc30242ac110002,
>> > schemaId payment-endpoint
>> > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
>> service/schema.go:518
>> > modify schema successfully: serviceId d435f3f78fe011e89bc30242ac110002,
>> > schemaId payment-endpoint.
>> > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
>> > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 19,
>> > succeed: true}, watch prefix /cse-sr/ms/schema-sum/, start rev 16+1,
>> > payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main]
>> o.a.s.s.c.h.ServiceRegistryClientImpl
>> >   : register schema d435f3f78fe011e89bc30242ac110002/payment-endpoint
>> > success.
>> >
>> > Is there any thing that I'm missing?
>> >
>> > Willem Jiang
>> >
>> > Twitter: willemjiang
>> > Weibo: 姜宁willem
>> >
>> > On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <wi...@gmail.com>
>> > wrote:
>> >
>> >> It could handy for the user to write the test without starting the
>> >> service-center,
>> >> we could add it into  the section of best practice of writing a uni
>> test.
>> >>
>> >>
>> >> Willem Jiang
>> >>
>> >> Twitter: willemjiang
>> >> Weibo: 姜宁willem
>> >>
>> >> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
>> >>
>> >>> LocalRegistry for java-chassis is created only for test purpose and
>> not
>> >>> intended for product  use. Is there many scenarios need this? Or we
>> need to
>> >>> reorganize its code to meet product use.
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> ------------------ 原始邮件 ------------------
>> >>> 发件人: "willem.jiang"<wi...@gmail.com>;
>> >>> 发送时间: 2018年7月25日(星期三) 下午2:22
>> >>> 收件人: "dev"<de...@servicecomb.apache.org>;
>> >>>
>> >>> 主题: Re: Cannot find the instance in ServiceComb Discovery
>> >>>
>> >>>
>> >>>
>> >>> Hi, jimin,
>> >>>
>> >>> Changed the System property fix the issue, but it looks like we have
>> some
>> >>> undocument information need to updated.
>> >>>
>> >>>
>> >>>
>> >>> Willem Jiang
>> >>>
>> >>> Twitter: willemjiang
>> >>> Weibo: 姜宁willem
>> >>>
>> >>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com> wrote:
>> >>>
>> >>> > you write a local registry.yaml, but missed some important data
>> >>> > a easy way to fix: do not write the registry.yaml
>> >>> > because you test case is self invoke self, ServiceComb engine can
>> >>> generate
>> >>> > informations dynamiclly
>> >>> >
>> >>> > change: org.apache.servicecomb.saga.discovery.service.center.
>> >>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
>> >>> >
>> >>> > private static void setUpLocalRegistry() {
>> >>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustFor
>> >>> ceLocal");
>> >>> > }
>> >>> >
>> >>> >
>> >>> >
>> >>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>> >>> >
>> >>> > > Hi
>> >>> > >
>> >>> > > When I recovery the old saga code in the SCB-692 branch[1] , I got
>> >>> the
>> >>> > > error when running the ServiceCenterDiscoveryRestTransportTest in
>> >>> the
>> >>> > > ServiceComb Discovery module.
>> >>> > > It looks like the service provide already registered, but the
>> Service
>> >>> > Path
>> >>> > > Manager cannot find the right instance. I tried to debug the code,
>> >>> but
>> >>> > > there are some points those I missed.
>> >>> > >
>> >>> > > You can reproduce the error by checking out the saga code and
>> switch
>> >>> to
>> >>> > > SCB-692 branch.
>> >>> > >
>> >>> > > [1]https://github.com/apache/incubator-servicecomb-saga/tree
>> /SCB-692
>> >>> > >
>> >>> > > Willem Jiang
>> >>> > >
>> >>> > > Twitter: willemjiang
>> >>> > > Weibo: 姜宁willem
>> >>> > >
>> >>> >
>> >>>
>> >>
>> >>
>> >
>>
>
>

回复: Cannot find the instance in ServiceComb Discovery

Posted by Sure <su...@qq.com>.
oh yes, i had new an issue for it 



Log print more detailed: https://issues.apache.org/jira/browse/SCB-776





------------------ 原始邮件 ------------------
发件人: "willem.jiang"<wi...@gmail.com>;
发送时间: 2018年7月26日(星期四) 下午3:44
收件人: "dev"<de...@servicecomb.apache.org>;

主题: Re: Cannot find the instance in ServiceComb Discovery



Oh, it's my bad change the saga discovery servicecenter to development mode.
Thx Sure for your help.
From the log, I cannot tell it's the development issue, can we polish the
logger file to make it easy for user to dig the issue?


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Thu, Jul 26, 2018 at 3:37 PM, Sure <su...@qq.com> wrote:

> this is the environment isolation problem. i have check the ci log and
> found that the car-rental-service is registered in development environment
> but other services are registered in ''(default) environment. so it will
> fail when car service discovery hotal service instances from SC.
>
>
>
>
> ------------------ 原始邮件 ------------------
> 发件人: "willem.jiang"<wi...@gmail.com>;
> 发送时间: 2018年7月26日(星期四) 上午9:32
> 收件人: "dev"<de...@servicecomb.apache.org>;
>
> 主题: Re: Cannot find the instance in ServiceComb Discovery
>
>
>
> Thx a lot.
> You can find the docker log here [1]
>
> [1]https://api.travis-ci.org/v3/job/407953904/log.txt
>
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Thu, Jul 26, 2018 at 9:07 AM, wjm wjm <zz...@gmail.com> wrote:
>
> > sorry, i made a mistake,  running order is no problem.
> > cuyihua will help to find the problem.
> >
> > 2018-07-26 8:08 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> >
> > > I already updated them in the SCB-692 branch.
> > > Please check the SCB-692 branch again for it.
> > >
> > >
> > > Willem Jiang
> > >
> > > Twitter: willemjiang
> > > Weibo: 姜宁willem
> > >
> > > On Wed, Jul 25, 2018 at 8:28 PM, wjm wjm <zz...@gmail.com> wrote:
> > >
> > > > 1.saga-spring project, some classes import io.servicecomb packages,
> > > should
> > > > update to org.apache.servicecomb
> > > > 2.org.apache.servicecomb.saga.spring.SagaServiceDiscoveryTest#
> > > > setUpLocalRegistry
> > > > has the same registry declare problem
> > > >
> > > > 2018-07-25 17:02 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> > > >
> > > > > FYI,  you can find full log file here[1]
> > > > >
> > > > > [1]https://api.travis-ci.org/v3/job/407953904/log.txt
> > > > >
> > > > >
> > > > > Willem Jiang
> > > > >
> > > > > Twitter: willemjiang
> > > > > Weibo: 姜宁willem
> > > > >
> > > > > On Wed, Jul 25, 2018 at 4:09 PM, Willem Jiang <
> > willem.jiang@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > It looks like there is still some thing wrong when using the
> > > > > > service-center to discover the published services when running
> the
> > > > > > integration test of dependency-free-transaction-demo:
> demo-tests.
> > > > > > You can reproduce the error by checking out the SCB-692 and
> running
> > > the
> > > > > > test from saga-demo/dependency-free-transaction-demo/demo-tests
> > > > > >
> > > > > > saga> 07:27:11.094 [saga-pool-thread-3] INFO
> > > > > org.apache.servicecomb.saga.core.LoggingRecoveryPolicy
> > > > > > - Starting request id=request-hotel for service
> > > > hotel-reservation-service
> > > > > > saga> 07:27:11.136 [saga-pool-thread-2] INFO
> > org.apache.servicecomb.
> > > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > > MicroserviceVersions, appId=saga, microserviceName=car-rental-
> > > service.
> > > > > > saga> 07:27:11.137 [saga-pool-thread-4] INFO
> > org.apache.servicecomb.
> > > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > > MicroserviceVersions, appId=saga, microserviceName=flight-
> > > > > booking-service.
> > > > > > saga> 07:27:11.137 [saga-pool-thread-3] INFO
> > org.apache.servicecomb.
> > > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > > MicroserviceVersions, appId=saga, microserviceName=hotel-
> > > > > > reservation-service.
> > > > > > service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
> > > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > > consumer
> > > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > > > saga/flight-booking-service/0.0.0+
> > > > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > > consumer
> > > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > > > saga/car-rental-service/0.0.0+
> > > > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > > consumer
> > > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > saga/hotel-reservation-
> > > > > > service/0.0.0+
> > > > > > saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
> > > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > > ServiceRegistryClientImpl
> > > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > > exist","detail":"provider not exist, consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > > find provider saga/flight-booking-service/0.0.0+"}
> > > > > > saga>
> > > > > > saga> 07:27:11.151 [saga-pool-thread-4] ERROR
> > org.apache.servicecomb.
> > > > > > serviceregistry.registry.AbstractServiceRegistry - Can not find
> > any
> > > > > > instances from service center due to previous errors.
> > > > > > service=saga/flight-booking-service/0.0.0+
> > > > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > > ServiceRegistryClientImpl
> > > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > > exist","detail":"provider not exist, consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > > find provider saga/car-rental-service/0.0.0+"}
> > > > > > saga>
> > > > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > > ServiceRegistryClientImpl
> > > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > > exist","detail":"provider not exist, consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > > find provider saga/hotel-reservation-service/0.0.0+"}
> > > > > >
> > > > > > Just checked the saga instance log, there are some WARN message,
> > > > > >
> > > > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > > > foundation.vertx.
> > > > > VertxTLSBuilder
> > > > > > - keyStore [server.p12] file not exist, please check!
> > > > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > > > foundation.vertx.
> > > > > VertxTLSBuilder
> > > > > > - trustStore [trust.jks] file not exist, please check!
> > > > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > > > foundation.vertx.
> > > > > VertxTLSBuilder
> > > > > > - keyStore [server.p12] file not exist, please check!
> > > > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > > > foundation.vertx.
> > > > > VertxTLSBuilder
> > > > > > - trustStore [trust.jks] file not exist, please check!
> > > > > > saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
> > > > > > org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
> > > > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> > > SSL/TLS
> > > > > > engine
> > > > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > > > SSLHelper.java:90)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.
> > java:151)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > > > HttpClientImpl.java:131)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.VertxImpl.
> createHttpClient(VertxImpl.
> > > > > java:296)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > > HttpClientPoolFactory.createClientPool(
> > > HttpClientPoolFactory.java:36)
> > > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > > HttpClientPoolFactory.createClientPool(
> > > HttpClientPoolFactory.java:27)
> > > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > ClientPoolManager.
> > > > > > createClientPool(ClientPoolManager.java:60)
> > > > ~[foundation-vertx-1.0.0-m2.
> > > > > > jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > > ClientVerticle.start(ClientVerticle.java:35)
> > > > > ~[foundation-vertx-1.0.0-m2.
> > > > > > jar!/:1.0.0-m2]
> > > > > > saga> at io.vertx.core.AbstractVerticle.start(
> > > > AbstractVerticle.java:111)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > > > doDeploy$10(DeploymentManager.java:481)
> > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > > > ContextImpl.java:344)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.
> > safeExecute(
> > > > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > > > runAllTasks(
> > > > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> > > java:463)
> > > > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > > > run(SingleThreadEventExecutor.java:884)
> > ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > > > saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
> > > > > > org.apache.servicecomb.foundation.vertx.VertxUtils - deploy
> vertx
> > > > > failed,
> > > > > > cause
> > > > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> > > SSL/TLS
> > > > > > engine
> > > > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > > > SSLHelper.java:90)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.
> > java:151)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > > > HttpClientImpl.java:131)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.VertxImpl.
> createHttpClient(VertxImpl.
> > > > > java:296)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > > HttpClientPoolFactory.createClientPool(
> > > HttpClientPoolFactory.java:36)
> > > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > > HttpClientPoolFactory.createClientPool(
> > > HttpClientPoolFactory.java:27)
> > > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > ClientPoolManager.
> > > > > > createClientPool(ClientPoolManager.java:60)
> > > > ~[foundation-vertx-1.0.0-m2.
> > > > > > jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > > ClientVerticle.start(ClientVerticle.java:35)
> > > > > ~[foundation-vertx-1.0.0-m2.
> > > > > > jar!/:1.0.0-m2]
> > > > > > saga> at io.vertx.core.AbstractVerticle.start(
> > > > AbstractVerticle.java:111)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > > > doDeploy$10(DeploymentManager.java:481)
> > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > > > ContextImpl.java:344)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.
> > safeExecute(
> > > > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > > > runAllTasks(
> > > > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> > > java:463)
> > > > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > > > run(SingleThreadEventExecutor.java:884)
> > ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > > >
> > > > > >
> > > > > > But it looks like the service is registered rightly.
> > > > > >
> > > > > > service-center> 2018-07-25 08:00:43.056 +00:00 INFO
> > > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1,
> rev:
> > > 18,
> > > > > > succeed: true}, watch prefix /cse-sr/ms/indexes/, start rev 15+1,
> > > > > > service-center> 2018-07-25 08:00:43.060 +00:00 INFO
> > > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1,
> rev:
> > > 18,
> > > > > > succeed: true}, watch prefix /cse-sr/ms/alias/, start rev 3+1,
> > > > > > payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
> > > > > > o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
> > > > > > successfully. id=[d435f3f78fe011e89bc30242ac110002]
> > > > > > appId=[saga-crossapp], name=[payment-service], version=[0.0.1],
> > > > > > schemaIds=[payment-endpoint], env=[]
> > > > > > payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
> > > > > > o.a.s.s.task.MicroserviceRegisterTask    : schemaId
> > > [payment-endpoint]
> > > > > > exists [true], summary exists [false]
> > > > > > service-center> 2018-07-25 08:00:43.064 +00:00 ERROR
> > > > service/schema.go:69
> > > > > > get schema failed, serviceId d435f3f78fe011e89bc30242ac110002,
> > > > schemaId
> > > > > > payment-endpoint: schema not exists.
> > > > > > payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0]
> > > > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > > > >   : get response for org.apache.servicecomb.
> > > > > serviceregistry.api.response.GetSchemaResponse
> > > > > > failed, 400:Bad Request, {"errorCode":"400016","
> > > errorMessage":"Schema
> > > > > > does not exist","detail":"Do not have this schema info."}
> > > > > > payment>
> > > > > > service-center> 2018-07-25 08:00:43.086 +00:00 INFO
> > > > service/schema.go:564
> > > > > > start to modify schema, serviceId  d435f3f78fe011e89bc30242ac1100
> > 02,
> > > > > > schemaId payment-endpoint
> > > > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > > service/schema.go:518
> > > > > > modify schema successfully: serviceId
> > d435f3f78fe011e89bc30242ac1100
> > > > 02,
> > > > > > schemaId payment-endpoint.
> > > > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1,
> rev:
> > > 19,
> > > > > > succeed: true}, watch prefix /cse-sr/ms/schema-sum/, start rev
> > 16+1,
> > > > > > payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main]
> > > > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > > > >   : register schema d435f3f78fe011e89bc30242ac1100
> > > 02/payment-endpoint
> > > > > > success.
> > > > > >
> > > > > > Is there any thing that I'm missing?
> > > > > >
> > > > > > Willem Jiang
> > > > > >
> > > > > > Twitter: willemjiang
> > > > > > Weibo: 姜宁willem
> > > > > >
> > > > > > On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <
> > > willem.jiang@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > >> It could handy for the user to write the test without starting
> the
> > > > > >> service-center,
> > > > > >> we could add it into  the section of best practice of writing a
> > uni
> > > > > test.
> > > > > >>
> > > > > >>
> > > > > >> Willem Jiang
> > > > > >>
> > > > > >> Twitter: willemjiang
> > > > > >> Weibo: 姜宁willem
> > > > > >>
> > > > > >> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
> > > > > >>
> > > > > >>> LocalRegistry for java-chassis is created only for test purpose
> > and
> > > > not
> > > > > >>> intended for product  use. Is there many scenarios need this?
> Or
> > we
> > > > > need to
> > > > > >>> reorganize its code to meet product use.
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>> ------------------ 原始邮件 ------------------
> > > > > >>> 发件人: "willem.jiang"<wi...@gmail.com>;
> > > > > >>> 发送时间: 2018年7月25日(星期三) 下午2:22
> > > > > >>> 收件人: "dev"<de...@servicecomb.apache.org>;
> > > > > >>>
> > > > > >>> 主题: Re: Cannot find the instance in ServiceComb Discovery
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>> Hi, jimin,
> > > > > >>>
> > > > > >>> Changed the System property fix the issue, but it looks like we
> > > have
> > > > > some
> > > > > >>> undocument information need to updated.
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>> Willem Jiang
> > > > > >>>
> > > > > >>> Twitter: willemjiang
> > > > > >>> Weibo: 姜宁willem
> > > > > >>>
> > > > > >>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com>
> > > wrote:
> > > > > >>>
> > > > > >>> > you write a local registry.yaml, but missed some important
> data
> > > > > >>> > a easy way to fix: do not write the registry.yaml
> > > > > >>> > because you test case is self invoke self, ServiceComb engine
> > can
> > > > > >>> generate
> > > > > >>> > informations dynamiclly
> > > > > >>> >
> > > > > >>> > change: org.apache.servicecomb.saga.
> discovery.service.center.
> > > > > >>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
> > > > > >>> >
> > > > > >>> > private static void setUpLocalRegistry() {
> > > > > >>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"
> notExistJustFor
> > > > > >>> ceLocal");
> > > > > >>> > }
> > > > > >>> >
> > > > > >>> >
> > > > > >>> >
> > > > > >>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <
> > willem.jiang@gmail.com
> > > >:
> > > > > >>> >
> > > > > >>> > > Hi
> > > > > >>> > >
> > > > > >>> > > When I recovery the old saga code in the SCB-692 branch[1]
> ,
> > I
> > > > got
> > > > > >>> the
> > > > > >>> > > error when running the ServiceCenterDiscoveryRestTran
> > sportTest
> > > > in
> > > > > >>> the
> > > > > >>> > > ServiceComb Discovery module.
> > > > > >>> > > It looks like the service provide already registered, but
> the
> > > > > Service
> > > > > >>> > Path
> > > > > >>> > > Manager cannot find the right instance. I tried to debug
> the
> > > > code,
> > > > > >>> but
> > > > > >>> > > there are some points those I missed.
> > > > > >>> > >
> > > > > >>> > > You can reproduce the error by checking out the saga code
> and
> > > > > switch
> > > > > >>> to
> > > > > >>> > > SCB-692 branch.
> > > > > >>> > >
> > > > > >>> > > [1]https://github.com/apache/incubator-servicecomb-saga/
> > > > > tree/SCB-692
> > > > > >>> > >
> > > > > >>> > > Willem Jiang
> > > > > >>> > >
> > > > > >>> > > Twitter: willemjiang
> > > > > >>> > > Weibo: 姜宁willem
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > > >>
> > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by Willem Jiang <wi...@gmail.com>.
Oh, it's my bad change the saga discovery servicecenter to development mode.
Thx Sure for your help.
From the log, I cannot tell it's the development issue, can we polish the
logger file to make it easy for user to dig the issue?


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Thu, Jul 26, 2018 at 3:37 PM, Sure <su...@qq.com> wrote:

> this is the environment isolation problem. i have check the ci log and
> found that the car-rental-service is registered in development environment
> but other services are registered in ''(default) environment. so it will
> fail when car service discovery hotal service instances from SC.
>
>
>
>
> ------------------ 原始邮件 ------------------
> 发件人: "willem.jiang"<wi...@gmail.com>;
> 发送时间: 2018年7月26日(星期四) 上午9:32
> 收件人: "dev"<de...@servicecomb.apache.org>;
>
> 主题: Re: Cannot find the instance in ServiceComb Discovery
>
>
>
> Thx a lot.
> You can find the docker log here [1]
>
> [1]https://api.travis-ci.org/v3/job/407953904/log.txt
>
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Thu, Jul 26, 2018 at 9:07 AM, wjm wjm <zz...@gmail.com> wrote:
>
> > sorry, i made a mistake,  running order is no problem.
> > cuyihua will help to find the problem.
> >
> > 2018-07-26 8:08 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> >
> > > I already updated them in the SCB-692 branch.
> > > Please check the SCB-692 branch again for it.
> > >
> > >
> > > Willem Jiang
> > >
> > > Twitter: willemjiang
> > > Weibo: 姜宁willem
> > >
> > > On Wed, Jul 25, 2018 at 8:28 PM, wjm wjm <zz...@gmail.com> wrote:
> > >
> > > > 1.saga-spring project, some classes import io.servicecomb packages,
> > > should
> > > > update to org.apache.servicecomb
> > > > 2.org.apache.servicecomb.saga.spring.SagaServiceDiscoveryTest#
> > > > setUpLocalRegistry
> > > > has the same registry declare problem
> > > >
> > > > 2018-07-25 17:02 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> > > >
> > > > > FYI,  you can find full log file here[1]
> > > > >
> > > > > [1]https://api.travis-ci.org/v3/job/407953904/log.txt
> > > > >
> > > > >
> > > > > Willem Jiang
> > > > >
> > > > > Twitter: willemjiang
> > > > > Weibo: 姜宁willem
> > > > >
> > > > > On Wed, Jul 25, 2018 at 4:09 PM, Willem Jiang <
> > willem.jiang@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > It looks like there is still some thing wrong when using the
> > > > > > service-center to discover the published services when running
> the
> > > > > > integration test of dependency-free-transaction-demo:
> demo-tests.
> > > > > > You can reproduce the error by checking out the SCB-692 and
> running
> > > the
> > > > > > test from saga-demo/dependency-free-transaction-demo/demo-tests
> > > > > >
> > > > > > saga> 07:27:11.094 [saga-pool-thread-3] INFO
> > > > > org.apache.servicecomb.saga.core.LoggingRecoveryPolicy
> > > > > > - Starting request id=request-hotel for service
> > > > hotel-reservation-service
> > > > > > saga> 07:27:11.136 [saga-pool-thread-2] INFO
> > org.apache.servicecomb.
> > > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > > MicroserviceVersions, appId=saga, microserviceName=car-rental-
> > > service.
> > > > > > saga> 07:27:11.137 [saga-pool-thread-4] INFO
> > org.apache.servicecomb.
> > > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > > MicroserviceVersions, appId=saga, microserviceName=flight-
> > > > > booking-service.
> > > > > > saga> 07:27:11.137 [saga-pool-thread-3] INFO
> > org.apache.servicecomb.
> > > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > > MicroserviceVersions, appId=saga, microserviceName=hotel-
> > > > > > reservation-service.
> > > > > > service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
> > > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > > consumer
> > > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > > > saga/flight-booking-service/0.0.0+
> > > > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > > consumer
> > > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > > > saga/car-rental-service/0.0.0+
> > > > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > > consumer
> > > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > saga/hotel-reservation-
> > > > > > service/0.0.0+
> > > > > > saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
> > > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > > ServiceRegistryClientImpl
> > > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > > exist","detail":"provider not exist, consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > > find provider saga/flight-booking-service/0.0.0+"}
> > > > > > saga>
> > > > > > saga> 07:27:11.151 [saga-pool-thread-4] ERROR
> > org.apache.servicecomb.
> > > > > > serviceregistry.registry.AbstractServiceRegistry - Can not find
> > any
> > > > > > instances from service center due to previous errors.
> > > > > > service=saga/flight-booking-service/0.0.0+
> > > > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > > ServiceRegistryClientImpl
> > > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > > exist","detail":"provider not exist, consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > > find provider saga/car-rental-service/0.0.0+"}
> > > > > > saga>
> > > > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > > ServiceRegistryClientImpl
> > > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > > exist","detail":"provider not exist, consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > > find provider saga/hotel-reservation-service/0.0.0+"}
> > > > > >
> > > > > > Just checked the saga instance log, there are some WARN message,
> > > > > >
> > > > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > > > foundation.vertx.
> > > > > VertxTLSBuilder
> > > > > > - keyStore [server.p12] file not exist, please check!
> > > > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > > > foundation.vertx.
> > > > > VertxTLSBuilder
> > > > > > - trustStore [trust.jks] file not exist, please check!
> > > > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > > > foundation.vertx.
> > > > > VertxTLSBuilder
> > > > > > - keyStore [server.p12] file not exist, please check!
> > > > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > > > foundation.vertx.
> > > > > VertxTLSBuilder
> > > > > > - trustStore [trust.jks] file not exist, please check!
> > > > > > saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
> > > > > > org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
> > > > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> > > SSL/TLS
> > > > > > engine
> > > > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > > > SSLHelper.java:90)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.
> > java:151)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > > > HttpClientImpl.java:131)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.VertxImpl.
> createHttpClient(VertxImpl.
> > > > > java:296)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > > HttpClientPoolFactory.createClientPool(
> > > HttpClientPoolFactory.java:36)
> > > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > > HttpClientPoolFactory.createClientPool(
> > > HttpClientPoolFactory.java:27)
> > > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > ClientPoolManager.
> > > > > > createClientPool(ClientPoolManager.java:60)
> > > > ~[foundation-vertx-1.0.0-m2.
> > > > > > jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > > ClientVerticle.start(ClientVerticle.java:35)
> > > > > ~[foundation-vertx-1.0.0-m2.
> > > > > > jar!/:1.0.0-m2]
> > > > > > saga> at io.vertx.core.AbstractVerticle.start(
> > > > AbstractVerticle.java:111)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > > > doDeploy$10(DeploymentManager.java:481)
> > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > > > ContextImpl.java:344)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.
> > safeExecute(
> > > > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > > > runAllTasks(
> > > > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> > > java:463)
> > > > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > > > run(SingleThreadEventExecutor.java:884)
> > ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > > > saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
> > > > > > org.apache.servicecomb.foundation.vertx.VertxUtils - deploy
> vertx
> > > > > failed,
> > > > > > cause
> > > > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> > > SSL/TLS
> > > > > > engine
> > > > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > > > SSLHelper.java:90)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.
> > java:151)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > > > HttpClientImpl.java:131)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.VertxImpl.
> createHttpClient(VertxImpl.
> > > > > java:296)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > > HttpClientPoolFactory.createClientPool(
> > > HttpClientPoolFactory.java:36)
> > > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > > HttpClientPoolFactory.createClientPool(
> > > HttpClientPoolFactory.java:27)
> > > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > ClientPoolManager.
> > > > > > createClientPool(ClientPoolManager.java:60)
> > > > ~[foundation-vertx-1.0.0-m2.
> > > > > > jar!/:1.0.0-m2]
> > > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > > ClientVerticle.start(ClientVerticle.java:35)
> > > > > ~[foundation-vertx-1.0.0-m2.
> > > > > > jar!/:1.0.0-m2]
> > > > > > saga> at io.vertx.core.AbstractVerticle.start(
> > > > AbstractVerticle.java:111)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > > > doDeploy$10(DeploymentManager.java:481)
> > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > > > ContextImpl.java:344)
> > > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.
> > safeExecute(
> > > > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > > > runAllTasks(
> > > > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> > > java:463)
> > > > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > > > run(SingleThreadEventExecutor.java:884)
> > ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > > > jar!/:4.1.24.Final]
> > > > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > > >
> > > > > >
> > > > > > But it looks like the service is registered rightly.
> > > > > >
> > > > > > service-center> 2018-07-25 08:00:43.056 +00:00 INFO
> > > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1,
> rev:
> > > 18,
> > > > > > succeed: true}, watch prefix /cse-sr/ms/indexes/, start rev 15+1,
> > > > > > service-center> 2018-07-25 08:00:43.060 +00:00 INFO
> > > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1,
> rev:
> > > 18,
> > > > > > succeed: true}, watch prefix /cse-sr/ms/alias/, start rev 3+1,
> > > > > > payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
> > > > > > o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
> > > > > > successfully. id=[d435f3f78fe011e89bc30242ac110002]
> > > > > > appId=[saga-crossapp], name=[payment-service], version=[0.0.1],
> > > > > > schemaIds=[payment-endpoint], env=[]
> > > > > > payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
> > > > > > o.a.s.s.task.MicroserviceRegisterTask    : schemaId
> > > [payment-endpoint]
> > > > > > exists [true], summary exists [false]
> > > > > > service-center> 2018-07-25 08:00:43.064 +00:00 ERROR
> > > > service/schema.go:69
> > > > > > get schema failed, serviceId d435f3f78fe011e89bc30242ac110002,
> > > > schemaId
> > > > > > payment-endpoint: schema not exists.
> > > > > > payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0]
> > > > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > > > >   : get response for org.apache.servicecomb.
> > > > > serviceregistry.api.response.GetSchemaResponse
> > > > > > failed, 400:Bad Request, {"errorCode":"400016","
> > > errorMessage":"Schema
> > > > > > does not exist","detail":"Do not have this schema info."}
> > > > > > payment>
> > > > > > service-center> 2018-07-25 08:00:43.086 +00:00 INFO
> > > > service/schema.go:564
> > > > > > start to modify schema, serviceId  d435f3f78fe011e89bc30242ac1100
> > 02,
> > > > > > schemaId payment-endpoint
> > > > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > > service/schema.go:518
> > > > > > modify schema successfully: serviceId
> > d435f3f78fe011e89bc30242ac1100
> > > > 02,
> > > > > > schemaId payment-endpoint.
> > > > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1,
> rev:
> > > 19,
> > > > > > succeed: true}, watch prefix /cse-sr/ms/schema-sum/, start rev
> > 16+1,
> > > > > > payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main]
> > > > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > > > >   : register schema d435f3f78fe011e89bc30242ac1100
> > > 02/payment-endpoint
> > > > > > success.
> > > > > >
> > > > > > Is there any thing that I'm missing?
> > > > > >
> > > > > > Willem Jiang
> > > > > >
> > > > > > Twitter: willemjiang
> > > > > > Weibo: 姜宁willem
> > > > > >
> > > > > > On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <
> > > willem.jiang@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > >> It could handy for the user to write the test without starting
> the
> > > > > >> service-center,
> > > > > >> we could add it into  the section of best practice of writing a
> > uni
> > > > > test.
> > > > > >>
> > > > > >>
> > > > > >> Willem Jiang
> > > > > >>
> > > > > >> Twitter: willemjiang
> > > > > >> Weibo: 姜宁willem
> > > > > >>
> > > > > >> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
> > > > > >>
> > > > > >>> LocalRegistry for java-chassis is created only for test purpose
> > and
> > > > not
> > > > > >>> intended for product  use. Is there many scenarios need this?
> Or
> > we
> > > > > need to
> > > > > >>> reorganize its code to meet product use.
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>> ------------------ 原始邮件 ------------------
> > > > > >>> 发件人: "willem.jiang"<wi...@gmail.com>;
> > > > > >>> 发送时间: 2018年7月25日(星期三) 下午2:22
> > > > > >>> 收件人: "dev"<de...@servicecomb.apache.org>;
> > > > > >>>
> > > > > >>> 主题: Re: Cannot find the instance in ServiceComb Discovery
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>> Hi, jimin,
> > > > > >>>
> > > > > >>> Changed the System property fix the issue, but it looks like we
> > > have
> > > > > some
> > > > > >>> undocument information need to updated.
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>> Willem Jiang
> > > > > >>>
> > > > > >>> Twitter: willemjiang
> > > > > >>> Weibo: 姜宁willem
> > > > > >>>
> > > > > >>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com>
> > > wrote:
> > > > > >>>
> > > > > >>> > you write a local registry.yaml, but missed some important
> data
> > > > > >>> > a easy way to fix: do not write the registry.yaml
> > > > > >>> > because you test case is self invoke self, ServiceComb engine
> > can
> > > > > >>> generate
> > > > > >>> > informations dynamiclly
> > > > > >>> >
> > > > > >>> > change: org.apache.servicecomb.saga.
> discovery.service.center.
> > > > > >>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
> > > > > >>> >
> > > > > >>> > private static void setUpLocalRegistry() {
> > > > > >>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"
> notExistJustFor
> > > > > >>> ceLocal");
> > > > > >>> > }
> > > > > >>> >
> > > > > >>> >
> > > > > >>> >
> > > > > >>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <
> > willem.jiang@gmail.com
> > > >:
> > > > > >>> >
> > > > > >>> > > Hi
> > > > > >>> > >
> > > > > >>> > > When I recovery the old saga code in the SCB-692 branch[1]
> ,
> > I
> > > > got
> > > > > >>> the
> > > > > >>> > > error when running the ServiceCenterDiscoveryRestTran
> > sportTest
> > > > in
> > > > > >>> the
> > > > > >>> > > ServiceComb Discovery module.
> > > > > >>> > > It looks like the service provide already registered, but
> the
> > > > > Service
> > > > > >>> > Path
> > > > > >>> > > Manager cannot find the right instance. I tried to debug
> the
> > > > code,
> > > > > >>> but
> > > > > >>> > > there are some points those I missed.
> > > > > >>> > >
> > > > > >>> > > You can reproduce the error by checking out the saga code
> and
> > > > > switch
> > > > > >>> to
> > > > > >>> > > SCB-692 branch.
> > > > > >>> > >
> > > > > >>> > > [1]https://github.com/apache/incubator-servicecomb-saga/
> > > > > tree/SCB-692
> > > > > >>> > >
> > > > > >>> > > Willem Jiang
> > > > > >>> > >
> > > > > >>> > > Twitter: willemjiang
> > > > > >>> > > Weibo: 姜宁willem
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > > >>
> > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
>

回复: Cannot find the instance in ServiceComb Discovery

Posted by Sure <su...@qq.com>.
sorry, not the car service env mismatch, it is saga-service env mismatch
 




------------------ 原始邮件 ------------------
发件人: "Sure"<su...@qq.com>;
发送时间: 2018年7月26日(星期四) 下午3:37
收件人: "dev@servicecomb.apache.org"<de...@servicecomb.apache.org>;

主题: 回复: Cannot find the instance in ServiceComb Discovery



this is the environment isolation problem. i have check the ci log and found that the car-rental-service is registered in development environment but other services are registered in ''(default) environment. so it will fail when car service discovery hotal service instances from SC.




------------------ 原始邮件 ------------------
发件人: "willem.jiang"<wi...@gmail.com>;
发送时间: 2018年7月26日(星期四) 上午9:32
收件人: "dev"<de...@servicecomb.apache.org>;

主题: Re: Cannot find the instance in ServiceComb Discovery



Thx a lot.
You can find the docker log here [1]

[1]https://api.travis-ci.org/v3/job/407953904/log.txt


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Thu, Jul 26, 2018 at 9:07 AM, wjm wjm <zz...@gmail.com> wrote:

> sorry, i made a mistake,  running order is no problem.
> cuyihua will help to find the problem.
>
> 2018-07-26 8:08 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>
> > I already updated them in the SCB-692 branch.
> > Please check the SCB-692 branch again for it.
> >
> >
> > Willem Jiang
> >
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> > On Wed, Jul 25, 2018 at 8:28 PM, wjm wjm <zz...@gmail.com> wrote:
> >
> > > 1.saga-spring project, some classes import io.servicecomb packages,
> > should
> > > update to org.apache.servicecomb
> > > 2.org.apache.servicecomb.saga.spring.SagaServiceDiscoveryTest#
> > > setUpLocalRegistry
> > > has the same registry declare problem
> > >
> > > 2018-07-25 17:02 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> > >
> > > > FYI,  you can find full log file here[1]
> > > >
> > > > [1]https://api.travis-ci.org/v3/job/407953904/log.txt
> > > >
> > > >
> > > > Willem Jiang
> > > >
> > > > Twitter: willemjiang
> > > > Weibo: 姜宁willem
> > > >
> > > > On Wed, Jul 25, 2018 at 4:09 PM, Willem Jiang <
> willem.jiang@gmail.com>
> > > > wrote:
> > > >
> > > > > It looks like there is still some thing wrong when using the
> > > > > service-center to discover the published services when running the
> > > > > integration test of dependency-free-transaction-demo: demo-tests.
> > > > > You can reproduce the error by checking out the SCB-692 and running
> > the
> > > > > test from saga-demo/dependency-free-transaction-demo/demo-tests
> > > > >
> > > > > saga> 07:27:11.094 [saga-pool-thread-3] INFO
> > > > org.apache.servicecomb.saga.core.LoggingRecoveryPolicy
> > > > > - Starting request id=request-hotel for service
> > > hotel-reservation-service
> > > > > saga> 07:27:11.136 [saga-pool-thread-2] INFO
> org.apache.servicecomb.
> > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > MicroserviceVersions, appId=saga, microserviceName=car-rental-
> > service.
> > > > > saga> 07:27:11.137 [saga-pool-thread-4] INFO
> org.apache.servicecomb.
> > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > MicroserviceVersions, appId=saga, microserviceName=flight-
> > > > booking-service.
> > > > > saga> 07:27:11.137 [saga-pool-thread-3] INFO
> org.apache.servicecomb.
> > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > MicroserviceVersions, appId=saga, microserviceName=hotel-
> > > > > reservation-service.
> > > > > service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
> > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > > saga/flight-booking-service/0.0.0+
> > > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > > saga/car-rental-service/0.0.0+
> > > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > saga/hotel-reservation-
> > > > > service/0.0.0+
> > > > > saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
> > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > ServiceRegistryClientImpl
> > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > exist","detail":"provider not exist, consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > find provider saga/flight-booking-service/0.0.0+"}
> > > > > saga>
> > > > > saga> 07:27:11.151 [saga-pool-thread-4] ERROR
> org.apache.servicecomb.
> > > > > serviceregistry.registry.AbstractServiceRegistry - Can not find
> any
> > > > > instances from service center due to previous errors.
> > > > > service=saga/flight-booking-service/0.0.0+
> > > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > ServiceRegistryClientImpl
> > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > exist","detail":"provider not exist, consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > find provider saga/car-rental-service/0.0.0+"}
> > > > > saga>
> > > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > ServiceRegistryClientImpl
> > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > exist","detail":"provider not exist, consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > find provider saga/hotel-reservation-service/0.0.0+"}
> > > > >
> > > > > Just checked the saga instance log, there are some WARN message,
> > > > >
> > > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - keyStore [server.p12] file not exist, please check!
> > > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - trustStore [trust.jks] file not exist, please check!
> > > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - keyStore [server.p12] file not exist, please check!
> > > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - trustStore [trust.jks] file not exist, please check!
> > > > > saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
> > > > > org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
> > > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> > SSL/TLS
> > > > > engine
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > > SSLHelper.java:90)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.
> java:151)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > > HttpClientImpl.java:131)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> > > > java:296)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:36)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:27)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > ClientPoolManager.
> > > > > createClientPool(ClientPoolManager.java:60)
> > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > ClientVerticle.start(ClientVerticle.java:35)
> > > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at io.vertx.core.AbstractVerticle.start(
> > > AbstractVerticle.java:111)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > > doDeploy$10(DeploymentManager.java:481)
> ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > > ContextImpl.java:344)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.
> safeExecute(
> > > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > > runAllTasks(
> > > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> > java:463)
> > > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > > run(SingleThreadEventExecutor.java:884)
> ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > > saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
> > > > > org.apache.servicecomb.foundation.vertx.VertxUtils - deploy vertx
> > > > failed,
> > > > > cause
> > > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> > SSL/TLS
> > > > > engine
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > > SSLHelper.java:90)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.
> java:151)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > > HttpClientImpl.java:131)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> > > > java:296)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:36)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:27)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > ClientPoolManager.
> > > > > createClientPool(ClientPoolManager.java:60)
> > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > ClientVerticle.start(ClientVerticle.java:35)
> > > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at io.vertx.core.AbstractVerticle.start(
> > > AbstractVerticle.java:111)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > > doDeploy$10(DeploymentManager.java:481)
> ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > > ContextImpl.java:344)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.
> safeExecute(
> > > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > > runAllTasks(
> > > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> > java:463)
> > > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > > run(SingleThreadEventExecutor.java:884)
> ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > >
> > > > >
> > > > > But it looks like the service is registered rightly.
> > > > >
> > > > > service-center> 2018-07-25 08:00:43.056 +00:00 INFO
> > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> > 18,
> > > > > succeed: true}, watch prefix /cse-sr/ms/indexes/, start rev 15+1,
> > > > > service-center> 2018-07-25 08:00:43.060 +00:00 INFO
> > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> > 18,
> > > > > succeed: true}, watch prefix /cse-sr/ms/alias/, start rev 3+1,
> > > > > payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
> > > > > o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
> > > > > successfully. id=[d435f3f78fe011e89bc30242ac110002]
> > > > > appId=[saga-crossapp], name=[payment-service], version=[0.0.1],
> > > > > schemaIds=[payment-endpoint], env=[]
> > > > > payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
> > > > > o.a.s.s.task.MicroserviceRegisterTask    : schemaId
> > [payment-endpoint]
> > > > > exists [true], summary exists [false]
> > > > > service-center> 2018-07-25 08:00:43.064 +00:00 ERROR
> > > service/schema.go:69
> > > > > get schema failed, serviceId d435f3f78fe011e89bc30242ac110002,
> > > schemaId
> > > > > payment-endpoint: schema not exists.
> > > > > payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0]
> > > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > > >   : get response for org.apache.servicecomb.
> > > > serviceregistry.api.response.GetSchemaResponse
> > > > > failed, 400:Bad Request, {"errorCode":"400016","
> > errorMessage":"Schema
> > > > > does not exist","detail":"Do not have this schema info."}
> > > > > payment>
> > > > > service-center> 2018-07-25 08:00:43.086 +00:00 INFO
> > > service/schema.go:564
> > > > > start to modify schema, serviceId  d435f3f78fe011e89bc30242ac1100
> 02,
> > > > > schemaId payment-endpoint
> > > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > service/schema.go:518
> > > > > modify schema successfully: serviceId
> d435f3f78fe011e89bc30242ac1100
> > > 02,
> > > > > schemaId payment-endpoint.
> > > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> > 19,
> > > > > succeed: true}, watch prefix /cse-sr/ms/schema-sum/, start rev
> 16+1,
> > > > > payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main]
> > > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > > >   : register schema d435f3f78fe011e89bc30242ac1100
> > 02/payment-endpoint
> > > > > success.
> > > > >
> > > > > Is there any thing that I'm missing?
> > > > >
> > > > > Willem Jiang
> > > > >
> > > > > Twitter: willemjiang
> > > > > Weibo: 姜宁willem
> > > > >
> > > > > On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <
> > willem.jiang@gmail.com>
> > > > > wrote:
> > > > >
> > > > >> It could handy for the user to write the test without starting the
> > > > >> service-center,
> > > > >> we could add it into  the section of best practice of writing a
> uni
> > > > test.
> > > > >>
> > > > >>
> > > > >> Willem Jiang
> > > > >>
> > > > >> Twitter: willemjiang
> > > > >> Weibo: 姜宁willem
> > > > >>
> > > > >> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
> > > > >>
> > > > >>> LocalRegistry for java-chassis is created only for test purpose
> and
> > > not
> > > > >>> intended for product  use. Is there many scenarios need this? Or
> we
> > > > need to
> > > > >>> reorganize its code to meet product use.
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> ------------------ 原始邮件 ------------------
> > > > >>> 发件人: "willem.jiang"<wi...@gmail.com>;
> > > > >>> 发送时间: 2018年7月25日(星期三) 下午2:22
> > > > >>> 收件人: "dev"<de...@servicecomb.apache.org>;
> > > > >>>
> > > > >>> 主题: Re: Cannot find the instance in ServiceComb Discovery
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> Hi, jimin,
> > > > >>>
> > > > >>> Changed the System property fix the issue, but it looks like we
> > have
> > > > some
> > > > >>> undocument information need to updated.
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> Willem Jiang
> > > > >>>
> > > > >>> Twitter: willemjiang
> > > > >>> Weibo: 姜宁willem
> > > > >>>
> > > > >>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com>
> > wrote:
> > > > >>>
> > > > >>> > you write a local registry.yaml, but missed some important data
> > > > >>> > a easy way to fix: do not write the registry.yaml
> > > > >>> > because you test case is self invoke self, ServiceComb engine
> can
> > > > >>> generate
> > > > >>> > informations dynamiclly
> > > > >>> >
> > > > >>> > change: org.apache.servicecomb.saga.discovery.service.center.
> > > > >>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
> > > > >>> >
> > > > >>> > private static void setUpLocalRegistry() {
> > > > >>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustFor
> > > > >>> ceLocal");
> > > > >>> > }
> > > > >>> >
> > > > >>> >
> > > > >>> >
> > > > >>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <
> willem.jiang@gmail.com
> > >:
> > > > >>> >
> > > > >>> > > Hi
> > > > >>> > >
> > > > >>> > > When I recovery the old saga code in the SCB-692 branch[1] ,
> I
> > > got
> > > > >>> the
> > > > >>> > > error when running the ServiceCenterDiscoveryRestTran
> sportTest
> > > in
> > > > >>> the
> > > > >>> > > ServiceComb Discovery module.
> > > > >>> > > It looks like the service provide already registered, but the
> > > > Service
> > > > >>> > Path
> > > > >>> > > Manager cannot find the right instance. I tried to debug the
> > > code,
> > > > >>> but
> > > > >>> > > there are some points those I missed.
> > > > >>> > >
> > > > >>> > > You can reproduce the error by checking out the saga code and
> > > > switch
> > > > >>> to
> > > > >>> > > SCB-692 branch.
> > > > >>> > >
> > > > >>> > > [1]https://github.com/apache/incubator-servicecomb-saga/
> > > > tree/SCB-692
> > > > >>> > >
> > > > >>> > > Willem Jiang
> > > > >>> > >
> > > > >>> > > Twitter: willemjiang
> > > > >>> > > Weibo: 姜宁willem
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > > >>
> > > > >>
> > > > >
> > > >
> > >
> >
>

回复: Cannot find the instance in ServiceComb Discovery

Posted by Sure <su...@qq.com>.
this is the environment isolation problem. i have check the ci log and found that the car-rental-service is registered in development environment but other services are registered in ''(default) environment. so it will fail when car service discovery hotal service instances from SC.




------------------ 原始邮件 ------------------
发件人: "willem.jiang"<wi...@gmail.com>;
发送时间: 2018年7月26日(星期四) 上午9:32
收件人: "dev"<de...@servicecomb.apache.org>;

主题: Re: Cannot find the instance in ServiceComb Discovery



Thx a lot.
You can find the docker log here [1]

[1]https://api.travis-ci.org/v3/job/407953904/log.txt


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Thu, Jul 26, 2018 at 9:07 AM, wjm wjm <zz...@gmail.com> wrote:

> sorry, i made a mistake,  running order is no problem.
> cuyihua will help to find the problem.
>
> 2018-07-26 8:08 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>
> > I already updated them in the SCB-692 branch.
> > Please check the SCB-692 branch again for it.
> >
> >
> > Willem Jiang
> >
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> > On Wed, Jul 25, 2018 at 8:28 PM, wjm wjm <zz...@gmail.com> wrote:
> >
> > > 1.saga-spring project, some classes import io.servicecomb packages,
> > should
> > > update to org.apache.servicecomb
> > > 2.org.apache.servicecomb.saga.spring.SagaServiceDiscoveryTest#
> > > setUpLocalRegistry
> > > has the same registry declare problem
> > >
> > > 2018-07-25 17:02 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> > >
> > > > FYI,  you can find full log file here[1]
> > > >
> > > > [1]https://api.travis-ci.org/v3/job/407953904/log.txt
> > > >
> > > >
> > > > Willem Jiang
> > > >
> > > > Twitter: willemjiang
> > > > Weibo: 姜宁willem
> > > >
> > > > On Wed, Jul 25, 2018 at 4:09 PM, Willem Jiang <
> willem.jiang@gmail.com>
> > > > wrote:
> > > >
> > > > > It looks like there is still some thing wrong when using the
> > > > > service-center to discover the published services when running the
> > > > > integration test of dependency-free-transaction-demo: demo-tests.
> > > > > You can reproduce the error by checking out the SCB-692 and running
> > the
> > > > > test from saga-demo/dependency-free-transaction-demo/demo-tests
> > > > >
> > > > > saga> 07:27:11.094 [saga-pool-thread-3] INFO
> > > > org.apache.servicecomb.saga.core.LoggingRecoveryPolicy
> > > > > - Starting request id=request-hotel for service
> > > hotel-reservation-service
> > > > > saga> 07:27:11.136 [saga-pool-thread-2] INFO
> org.apache.servicecomb.
> > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > MicroserviceVersions, appId=saga, microserviceName=car-rental-
> > service.
> > > > > saga> 07:27:11.137 [saga-pool-thread-4] INFO
> org.apache.servicecomb.
> > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > MicroserviceVersions, appId=saga, microserviceName=flight-
> > > > booking-service.
> > > > > saga> 07:27:11.137 [saga-pool-thread-3] INFO
> org.apache.servicecomb.
> > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > MicroserviceVersions, appId=saga, microserviceName=hotel-
> > > > > reservation-service.
> > > > > service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
> > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > > saga/flight-booking-service/0.0.0+
> > > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > > saga/car-rental-service/0.0.0+
> > > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > saga/hotel-reservation-
> > > > > service/0.0.0+
> > > > > saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
> > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > ServiceRegistryClientImpl
> > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > exist","detail":"provider not exist, consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > find provider saga/flight-booking-service/0.0.0+"}
> > > > > saga>
> > > > > saga> 07:27:11.151 [saga-pool-thread-4] ERROR
> org.apache.servicecomb.
> > > > > serviceregistry.registry.AbstractServiceRegistry - Can not find
> any
> > > > > instances from service center due to previous errors.
> > > > > service=saga/flight-booking-service/0.0.0+
> > > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > ServiceRegistryClientImpl
> > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > exist","detail":"provider not exist, consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > find provider saga/car-rental-service/0.0.0+"}
> > > > > saga>
> > > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > ServiceRegistryClientImpl
> > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > exist","detail":"provider not exist, consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > find provider saga/hotel-reservation-service/0.0.0+"}
> > > > >
> > > > > Just checked the saga instance log, there are some WARN message,
> > > > >
> > > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - keyStore [server.p12] file not exist, please check!
> > > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - trustStore [trust.jks] file not exist, please check!
> > > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - keyStore [server.p12] file not exist, please check!
> > > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - trustStore [trust.jks] file not exist, please check!
> > > > > saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
> > > > > org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
> > > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> > SSL/TLS
> > > > > engine
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > > SSLHelper.java:90)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.
> java:151)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > > HttpClientImpl.java:131)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> > > > java:296)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:36)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:27)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > ClientPoolManager.
> > > > > createClientPool(ClientPoolManager.java:60)
> > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > ClientVerticle.start(ClientVerticle.java:35)
> > > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at io.vertx.core.AbstractVerticle.start(
> > > AbstractVerticle.java:111)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > > doDeploy$10(DeploymentManager.java:481)
> ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > > ContextImpl.java:344)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.
> safeExecute(
> > > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > > runAllTasks(
> > > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> > java:463)
> > > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > > run(SingleThreadEventExecutor.java:884)
> ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > > saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
> > > > > org.apache.servicecomb.foundation.vertx.VertxUtils - deploy vertx
> > > > failed,
> > > > > cause
> > > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> > SSL/TLS
> > > > > engine
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > > SSLHelper.java:90)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.
> java:151)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > > HttpClientImpl.java:131)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> > > > java:296)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:36)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:27)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > ClientPoolManager.
> > > > > createClientPool(ClientPoolManager.java:60)
> > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > ClientVerticle.start(ClientVerticle.java:35)
> > > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at io.vertx.core.AbstractVerticle.start(
> > > AbstractVerticle.java:111)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > > doDeploy$10(DeploymentManager.java:481)
> ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > > ContextImpl.java:344)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.
> safeExecute(
> > > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > > runAllTasks(
> > > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> > java:463)
> > > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > > run(SingleThreadEventExecutor.java:884)
> ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > >
> > > > >
> > > > > But it looks like the service is registered rightly.
> > > > >
> > > > > service-center> 2018-07-25 08:00:43.056 +00:00 INFO
> > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> > 18,
> > > > > succeed: true}, watch prefix /cse-sr/ms/indexes/, start rev 15+1,
> > > > > service-center> 2018-07-25 08:00:43.060 +00:00 INFO
> > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> > 18,
> > > > > succeed: true}, watch prefix /cse-sr/ms/alias/, start rev 3+1,
> > > > > payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
> > > > > o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
> > > > > successfully. id=[d435f3f78fe011e89bc30242ac110002]
> > > > > appId=[saga-crossapp], name=[payment-service], version=[0.0.1],
> > > > > schemaIds=[payment-endpoint], env=[]
> > > > > payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
> > > > > o.a.s.s.task.MicroserviceRegisterTask    : schemaId
> > [payment-endpoint]
> > > > > exists [true], summary exists [false]
> > > > > service-center> 2018-07-25 08:00:43.064 +00:00 ERROR
> > > service/schema.go:69
> > > > > get schema failed, serviceId d435f3f78fe011e89bc30242ac110002,
> > > schemaId
> > > > > payment-endpoint: schema not exists.
> > > > > payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0]
> > > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > > >   : get response for org.apache.servicecomb.
> > > > serviceregistry.api.response.GetSchemaResponse
> > > > > failed, 400:Bad Request, {"errorCode":"400016","
> > errorMessage":"Schema
> > > > > does not exist","detail":"Do not have this schema info."}
> > > > > payment>
> > > > > service-center> 2018-07-25 08:00:43.086 +00:00 INFO
> > > service/schema.go:564
> > > > > start to modify schema, serviceId  d435f3f78fe011e89bc30242ac1100
> 02,
> > > > > schemaId payment-endpoint
> > > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > service/schema.go:518
> > > > > modify schema successfully: serviceId
> d435f3f78fe011e89bc30242ac1100
> > > 02,
> > > > > schemaId payment-endpoint.
> > > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> > 19,
> > > > > succeed: true}, watch prefix /cse-sr/ms/schema-sum/, start rev
> 16+1,
> > > > > payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main]
> > > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > > >   : register schema d435f3f78fe011e89bc30242ac1100
> > 02/payment-endpoint
> > > > > success.
> > > > >
> > > > > Is there any thing that I'm missing?
> > > > >
> > > > > Willem Jiang
> > > > >
> > > > > Twitter: willemjiang
> > > > > Weibo: 姜宁willem
> > > > >
> > > > > On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <
> > willem.jiang@gmail.com>
> > > > > wrote:
> > > > >
> > > > >> It could handy for the user to write the test without starting the
> > > > >> service-center,
> > > > >> we could add it into  the section of best practice of writing a
> uni
> > > > test.
> > > > >>
> > > > >>
> > > > >> Willem Jiang
> > > > >>
> > > > >> Twitter: willemjiang
> > > > >> Weibo: 姜宁willem
> > > > >>
> > > > >> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
> > > > >>
> > > > >>> LocalRegistry for java-chassis is created only for test purpose
> and
> > > not
> > > > >>> intended for product  use. Is there many scenarios need this? Or
> we
> > > > need to
> > > > >>> reorganize its code to meet product use.
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> ------------------ 原始邮件 ------------------
> > > > >>> 发件人: "willem.jiang"<wi...@gmail.com>;
> > > > >>> 发送时间: 2018年7月25日(星期三) 下午2:22
> > > > >>> 收件人: "dev"<de...@servicecomb.apache.org>;
> > > > >>>
> > > > >>> 主题: Re: Cannot find the instance in ServiceComb Discovery
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> Hi, jimin,
> > > > >>>
> > > > >>> Changed the System property fix the issue, but it looks like we
> > have
> > > > some
> > > > >>> undocument information need to updated.
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> Willem Jiang
> > > > >>>
> > > > >>> Twitter: willemjiang
> > > > >>> Weibo: 姜宁willem
> > > > >>>
> > > > >>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com>
> > wrote:
> > > > >>>
> > > > >>> > you write a local registry.yaml, but missed some important data
> > > > >>> > a easy way to fix: do not write the registry.yaml
> > > > >>> > because you test case is self invoke self, ServiceComb engine
> can
> > > > >>> generate
> > > > >>> > informations dynamiclly
> > > > >>> >
> > > > >>> > change: org.apache.servicecomb.saga.discovery.service.center.
> > > > >>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
> > > > >>> >
> > > > >>> > private static void setUpLocalRegistry() {
> > > > >>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustFor
> > > > >>> ceLocal");
> > > > >>> > }
> > > > >>> >
> > > > >>> >
> > > > >>> >
> > > > >>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <
> willem.jiang@gmail.com
> > >:
> > > > >>> >
> > > > >>> > > Hi
> > > > >>> > >
> > > > >>> > > When I recovery the old saga code in the SCB-692 branch[1] ,
> I
> > > got
> > > > >>> the
> > > > >>> > > error when running the ServiceCenterDiscoveryRestTran
> sportTest
> > > in
> > > > >>> the
> > > > >>> > > ServiceComb Discovery module.
> > > > >>> > > It looks like the service provide already registered, but the
> > > > Service
> > > > >>> > Path
> > > > >>> > > Manager cannot find the right instance. I tried to debug the
> > > code,
> > > > >>> but
> > > > >>> > > there are some points those I missed.
> > > > >>> > >
> > > > >>> > > You can reproduce the error by checking out the saga code and
> > > > switch
> > > > >>> to
> > > > >>> > > SCB-692 branch.
> > > > >>> > >
> > > > >>> > > [1]https://github.com/apache/incubator-servicecomb-saga/
> > > > tree/SCB-692
> > > > >>> > >
> > > > >>> > > Willem Jiang
> > > > >>> > >
> > > > >>> > > Twitter: willemjiang
> > > > >>> > > Weibo: 姜宁willem
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > > >>
> > > > >>
> > > > >
> > > >
> > >
> >
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by Willem Jiang <wi...@gmail.com>.
Thx a lot.
You can find the docker log here [1]

[1]https://api.travis-ci.org/v3/job/407953904/log.txt


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Thu, Jul 26, 2018 at 9:07 AM, wjm wjm <zz...@gmail.com> wrote:

> sorry, i made a mistake,  running order is no problem.
> cuyihua will help to find the problem.
>
> 2018-07-26 8:08 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>
> > I already updated them in the SCB-692 branch.
> > Please check the SCB-692 branch again for it.
> >
> >
> > Willem Jiang
> >
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> > On Wed, Jul 25, 2018 at 8:28 PM, wjm wjm <zz...@gmail.com> wrote:
> >
> > > 1.saga-spring project, some classes import io.servicecomb packages,
> > should
> > > update to org.apache.servicecomb
> > > 2.org.apache.servicecomb.saga.spring.SagaServiceDiscoveryTest#
> > > setUpLocalRegistry
> > > has the same registry declare problem
> > >
> > > 2018-07-25 17:02 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> > >
> > > > FYI,  you can find full log file here[1]
> > > >
> > > > [1]https://api.travis-ci.org/v3/job/407953904/log.txt
> > > >
> > > >
> > > > Willem Jiang
> > > >
> > > > Twitter: willemjiang
> > > > Weibo: 姜宁willem
> > > >
> > > > On Wed, Jul 25, 2018 at 4:09 PM, Willem Jiang <
> willem.jiang@gmail.com>
> > > > wrote:
> > > >
> > > > > It looks like there is still some thing wrong when using the
> > > > > service-center to discover the published services when running the
> > > > > integration test of dependency-free-transaction-demo: demo-tests.
> > > > > You can reproduce the error by checking out the SCB-692 and running
> > the
> > > > > test from saga-demo/dependency-free-transaction-demo/demo-tests
> > > > >
> > > > > saga> 07:27:11.094 [saga-pool-thread-3] INFO
> > > > org.apache.servicecomb.saga.core.LoggingRecoveryPolicy
> > > > > - Starting request id=request-hotel for service
> > > hotel-reservation-service
> > > > > saga> 07:27:11.136 [saga-pool-thread-2] INFO
> org.apache.servicecomb.
> > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > MicroserviceVersions, appId=saga, microserviceName=car-rental-
> > service.
> > > > > saga> 07:27:11.137 [saga-pool-thread-4] INFO
> org.apache.servicecomb.
> > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > MicroserviceVersions, appId=saga, microserviceName=flight-
> > > > booking-service.
> > > > > saga> 07:27:11.137 [saga-pool-thread-3] INFO
> org.apache.servicecomb.
> > > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > > MicroserviceVersions, appId=saga, microserviceName=hotel-
> > > > > reservation-service.
> > > > > service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
> > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > > saga/flight-booking-service/0.0.0+
> > > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > > saga/car-rental-service/0.0.0+
> > > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > > service/instance.go:538 find instance failed, provider not exist,
> > > > consumer
> > > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > saga/hotel-reservation-
> > > > > service/0.0.0+
> > > > > saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
> > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > ServiceRegistryClientImpl
> > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > exist","detail":"provider not exist, consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > find provider saga/flight-booking-service/0.0.0+"}
> > > > > saga>
> > > > > saga> 07:27:11.151 [saga-pool-thread-4] ERROR
> org.apache.servicecomb.
> > > > > serviceregistry.registry.AbstractServiceRegistry - Can not find
> any
> > > > > instances from service center due to previous errors.
> > > > > service=saga/flight-booking-service/0.0.0+
> > > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > ServiceRegistryClientImpl
> > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > exist","detail":"provider not exist, consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > find provider saga/car-rental-service/0.0.0+"}
> > > > > saga>
> > > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > > org.apache.servicecomb.serviceregistry.client.http.
> > > > ServiceRegistryClientImpl
> > > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > > exist","detail":"provider not exist, consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002
> > > > > find provider saga/hotel-reservation-service/0.0.0+"}
> > > > >
> > > > > Just checked the saga instance log, there are some WARN message,
> > > > >
> > > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - keyStore [server.p12] file not exist, please check!
> > > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - trustStore [trust.jks] file not exist, please check!
> > > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - keyStore [server.p12] file not exist, please check!
> > > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > > foundation.vertx.
> > > > VertxTLSBuilder
> > > > > - trustStore [trust.jks] file not exist, please check!
> > > > > saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
> > > > > org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
> > > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> > SSL/TLS
> > > > > engine
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > > SSLHelper.java:90)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.
> java:151)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > > HttpClientImpl.java:131)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> > > > java:296)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:36)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:27)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > ClientPoolManager.
> > > > > createClientPool(ClientPoolManager.java:60)
> > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > ClientVerticle.start(ClientVerticle.java:35)
> > > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at io.vertx.core.AbstractVerticle.start(
> > > AbstractVerticle.java:111)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > > doDeploy$10(DeploymentManager.java:481)
> ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > > ContextImpl.java:344)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.
> safeExecute(
> > > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > > runAllTasks(
> > > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> > java:463)
> > > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > > run(SingleThreadEventExecutor.java:884)
> ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > > saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
> > > > > org.apache.servicecomb.foundation.vertx.VertxUtils - deploy vertx
> > > > failed,
> > > > > cause
> > > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> > SSL/TLS
> > > > > engine
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > > SSLHelper.java:90)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.
> java:151)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > > HttpClientImpl.java:131)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> > > > java:296)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:36)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > > HttpClientPoolFactory.createClientPool(
> > HttpClientPoolFactory.java:27)
> > > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > ClientPoolManager.
> > > > > createClientPool(ClientPoolManager.java:60)
> > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > > ClientVerticle.start(ClientVerticle.java:35)
> > > > ~[foundation-vertx-1.0.0-m2.
> > > > > jar!/:1.0.0-m2]
> > > > > saga> at io.vertx.core.AbstractVerticle.start(
> > > AbstractVerticle.java:111)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > > doDeploy$10(DeploymentManager.java:481)
> ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > > ContextImpl.java:344)
> > > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.
> safeExecute(
> > > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > > runAllTasks(
> > > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> > java:463)
> > > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > > run(SingleThreadEventExecutor.java:884)
> ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > > jar!/:4.1.24.Final]
> > > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > >
> > > > >
> > > > > But it looks like the service is registered rightly.
> > > > >
> > > > > service-center> 2018-07-25 08:00:43.056 +00:00 INFO
> > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> > 18,
> > > > > succeed: true}, watch prefix /cse-sr/ms/indexes/, start rev 15+1,
> > > > > service-center> 2018-07-25 08:00:43.060 +00:00 INFO
> > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> > 18,
> > > > > succeed: true}, watch prefix /cse-sr/ms/alias/, start rev 3+1,
> > > > > payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
> > > > > o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
> > > > > successfully. id=[d435f3f78fe011e89bc30242ac110002]
> > > > > appId=[saga-crossapp], name=[payment-service], version=[0.0.1],
> > > > > schemaIds=[payment-endpoint], env=[]
> > > > > payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
> > > > > o.a.s.s.task.MicroserviceRegisterTask    : schemaId
> > [payment-endpoint]
> > > > > exists [true], summary exists [false]
> > > > > service-center> 2018-07-25 08:00:43.064 +00:00 ERROR
> > > service/schema.go:69
> > > > > get schema failed, serviceId d435f3f78fe011e89bc30242ac110002,
> > > schemaId
> > > > > payment-endpoint: schema not exists.
> > > > > payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0]
> > > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > > >   : get response for org.apache.servicecomb.
> > > > serviceregistry.api.response.GetSchemaResponse
> > > > > failed, 400:Bad Request, {"errorCode":"400016","
> > errorMessage":"Schema
> > > > > does not exist","detail":"Do not have this schema info."}
> > > > > payment>
> > > > > service-center> 2018-07-25 08:00:43.086 +00:00 INFO
> > > service/schema.go:564
> > > > > start to modify schema, serviceId  d435f3f78fe011e89bc30242ac1100
> 02,
> > > > > schemaId payment-endpoint
> > > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > service/schema.go:518
> > > > > modify schema successfully: serviceId
> d435f3f78fe011e89bc30242ac1100
> > > 02,
> > > > > schemaId payment-endpoint.
> > > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> > 19,
> > > > > succeed: true}, watch prefix /cse-sr/ms/schema-sum/, start rev
> 16+1,
> > > > > payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main]
> > > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > > >   : register schema d435f3f78fe011e89bc30242ac1100
> > 02/payment-endpoint
> > > > > success.
> > > > >
> > > > > Is there any thing that I'm missing?
> > > > >
> > > > > Willem Jiang
> > > > >
> > > > > Twitter: willemjiang
> > > > > Weibo: 姜宁willem
> > > > >
> > > > > On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <
> > willem.jiang@gmail.com>
> > > > > wrote:
> > > > >
> > > > >> It could handy for the user to write the test without starting the
> > > > >> service-center,
> > > > >> we could add it into  the section of best practice of writing a
> uni
> > > > test.
> > > > >>
> > > > >>
> > > > >> Willem Jiang
> > > > >>
> > > > >> Twitter: willemjiang
> > > > >> Weibo: 姜宁willem
> > > > >>
> > > > >> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
> > > > >>
> > > > >>> LocalRegistry for java-chassis is created only for test purpose
> and
> > > not
> > > > >>> intended for product  use. Is there many scenarios need this? Or
> we
> > > > need to
> > > > >>> reorganize its code to meet product use.
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> ------------------ 原始邮件 ------------------
> > > > >>> 发件人: "willem.jiang"<wi...@gmail.com>;
> > > > >>> 发送时间: 2018年7月25日(星期三) 下午2:22
> > > > >>> 收件人: "dev"<de...@servicecomb.apache.org>;
> > > > >>>
> > > > >>> 主题: Re: Cannot find the instance in ServiceComb Discovery
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> Hi, jimin,
> > > > >>>
> > > > >>> Changed the System property fix the issue, but it looks like we
> > have
> > > > some
> > > > >>> undocument information need to updated.
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> Willem Jiang
> > > > >>>
> > > > >>> Twitter: willemjiang
> > > > >>> Weibo: 姜宁willem
> > > > >>>
> > > > >>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com>
> > wrote:
> > > > >>>
> > > > >>> > you write a local registry.yaml, but missed some important data
> > > > >>> > a easy way to fix: do not write the registry.yaml
> > > > >>> > because you test case is self invoke self, ServiceComb engine
> can
> > > > >>> generate
> > > > >>> > informations dynamiclly
> > > > >>> >
> > > > >>> > change: org.apache.servicecomb.saga.discovery.service.center.
> > > > >>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
> > > > >>> >
> > > > >>> > private static void setUpLocalRegistry() {
> > > > >>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustFor
> > > > >>> ceLocal");
> > > > >>> > }
> > > > >>> >
> > > > >>> >
> > > > >>> >
> > > > >>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <
> willem.jiang@gmail.com
> > >:
> > > > >>> >
> > > > >>> > > Hi
> > > > >>> > >
> > > > >>> > > When I recovery the old saga code in the SCB-692 branch[1] ,
> I
> > > got
> > > > >>> the
> > > > >>> > > error when running the ServiceCenterDiscoveryRestTran
> sportTest
> > > in
> > > > >>> the
> > > > >>> > > ServiceComb Discovery module.
> > > > >>> > > It looks like the service provide already registered, but the
> > > > Service
> > > > >>> > Path
> > > > >>> > > Manager cannot find the right instance. I tried to debug the
> > > code,
> > > > >>> but
> > > > >>> > > there are some points those I missed.
> > > > >>> > >
> > > > >>> > > You can reproduce the error by checking out the saga code and
> > > > switch
> > > > >>> to
> > > > >>> > > SCB-692 branch.
> > > > >>> > >
> > > > >>> > > [1]https://github.com/apache/incubator-servicecomb-saga/
> > > > tree/SCB-692
> > > > >>> > >
> > > > >>> > > Willem Jiang
> > > > >>> > >
> > > > >>> > > Twitter: willemjiang
> > > > >>> > > Weibo: 姜宁willem
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > > >>
> > > > >>
> > > > >
> > > >
> > >
> >
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by wjm wjm <zz...@gmail.com>.
sorry, i made a mistake,  running order is no problem.
cuyihua will help to find the problem.

2018-07-26 8:08 GMT+08:00 Willem Jiang <wi...@gmail.com>:

> I already updated them in the SCB-692 branch.
> Please check the SCB-692 branch again for it.
>
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Wed, Jul 25, 2018 at 8:28 PM, wjm wjm <zz...@gmail.com> wrote:
>
> > 1.saga-spring project, some classes import io.servicecomb packages,
> should
> > update to org.apache.servicecomb
> > 2.org.apache.servicecomb.saga.spring.SagaServiceDiscoveryTest#
> > setUpLocalRegistry
> > has the same registry declare problem
> >
> > 2018-07-25 17:02 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> >
> > > FYI,  you can find full log file here[1]
> > >
> > > [1]https://api.travis-ci.org/v3/job/407953904/log.txt
> > >
> > >
> > > Willem Jiang
> > >
> > > Twitter: willemjiang
> > > Weibo: 姜宁willem
> > >
> > > On Wed, Jul 25, 2018 at 4:09 PM, Willem Jiang <wi...@gmail.com>
> > > wrote:
> > >
> > > > It looks like there is still some thing wrong when using the
> > > > service-center to discover the published services when running the
> > > > integration test of dependency-free-transaction-demo: demo-tests.
> > > > You can reproduce the error by checking out the SCB-692 and running
> the
> > > > test from saga-demo/dependency-free-transaction-demo/demo-tests
> > > >
> > > > saga> 07:27:11.094 [saga-pool-thread-3] INFO
> > > org.apache.servicecomb.saga.core.LoggingRecoveryPolicy
> > > > - Starting request id=request-hotel for service
> > hotel-reservation-service
> > > > saga> 07:27:11.136 [saga-pool-thread-2] INFO  org.apache.servicecomb.
> > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > MicroserviceVersions, appId=saga, microserviceName=car-rental-
> service.
> > > > saga> 07:27:11.137 [saga-pool-thread-4] INFO  org.apache.servicecomb.
> > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > MicroserviceVersions, appId=saga, microserviceName=flight-
> > > booking-service.
> > > > saga> 07:27:11.137 [saga-pool-thread-3] INFO  org.apache.servicecomb.
> > > > serviceregistry.consumer.MicroserviceVersions - create
> > > > MicroserviceVersions, appId=saga, microserviceName=hotel-
> > > > reservation-service.
> > > > service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
> > > > service/instance.go:538 find instance failed, provider not exist,
> > > consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > saga/flight-booking-service/0.0.0+
> > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > service/instance.go:538 find instance failed, provider not exist,
> > > consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > > saga/car-rental-service/0.0.0+
> > > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > > service/instance.go:538 find instance failed, provider not exist,
> > > consumer
> > > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> saga/hotel-reservation-
> > > > service/0.0.0+
> > > > saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
> > > > org.apache.servicecomb.serviceregistry.client.http.
> > > ServiceRegistryClientImpl
> > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > exist","detail":"provider not exist, consumer
> > > 2342a4c78fdc11e8a80c0242ac110002
> > > > find provider saga/flight-booking-service/0.0.0+"}
> > > > saga>
> > > > saga> 07:27:11.151 [saga-pool-thread-4] ERROR org.apache.servicecomb.
> > > > serviceregistry.registry.AbstractServiceRegistry - Can not find any
> > > > instances from service center due to previous errors.
> > > > service=saga/flight-booking-service/0.0.0+
> > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > org.apache.servicecomb.serviceregistry.client.http.
> > > ServiceRegistryClientImpl
> > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > exist","detail":"provider not exist, consumer
> > > 2342a4c78fdc11e8a80c0242ac110002
> > > > find provider saga/car-rental-service/0.0.0+"}
> > > > saga>
> > > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > > org.apache.servicecomb.serviceregistry.client.http.
> > > ServiceRegistryClientImpl
> > > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > > exist","detail":"provider not exist, consumer
> > > 2342a4c78fdc11e8a80c0242ac110002
> > > > find provider saga/hotel-reservation-service/0.0.0+"}
> > > >
> > > > Just checked the saga instance log, there are some WARN message,
> > > >
> > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > foundation.vertx.
> > > VertxTLSBuilder
> > > > - keyStore [server.p12] file not exist, please check!
> > > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> > foundation.vertx.
> > > VertxTLSBuilder
> > > > - trustStore [trust.jks] file not exist, please check!
> > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > foundation.vertx.
> > > VertxTLSBuilder
> > > > - keyStore [server.p12] file not exist, please check!
> > > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> > foundation.vertx.
> > > VertxTLSBuilder
> > > > - trustStore [trust.jks] file not exist, please check!
> > > > saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
> > > > org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
> > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> SSL/TLS
> > > > engine
> > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > SSLHelper.java:90)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > HttpClientImpl.java:131)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> > > java:296)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > HttpClientPoolFactory.createClientPool(
> HttpClientPoolFactory.java:36)
> > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > HttpClientPoolFactory.createClientPool(
> HttpClientPoolFactory.java:27)
> > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > ClientPoolManager.
> > > > createClientPool(ClientPoolManager.java:60)
> > ~[foundation-vertx-1.0.0-m2.
> > > > jar!/:1.0.0-m2]
> > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > ClientVerticle.start(ClientVerticle.java:35)
> > > ~[foundation-vertx-1.0.0-m2.
> > > > jar!/:1.0.0-m2]
> > > > saga> at io.vertx.core.AbstractVerticle.start(
> > AbstractVerticle.java:111)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > doDeploy$10(DeploymentManager.java:481) ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > ContextImpl.java:344)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
> > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > jar!/:4.1.24.Final]
> > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > runAllTasks(
> > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > jar!/:4.1.24.Final]
> > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> java:463)
> > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.24.Final.
> > > > jar!/:4.1.24.Final]
> > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > jar!/:4.1.24.Final]
> > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > > saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
> > > > org.apache.servicecomb.foundation.vertx.VertxUtils - deploy vertx
> > > failed,
> > > > cause
> > > > saga> io.vertx.core.VertxException: ALPN not available for JDK
> SSL/TLS
> > > > engine
> > > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > > SSLHelper.java:90)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > > HttpClientImpl.java:131)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> > > java:296)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > HttpClientPoolFactory.createClientPool(
> HttpClientPoolFactory.java:36)
> > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > > HttpClientPoolFactory.createClientPool(
> HttpClientPoolFactory.java:27)
> > > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > ClientPoolManager.
> > > > createClientPool(ClientPoolManager.java:60)
> > ~[foundation-vertx-1.0.0-m2.
> > > > jar!/:1.0.0-m2]
> > > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > > ClientVerticle.start(ClientVerticle.java:35)
> > > ~[foundation-vertx-1.0.0-m2.
> > > > jar!/:1.0.0-m2]
> > > > saga> at io.vertx.core.AbstractVerticle.start(
> > AbstractVerticle.java:111)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > > doDeploy$10(DeploymentManager.java:481) ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > > ContextImpl.java:344)
> > > > ~[vertx-core-3.5.0.jar!/:?]
> > > > saga> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
> > > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > > jar!/:4.1.24.Final]
> > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> > runAllTasks(
> > > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > > jar!/:4.1.24.Final]
> > > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.
> java:463)
> > > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > > run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.24.Final.
> > > > jar!/:4.1.24.Final]
> > > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > > jar!/:4.1.24.Final]
> > > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > >
> > > >
> > > > But it looks like the service is registered rightly.
> > > >
> > > > service-center> 2018-07-25 08:00:43.056 +00:00 INFO
> > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> 18,
> > > > succeed: true}, watch prefix /cse-sr/ms/indexes/, start rev 15+1,
> > > > service-center> 2018-07-25 08:00:43.060 +00:00 INFO
> > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> 18,
> > > > succeed: true}, watch prefix /cse-sr/ms/alias/, start rev 3+1,
> > > > payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
> > > > o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
> > > > successfully. id=[d435f3f78fe011e89bc30242ac110002]
> > > > appId=[saga-crossapp], name=[payment-service], version=[0.0.1],
> > > > schemaIds=[payment-endpoint], env=[]
> > > > payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
> > > > o.a.s.s.task.MicroserviceRegisterTask    : schemaId
> [payment-endpoint]
> > > > exists [true], summary exists [false]
> > > > service-center> 2018-07-25 08:00:43.064 +00:00 ERROR
> > service/schema.go:69
> > > > get schema failed, serviceId d435f3f78fe011e89bc30242ac110002,
> > schemaId
> > > > payment-endpoint: schema not exists.
> > > > payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0]
> > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > >   : get response for org.apache.servicecomb.
> > > serviceregistry.api.response.GetSchemaResponse
> > > > failed, 400:Bad Request, {"errorCode":"400016","
> errorMessage":"Schema
> > > > does not exist","detail":"Do not have this schema info."}
> > > > payment>
> > > > service-center> 2018-07-25 08:00:43.086 +00:00 INFO
> > service/schema.go:564
> > > > start to modify schema, serviceId  d435f3f78fe011e89bc30242ac110002,
> > > > schemaId payment-endpoint
> > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > service/schema.go:518
> > > > modify schema successfully: serviceId d435f3f78fe011e89bc30242ac1100
> > 02,
> > > > schemaId payment-endpoint.
> > > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev:
> 19,
> > > > succeed: true}, watch prefix /cse-sr/ms/schema-sum/, start rev 16+1,
> > > > payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main]
> > > o.a.s.s.c.h.ServiceRegistryClientImpl
> > > >   : register schema d435f3f78fe011e89bc30242ac1100
> 02/payment-endpoint
> > > > success.
> > > >
> > > > Is there any thing that I'm missing?
> > > >
> > > > Willem Jiang
> > > >
> > > > Twitter: willemjiang
> > > > Weibo: 姜宁willem
> > > >
> > > > On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <
> willem.jiang@gmail.com>
> > > > wrote:
> > > >
> > > >> It could handy for the user to write the test without starting the
> > > >> service-center,
> > > >> we could add it into  the section of best practice of writing a uni
> > > test.
> > > >>
> > > >>
> > > >> Willem Jiang
> > > >>
> > > >> Twitter: willemjiang
> > > >> Weibo: 姜宁willem
> > > >>
> > > >> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
> > > >>
> > > >>> LocalRegistry for java-chassis is created only for test purpose and
> > not
> > > >>> intended for product  use. Is there many scenarios need this? Or we
> > > need to
> > > >>> reorganize its code to meet product use.
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>> ------------------ 原始邮件 ------------------
> > > >>> 发件人: "willem.jiang"<wi...@gmail.com>;
> > > >>> 发送时间: 2018年7月25日(星期三) 下午2:22
> > > >>> 收件人: "dev"<de...@servicecomb.apache.org>;
> > > >>>
> > > >>> 主题: Re: Cannot find the instance in ServiceComb Discovery
> > > >>>
> > > >>>
> > > >>>
> > > >>> Hi, jimin,
> > > >>>
> > > >>> Changed the System property fix the issue, but it looks like we
> have
> > > some
> > > >>> undocument information need to updated.
> > > >>>
> > > >>>
> > > >>>
> > > >>> Willem Jiang
> > > >>>
> > > >>> Twitter: willemjiang
> > > >>> Weibo: 姜宁willem
> > > >>>
> > > >>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com>
> wrote:
> > > >>>
> > > >>> > you write a local registry.yaml, but missed some important data
> > > >>> > a easy way to fix: do not write the registry.yaml
> > > >>> > because you test case is self invoke self, ServiceComb engine can
> > > >>> generate
> > > >>> > informations dynamiclly
> > > >>> >
> > > >>> > change: org.apache.servicecomb.saga.discovery.service.center.
> > > >>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
> > > >>> >
> > > >>> > private static void setUpLocalRegistry() {
> > > >>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustFor
> > > >>> ceLocal");
> > > >>> > }
> > > >>> >
> > > >>> >
> > > >>> >
> > > >>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <willem.jiang@gmail.com
> >:
> > > >>> >
> > > >>> > > Hi
> > > >>> > >
> > > >>> > > When I recovery the old saga code in the SCB-692 branch[1] , I
> > got
> > > >>> the
> > > >>> > > error when running the ServiceCenterDiscoveryRestTransportTest
> > in
> > > >>> the
> > > >>> > > ServiceComb Discovery module.
> > > >>> > > It looks like the service provide already registered, but the
> > > Service
> > > >>> > Path
> > > >>> > > Manager cannot find the right instance. I tried to debug the
> > code,
> > > >>> but
> > > >>> > > there are some points those I missed.
> > > >>> > >
> > > >>> > > You can reproduce the error by checking out the saga code and
> > > switch
> > > >>> to
> > > >>> > > SCB-692 branch.
> > > >>> > >
> > > >>> > > [1]https://github.com/apache/incubator-servicecomb-saga/
> > > tree/SCB-692
> > > >>> > >
> > > >>> > > Willem Jiang
> > > >>> > >
> > > >>> > > Twitter: willemjiang
> > > >>> > > Weibo: 姜宁willem
> > > >>> > >
> > > >>> >
> > > >>>
> > > >>
> > > >>
> > > >
> > >
> >
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by Willem Jiang <wi...@gmail.com>.
I already updated them in the SCB-692 branch.
Please check the SCB-692 branch again for it.


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jul 25, 2018 at 8:28 PM, wjm wjm <zz...@gmail.com> wrote:

> 1.saga-spring project, some classes import io.servicecomb packages, should
> update to org.apache.servicecomb
> 2.org.apache.servicecomb.saga.spring.SagaServiceDiscoveryTest#
> setUpLocalRegistry
> has the same registry declare problem
>
> 2018-07-25 17:02 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>
> > FYI,  you can find full log file here[1]
> >
> > [1]https://api.travis-ci.org/v3/job/407953904/log.txt
> >
> >
> > Willem Jiang
> >
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> > On Wed, Jul 25, 2018 at 4:09 PM, Willem Jiang <wi...@gmail.com>
> > wrote:
> >
> > > It looks like there is still some thing wrong when using the
> > > service-center to discover the published services when running the
> > > integration test of dependency-free-transaction-demo: demo-tests.
> > > You can reproduce the error by checking out the SCB-692 and running the
> > > test from saga-demo/dependency-free-transaction-demo/demo-tests
> > >
> > > saga> 07:27:11.094 [saga-pool-thread-3] INFO
> > org.apache.servicecomb.saga.core.LoggingRecoveryPolicy
> > > - Starting request id=request-hotel for service
> hotel-reservation-service
> > > saga> 07:27:11.136 [saga-pool-thread-2] INFO  org.apache.servicecomb.
> > > serviceregistry.consumer.MicroserviceVersions - create
> > > MicroserviceVersions, appId=saga, microserviceName=car-rental-service.
> > > saga> 07:27:11.137 [saga-pool-thread-4] INFO  org.apache.servicecomb.
> > > serviceregistry.consumer.MicroserviceVersions - create
> > > MicroserviceVersions, appId=saga, microserviceName=flight-
> > booking-service.
> > > saga> 07:27:11.137 [saga-pool-thread-3] INFO  org.apache.servicecomb.
> > > serviceregistry.consumer.MicroserviceVersions - create
> > > MicroserviceVersions, appId=saga, microserviceName=hotel-
> > > reservation-service.
> > > service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
> > > service/instance.go:538 find instance failed, provider not exist,
> > consumer
> > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > saga/flight-booking-service/0.0.0+
> > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > service/instance.go:538 find instance failed, provider not exist,
> > consumer
> > > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > > saga/car-rental-service/0.0.0+
> > > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > > service/instance.go:538 find instance failed, provider not exist,
> > consumer
> > > 2342a4c78fdc11e8a80c0242ac110002 find provider saga/hotel-reservation-
> > > service/0.0.0+
> > > saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
> > > org.apache.servicecomb.serviceregistry.client.http.
> > ServiceRegistryClientImpl
> > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > exist","detail":"provider not exist, consumer
> > 2342a4c78fdc11e8a80c0242ac110002
> > > find provider saga/flight-booking-service/0.0.0+"}
> > > saga>
> > > saga> 07:27:11.151 [saga-pool-thread-4] ERROR org.apache.servicecomb.
> > > serviceregistry.registry.AbstractServiceRegistry - Can not find any
> > > instances from service center due to previous errors.
> > > service=saga/flight-booking-service/0.0.0+
> > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > org.apache.servicecomb.serviceregistry.client.http.
> > ServiceRegistryClientImpl
> > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > exist","detail":"provider not exist, consumer
> > 2342a4c78fdc11e8a80c0242ac110002
> > > find provider saga/car-rental-service/0.0.0+"}
> > > saga>
> > > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > > org.apache.servicecomb.serviceregistry.client.http.
> > ServiceRegistryClientImpl
> > > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > > exist","detail":"provider not exist, consumer
> > 2342a4c78fdc11e8a80c0242ac110002
> > > find provider saga/hotel-reservation-service/0.0.0+"}
> > >
> > > Just checked the saga instance log, there are some WARN message,
> > >
> > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> foundation.vertx.
> > VertxTLSBuilder
> > > - keyStore [server.p12] file not exist, please check!
> > > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.
> foundation.vertx.
> > VertxTLSBuilder
> > > - trustStore [trust.jks] file not exist, please check!
> > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> foundation.vertx.
> > VertxTLSBuilder
> > > - keyStore [server.p12] file not exist, please check!
> > > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.
> foundation.vertx.
> > VertxTLSBuilder
> > > - trustStore [trust.jks] file not exist, please check!
> > > saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
> > > org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
> > > saga> io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS
> > > engine
> > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > SSLHelper.java:90)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > HttpClientImpl.java:131)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> > java:296)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:36)
> > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:27)
> > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > ClientPoolManager.
> > > createClientPool(ClientPoolManager.java:60)
> ~[foundation-vertx-1.0.0-m2.
> > > jar!/:1.0.0-m2]
> > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > ClientVerticle.start(ClientVerticle.java:35)
> > ~[foundation-vertx-1.0.0-m2.
> > > jar!/:1.0.0-m2]
> > > saga> at io.vertx.core.AbstractVerticle.start(
> AbstractVerticle.java:111)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > doDeploy$10(DeploymentManager.java:481) ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > ContextImpl.java:344)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
> > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > jar!/:4.1.24.Final]
> > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> runAllTasks(
> > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > jar!/:4.1.24.Final]
> > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
> > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.24.Final.
> > > jar!/:4.1.24.Final]
> > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > jar!/:4.1.24.Final]
> > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > > saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
> > > org.apache.servicecomb.foundation.vertx.VertxUtils - deploy vertx
> > failed,
> > > cause
> > > saga> io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS
> > > engine
> > > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> > SSLHelper.java:90)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> > HttpClientImpl.java:131)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> > java:296)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:36)
> > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:27)
> > > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > ClientPoolManager.
> > > createClientPool(ClientPoolManager.java:60)
> ~[foundation-vertx-1.0.0-m2.
> > > jar!/:1.0.0-m2]
> > > saga> at org.apache.servicecomb.foundation.vertx.client.
> > > ClientVerticle.start(ClientVerticle.java:35)
> > ~[foundation-vertx-1.0.0-m2.
> > > jar!/:1.0.0-m2]
> > > saga> at io.vertx.core.AbstractVerticle.start(
> AbstractVerticle.java:111)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > > doDeploy$10(DeploymentManager.java:481) ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> > ContextImpl.java:344)
> > > ~[vertx-core-3.5.0.jar!/:?]
> > > saga> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
> > > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > > jar!/:4.1.24.Final]
> > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.
> runAllTasks(
> > > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > > jar!/:4.1.24.Final]
> > > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
> > > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > > run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.24.Final.
> > > jar!/:4.1.24.Final]
> > > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > > jar!/:4.1.24.Final]
> > > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > >
> > >
> > > But it looks like the service is registered rightly.
> > >
> > > service-center> 2018-07-25 08:00:43.056 +00:00 INFO
> > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 18,
> > > succeed: true}, watch prefix /cse-sr/ms/indexes/, start rev 15+1,
> > > service-center> 2018-07-25 08:00:43.060 +00:00 INFO
> > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 18,
> > > succeed: true}, watch prefix /cse-sr/ms/alias/, start rev 3+1,
> > > payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
> > > o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
> > > successfully. id=[d435f3f78fe011e89bc30242ac110002]
> > > appId=[saga-crossapp], name=[payment-service], version=[0.0.1],
> > > schemaIds=[payment-endpoint], env=[]
> > > payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
> > > o.a.s.s.task.MicroserviceRegisterTask    : schemaId [payment-endpoint]
> > > exists [true], summary exists [false]
> > > service-center> 2018-07-25 08:00:43.064 +00:00 ERROR
> service/schema.go:69
> > > get schema failed, serviceId d435f3f78fe011e89bc30242ac110002,
> schemaId
> > > payment-endpoint: schema not exists.
> > > payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0]
> > o.a.s.s.c.h.ServiceRegistryClientImpl
> > >   : get response for org.apache.servicecomb.
> > serviceregistry.api.response.GetSchemaResponse
> > > failed, 400:Bad Request, {"errorCode":"400016","errorMessage":"Schema
> > > does not exist","detail":"Do not have this schema info."}
> > > payment>
> > > service-center> 2018-07-25 08:00:43.086 +00:00 INFO
> service/schema.go:564
> > > start to modify schema, serviceId  d435f3f78fe011e89bc30242ac110002,
> > > schemaId payment-endpoint
> > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> service/schema.go:518
> > > modify schema successfully: serviceId d435f3f78fe011e89bc30242ac1100
> 02,
> > > schemaId payment-endpoint.
> > > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 19,
> > > succeed: true}, watch prefix /cse-sr/ms/schema-sum/, start rev 16+1,
> > > payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main]
> > o.a.s.s.c.h.ServiceRegistryClientImpl
> > >   : register schema d435f3f78fe011e89bc30242ac110002/payment-endpoint
> > > success.
> > >
> > > Is there any thing that I'm missing?
> > >
> > > Willem Jiang
> > >
> > > Twitter: willemjiang
> > > Weibo: 姜宁willem
> > >
> > > On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <wi...@gmail.com>
> > > wrote:
> > >
> > >> It could handy for the user to write the test without starting the
> > >> service-center,
> > >> we could add it into  the section of best practice of writing a uni
> > test.
> > >>
> > >>
> > >> Willem Jiang
> > >>
> > >> Twitter: willemjiang
> > >> Weibo: 姜宁willem
> > >>
> > >> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
> > >>
> > >>> LocalRegistry for java-chassis is created only for test purpose and
> not
> > >>> intended for product  use. Is there many scenarios need this? Or we
> > need to
> > >>> reorganize its code to meet product use.
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> ------------------ 原始邮件 ------------------
> > >>> 发件人: "willem.jiang"<wi...@gmail.com>;
> > >>> 发送时间: 2018年7月25日(星期三) 下午2:22
> > >>> 收件人: "dev"<de...@servicecomb.apache.org>;
> > >>>
> > >>> 主题: Re: Cannot find the instance in ServiceComb Discovery
> > >>>
> > >>>
> > >>>
> > >>> Hi, jimin,
> > >>>
> > >>> Changed the System property fix the issue, but it looks like we have
> > some
> > >>> undocument information need to updated.
> > >>>
> > >>>
> > >>>
> > >>> Willem Jiang
> > >>>
> > >>> Twitter: willemjiang
> > >>> Weibo: 姜宁willem
> > >>>
> > >>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com> wrote:
> > >>>
> > >>> > you write a local registry.yaml, but missed some important data
> > >>> > a easy way to fix: do not write the registry.yaml
> > >>> > because you test case is self invoke self, ServiceComb engine can
> > >>> generate
> > >>> > informations dynamiclly
> > >>> >
> > >>> > change: org.apache.servicecomb.saga.discovery.service.center.
> > >>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
> > >>> >
> > >>> > private static void setUpLocalRegistry() {
> > >>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustFor
> > >>> ceLocal");
> > >>> > }
> > >>> >
> > >>> >
> > >>> >
> > >>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> > >>> >
> > >>> > > Hi
> > >>> > >
> > >>> > > When I recovery the old saga code in the SCB-692 branch[1] , I
> got
> > >>> the
> > >>> > > error when running the ServiceCenterDiscoveryRestTransportTest
> in
> > >>> the
> > >>> > > ServiceComb Discovery module.
> > >>> > > It looks like the service provide already registered, but the
> > Service
> > >>> > Path
> > >>> > > Manager cannot find the right instance. I tried to debug the
> code,
> > >>> but
> > >>> > > there are some points those I missed.
> > >>> > >
> > >>> > > You can reproduce the error by checking out the saga code and
> > switch
> > >>> to
> > >>> > > SCB-692 branch.
> > >>> > >
> > >>> > > [1]https://github.com/apache/incubator-servicecomb-saga/
> > tree/SCB-692
> > >>> > >
> > >>> > > Willem Jiang
> > >>> > >
> > >>> > > Twitter: willemjiang
> > >>> > > Weibo: 姜宁willem
> > >>> > >
> > >>> >
> > >>>
> > >>
> > >>
> > >
> >
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by wjm wjm <zz...@gmail.com>.
1.saga-spring project, some classes import io.servicecomb packages, should
update to org.apache.servicecomb
2.org.apache.servicecomb.saga.spring.SagaServiceDiscoveryTest#setUpLocalRegistry
has the same registry declare problem

2018-07-25 17:02 GMT+08:00 Willem Jiang <wi...@gmail.com>:

> FYI,  you can find full log file here[1]
>
> [1]https://api.travis-ci.org/v3/job/407953904/log.txt
>
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Wed, Jul 25, 2018 at 4:09 PM, Willem Jiang <wi...@gmail.com>
> wrote:
>
> > It looks like there is still some thing wrong when using the
> > service-center to discover the published services when running the
> > integration test of dependency-free-transaction-demo: demo-tests.
> > You can reproduce the error by checking out the SCB-692 and running the
> > test from saga-demo/dependency-free-transaction-demo/demo-tests
> >
> > saga> 07:27:11.094 [saga-pool-thread-3] INFO
> org.apache.servicecomb.saga.core.LoggingRecoveryPolicy
> > - Starting request id=request-hotel for service hotel-reservation-service
> > saga> 07:27:11.136 [saga-pool-thread-2] INFO  org.apache.servicecomb.
> > serviceregistry.consumer.MicroserviceVersions - create
> > MicroserviceVersions, appId=saga, microserviceName=car-rental-service.
> > saga> 07:27:11.137 [saga-pool-thread-4] INFO  org.apache.servicecomb.
> > serviceregistry.consumer.MicroserviceVersions - create
> > MicroserviceVersions, appId=saga, microserviceName=flight-
> booking-service.
> > saga> 07:27:11.137 [saga-pool-thread-3] INFO  org.apache.servicecomb.
> > serviceregistry.consumer.MicroserviceVersions - create
> > MicroserviceVersions, appId=saga, microserviceName=hotel-
> > reservation-service.
> > service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
> > service/instance.go:538 find instance failed, provider not exist,
> consumer
> > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > saga/flight-booking-service/0.0.0+
> > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > service/instance.go:538 find instance failed, provider not exist,
> consumer
> > 2342a4c78fdc11e8a80c0242ac110002 find provider
> > saga/car-rental-service/0.0.0+
> > service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> > service/instance.go:538 find instance failed, provider not exist,
> consumer
> > 2342a4c78fdc11e8a80c0242ac110002 find provider saga/hotel-reservation-
> > service/0.0.0+
> > saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
> > org.apache.servicecomb.serviceregistry.client.http.
> ServiceRegistryClientImpl
> > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > exist","detail":"provider not exist, consumer
> 2342a4c78fdc11e8a80c0242ac110002
> > find provider saga/flight-booking-service/0.0.0+"}
> > saga>
> > saga> 07:27:11.151 [saga-pool-thread-4] ERROR org.apache.servicecomb.
> > serviceregistry.registry.AbstractServiceRegistry - Can not find any
> > instances from service center due to previous errors.
> > service=saga/flight-booking-service/0.0.0+
> > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > org.apache.servicecomb.serviceregistry.client.http.
> ServiceRegistryClientImpl
> > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > exist","detail":"provider not exist, consumer
> 2342a4c78fdc11e8a80c0242ac110002
> > find provider saga/car-rental-service/0.0.0+"}
> > saga>
> > saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> > org.apache.servicecomb.serviceregistry.client.http.
> ServiceRegistryClientImpl
> > - {"errorCode":"400012","errorMessage":"Micro-service does not
> > exist","detail":"provider not exist, consumer
> 2342a4c78fdc11e8a80c0242ac110002
> > find provider saga/hotel-reservation-service/0.0.0+"}
> >
> > Just checked the saga instance log, there are some WARN message,
> >
> > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.foundation.vertx.
> VertxTLSBuilder
> > - keyStore [server.p12] file not exist, please check!
> > saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.foundation.vertx.
> VertxTLSBuilder
> > - trustStore [trust.jks] file not exist, please check!
> > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.foundation.vertx.
> VertxTLSBuilder
> > - keyStore [server.p12] file not exist, please check!
> > saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.foundation.vertx.
> VertxTLSBuilder
> > - trustStore [trust.jks] file not exist, please check!
> > saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
> > org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
> > saga> io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS
> > engine
> > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> SSLHelper.java:90)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> HttpClientImpl.java:131)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> java:296)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:36)
> > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:27)
> > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > saga> at org.apache.servicecomb.foundation.vertx.client.
> ClientPoolManager.
> > createClientPool(ClientPoolManager.java:60) ~[foundation-vertx-1.0.0-m2.
> > jar!/:1.0.0-m2]
> > saga> at org.apache.servicecomb.foundation.vertx.client.
> > ClientVerticle.start(ClientVerticle.java:35)
> ~[foundation-vertx-1.0.0-m2.
> > jar!/:1.0.0-m2]
> > saga> at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:111)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > doDeploy$10(DeploymentManager.java:481) ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> ContextImpl.java:344)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
> > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > jar!/:4.1.24.Final]
> > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(
> > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > jar!/:4.1.24.Final]
> > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
> > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.24.Final.
> > jar!/:4.1.24.Final]
> > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > jar!/:4.1.24.Final]
> > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> > saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
> > org.apache.servicecomb.foundation.vertx.VertxUtils - deploy vertx
> failed,
> > cause
> > saga> io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS
> > engine
> > saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(
> SSLHelper.java:90)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(
> HttpClientImpl.java:131)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.
> java:296)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:36)
> > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > saga> at org.apache.servicecomb.foundation.vertx.client.http.
> > HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:27)
> > ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> > saga> at org.apache.servicecomb.foundation.vertx.client.
> ClientPoolManager.
> > createClientPool(ClientPoolManager.java:60) ~[foundation-vertx-1.0.0-m2.
> > jar!/:1.0.0-m2]
> > saga> at org.apache.servicecomb.foundation.vertx.client.
> > ClientVerticle.start(ClientVerticle.java:35)
> ~[foundation-vertx-1.0.0-m2.
> > jar!/:1.0.0-m2]
> > saga> at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:111)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.vertx.core.impl.DeploymentManager.lambda$
> > doDeploy$10(DeploymentManager.java:481) ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(
> ContextImpl.java:344)
> > ~[vertx-core-3.5.0.jar!/:?]
> > saga> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
> > AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> > jar!/:4.1.24.Final]
> > saga> at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(
> > SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> > jar!/:4.1.24.Final]
> > saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
> > ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> > saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> > run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.24.Final.
> > jar!/:4.1.24.Final]
> > saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> > FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> > jar!/:4.1.24.Final]
> > saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> >
> >
> > But it looks like the service is registered rightly.
> >
> > service-center> 2018-07-25 08:00:43.056 +00:00 INFO
> > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 18,
> > succeed: true}, watch prefix /cse-sr/ms/indexes/, start rev 15+1,
> > service-center> 2018-07-25 08:00:43.060 +00:00 INFO
> > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 18,
> > succeed: true}, watch prefix /cse-sr/ms/alias/, start rev 3+1,
> > payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
> > o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
> > successfully. id=[d435f3f78fe011e89bc30242ac110002]
> > appId=[saga-crossapp], name=[payment-service], version=[0.0.1],
> > schemaIds=[payment-endpoint], env=[]
> > payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
> > o.a.s.s.task.MicroserviceRegisterTask    : schemaId [payment-endpoint]
> > exists [true], summary exists [false]
> > service-center> 2018-07-25 08:00:43.064 +00:00 ERROR service/schema.go:69
> > get schema failed, serviceId d435f3f78fe011e89bc30242ac110002, schemaId
> > payment-endpoint: schema not exists.
> > payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0]
> o.a.s.s.c.h.ServiceRegistryClientImpl
> >   : get response for org.apache.servicecomb.
> serviceregistry.api.response.GetSchemaResponse
> > failed, 400:Bad Request, {"errorCode":"400016","errorMessage":"Schema
> > does not exist","detail":"Do not have this schema info."}
> > payment>
> > service-center> 2018-07-25 08:00:43.086 +00:00 INFO service/schema.go:564
> > start to modify schema, serviceId  d435f3f78fe011e89bc30242ac110002,
> > schemaId payment-endpoint
> > service-center> 2018-07-25 08:00:43.089 +00:00 INFO service/schema.go:518
> > modify schema successfully: serviceId d435f3f78fe011e89bc30242ac110002,
> > schemaId payment-endpoint.
> > service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> > backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 19,
> > succeed: true}, watch prefix /cse-sr/ms/schema-sum/, start rev 16+1,
> > payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main]
> o.a.s.s.c.h.ServiceRegistryClientImpl
> >   : register schema d435f3f78fe011e89bc30242ac110002/payment-endpoint
> > success.
> >
> > Is there any thing that I'm missing?
> >
> > Willem Jiang
> >
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> > On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <wi...@gmail.com>
> > wrote:
> >
> >> It could handy for the user to write the test without starting the
> >> service-center,
> >> we could add it into  the section of best practice of writing a uni
> test.
> >>
> >>
> >> Willem Jiang
> >>
> >> Twitter: willemjiang
> >> Weibo: 姜宁willem
> >>
> >> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
> >>
> >>> LocalRegistry for java-chassis is created only for test purpose and not
> >>> intended for product  use. Is there many scenarios need this? Or we
> need to
> >>> reorganize its code to meet product use.
> >>>
> >>>
> >>>
> >>>
> >>> ------------------ 原始邮件 ------------------
> >>> 发件人: "willem.jiang"<wi...@gmail.com>;
> >>> 发送时间: 2018年7月25日(星期三) 下午2:22
> >>> 收件人: "dev"<de...@servicecomb.apache.org>;
> >>>
> >>> 主题: Re: Cannot find the instance in ServiceComb Discovery
> >>>
> >>>
> >>>
> >>> Hi, jimin,
> >>>
> >>> Changed the System property fix the issue, but it looks like we have
> some
> >>> undocument information need to updated.
> >>>
> >>>
> >>>
> >>> Willem Jiang
> >>>
> >>> Twitter: willemjiang
> >>> Weibo: 姜宁willem
> >>>
> >>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com> wrote:
> >>>
> >>> > you write a local registry.yaml, but missed some important data
> >>> > a easy way to fix: do not write the registry.yaml
> >>> > because you test case is self invoke self, ServiceComb engine can
> >>> generate
> >>> > informations dynamiclly
> >>> >
> >>> > change: org.apache.servicecomb.saga.discovery.service.center.
> >>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
> >>> >
> >>> > private static void setUpLocalRegistry() {
> >>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustFor
> >>> ceLocal");
> >>> > }
> >>> >
> >>> >
> >>> >
> >>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> >>> >
> >>> > > Hi
> >>> > >
> >>> > > When I recovery the old saga code in the SCB-692 branch[1] , I got
> >>> the
> >>> > > error when running the ServiceCenterDiscoveryRestTransportTest in
> >>> the
> >>> > > ServiceComb Discovery module.
> >>> > > It looks like the service provide already registered, but the
> Service
> >>> > Path
> >>> > > Manager cannot find the right instance. I tried to debug the code,
> >>> but
> >>> > > there are some points those I missed.
> >>> > >
> >>> > > You can reproduce the error by checking out the saga code and
> switch
> >>> to
> >>> > > SCB-692 branch.
> >>> > >
> >>> > > [1]https://github.com/apache/incubator-servicecomb-saga/
> tree/SCB-692
> >>> > >
> >>> > > Willem Jiang
> >>> > >
> >>> > > Twitter: willemjiang
> >>> > > Weibo: 姜宁willem
> >>> > >
> >>> >
> >>>
> >>
> >>
> >
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by Willem Jiang <wi...@gmail.com>.
FYI,  you can find full log file here[1]

[1]https://api.travis-ci.org/v3/job/407953904/log.txt


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jul 25, 2018 at 4:09 PM, Willem Jiang <wi...@gmail.com>
wrote:

> It looks like there is still some thing wrong when using the
> service-center to discover the published services when running the
> integration test of dependency-free-transaction-demo: demo-tests.
> You can reproduce the error by checking out the SCB-692 and running the
> test from saga-demo/dependency-free-transaction-demo/demo-tests
>
> saga> 07:27:11.094 [saga-pool-thread-3] INFO  org.apache.servicecomb.saga.core.LoggingRecoveryPolicy
> - Starting request id=request-hotel for service hotel-reservation-service
> saga> 07:27:11.136 [saga-pool-thread-2] INFO  org.apache.servicecomb.
> serviceregistry.consumer.MicroserviceVersions - create
> MicroserviceVersions, appId=saga, microserviceName=car-rental-service.
> saga> 07:27:11.137 [saga-pool-thread-4] INFO  org.apache.servicecomb.
> serviceregistry.consumer.MicroserviceVersions - create
> MicroserviceVersions, appId=saga, microserviceName=flight-booking-service.
> saga> 07:27:11.137 [saga-pool-thread-3] INFO  org.apache.servicecomb.
> serviceregistry.consumer.MicroserviceVersions - create
> MicroserviceVersions, appId=saga, microserviceName=hotel-
> reservation-service.
> service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
> service/instance.go:538 find instance failed, provider not exist, consumer
> 2342a4c78fdc11e8a80c0242ac110002 find provider
> saga/flight-booking-service/0.0.0+
> service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> service/instance.go:538 find instance failed, provider not exist, consumer
> 2342a4c78fdc11e8a80c0242ac110002 find provider
> saga/car-rental-service/0.0.0+
> service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
> service/instance.go:538 find instance failed, provider not exist, consumer
> 2342a4c78fdc11e8a80c0242ac110002 find provider saga/hotel-reservation-
> service/0.0.0+
> saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl
> - {"errorCode":"400012","errorMessage":"Micro-service does not
> exist","detail":"provider not exist, consumer 2342a4c78fdc11e8a80c0242ac110002
> find provider saga/flight-booking-service/0.0.0+"}
> saga>
> saga> 07:27:11.151 [saga-pool-thread-4] ERROR org.apache.servicecomb.
> serviceregistry.registry.AbstractServiceRegistry - Can not find any
> instances from service center due to previous errors.
> service=saga/flight-booking-service/0.0.0+
> saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl
> - {"errorCode":"400012","errorMessage":"Micro-service does not
> exist","detail":"provider not exist, consumer 2342a4c78fdc11e8a80c0242ac110002
> find provider saga/car-rental-service/0.0.0+"}
> saga>
> saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
> org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl
> - {"errorCode":"400012","errorMessage":"Micro-service does not
> exist","detail":"provider not exist, consumer 2342a4c78fdc11e8a80c0242ac110002
> find provider saga/hotel-reservation-service/0.0.0+"}
>
> Just checked the saga instance log, there are some WARN message,
>
> saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.foundation.vertx.VertxTLSBuilder
> - keyStore [server.p12] file not exist, please check!
> saga> 07:42:55.327 [main] WARN  org.apache.servicecomb.foundation.vertx.VertxTLSBuilder
> - trustStore [trust.jks] file not exist, please check!
> saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.foundation.vertx.VertxTLSBuilder
> - keyStore [server.p12] file not exist, please check!
> saga> 07:42:55.345 [main] WARN  org.apache.servicecomb.foundation.vertx.VertxTLSBuilder
> - trustStore [trust.jks] file not exist, please check!
> saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
> org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
> saga> io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS
> engine
> saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(SSLHelper.java:90)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(HttpClientImpl.java:131)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.java:296)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at org.apache.servicecomb.foundation.vertx.client.http.
> HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:36)
> ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> saga> at org.apache.servicecomb.foundation.vertx.client.http.
> HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:27)
> ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> saga> at org.apache.servicecomb.foundation.vertx.client.ClientPoolManager.
> createClientPool(ClientPoolManager.java:60) ~[foundation-vertx-1.0.0-m2.
> jar!/:1.0.0-m2]
> saga> at org.apache.servicecomb.foundation.vertx.client.
> ClientVerticle.start(ClientVerticle.java:35) ~[foundation-vertx-1.0.0-m2.
> jar!/:1.0.0-m2]
> saga> at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:111)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.vertx.core.impl.DeploymentManager.lambda$
> doDeploy$10(DeploymentManager.java:481) ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:344)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
> AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> jar!/:4.1.24.Final]
> saga> at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(
> SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> jar!/:4.1.24.Final]
> saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
> ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.24.Final.
> jar!/:4.1.24.Final]
> saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> jar!/:4.1.24.Final]
> saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
> saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
> org.apache.servicecomb.foundation.vertx.VertxUtils - deploy vertx failed,
> cause
> saga> io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS
> engine
> saga> at io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(SSLHelper.java:90)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.vertx.core.http.impl.HttpClientImpl.<init>(HttpClientImpl.java:131)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.java:296)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at org.apache.servicecomb.foundation.vertx.client.http.
> HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:36)
> ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> saga> at org.apache.servicecomb.foundation.vertx.client.http.
> HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:27)
> ~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
> saga> at org.apache.servicecomb.foundation.vertx.client.ClientPoolManager.
> createClientPool(ClientPoolManager.java:60) ~[foundation-vertx-1.0.0-m2.
> jar!/:1.0.0-m2]
> saga> at org.apache.servicecomb.foundation.vertx.client.
> ClientVerticle.start(ClientVerticle.java:35) ~[foundation-vertx-1.0.0-m2.
> jar!/:1.0.0-m2]
> saga> at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:111)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.vertx.core.impl.DeploymentManager.lambda$
> doDeploy$10(DeploymentManager.java:481) ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:344)
> ~[vertx-core-3.5.0.jar!/:?]
> saga> at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(
> AbstractEventExecutor.java:163) ~[netty-common-4.1.24.Final.
> jar!/:4.1.24.Final]
> saga> at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(
> SingleThreadEventExecutor.java:404) ~[netty-common-4.1.24.Final.
> jar!/:4.1.24.Final]
> saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
> ~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
> saga> at io.netty.util.concurrent.SingleThreadEventExecutor$5.
> run(SingleThreadEventExecutor.java:884) ~[netty-common-4.1.24.Final.
> jar!/:4.1.24.Final]
> saga> at io.netty.util.concurrent.FastThreadLocalRunnable.run(
> FastThreadLocalRunnable.java:30) ~[netty-common-4.1.24.Final.
> jar!/:4.1.24.Final]
> saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
>
>
> But it looks like the service is registered rightly.
>
> service-center> 2018-07-25 08:00:43.056 +00:00 INFO
> backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 18,
> succeed: true}, watch prefix /cse-sr/ms/indexes/, start rev 15+1,
> service-center> 2018-07-25 08:00:43.060 +00:00 INFO
> backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 18,
> succeed: true}, watch prefix /cse-sr/ms/alias/, start rev 3+1,
> payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
> o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
> successfully. id=[d435f3f78fe011e89bc30242ac110002]
> appId=[saga-crossapp], name=[payment-service], version=[0.0.1],
> schemaIds=[payment-endpoint], env=[]
> payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
> o.a.s.s.task.MicroserviceRegisterTask    : schemaId [payment-endpoint]
> exists [true], summary exists [false]
> service-center> 2018-07-25 08:00:43.064 +00:00 ERROR service/schema.go:69
> get schema failed, serviceId d435f3f78fe011e89bc30242ac110002, schemaId
> payment-endpoint: schema not exists.
> payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0] o.a.s.s.c.h.ServiceRegistryClientImpl
>   : get response for org.apache.servicecomb.serviceregistry.api.response.GetSchemaResponse
> failed, 400:Bad Request, {"errorCode":"400016","errorMessage":"Schema
> does not exist","detail":"Do not have this schema info."}
> payment>
> service-center> 2018-07-25 08:00:43.086 +00:00 INFO service/schema.go:564
> start to modify schema, serviceId  d435f3f78fe011e89bc30242ac110002,
> schemaId payment-endpoint
> service-center> 2018-07-25 08:00:43.089 +00:00 INFO service/schema.go:518
> modify schema successfully: serviceId d435f3f78fe011e89bc30242ac110002,
> schemaId payment-endpoint.
> service-center> 2018-07-25 08:00:43.089 +00:00 INFO
> backend/listwatch.go:74 caught event {action: PUT, count: 1/1, rev: 19,
> succeed: true}, watch prefix /cse-sr/ms/schema-sum/, start rev 16+1,
> payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main] o.a.s.s.c.h.ServiceRegistryClientImpl
>   : register schema d435f3f78fe011e89bc30242ac110002/payment-endpoint
> success.
>
> Is there any thing that I'm missing?
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <wi...@gmail.com>
> wrote:
>
>> It could handy for the user to write the test without starting the
>> service-center,
>> we could add it into  the section of best practice of writing a uni test.
>>
>>
>> Willem Jiang
>>
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
>>
>>> LocalRegistry for java-chassis is created only for test purpose and not
>>> intended for product  use. Is there many scenarios need this? Or we need to
>>> reorganize its code to meet product use.
>>>
>>>
>>>
>>>
>>> ------------------ 原始邮件 ------------------
>>> 发件人: "willem.jiang"<wi...@gmail.com>;
>>> 发送时间: 2018年7月25日(星期三) 下午2:22
>>> 收件人: "dev"<de...@servicecomb.apache.org>;
>>>
>>> 主题: Re: Cannot find the instance in ServiceComb Discovery
>>>
>>>
>>>
>>> Hi, jimin,
>>>
>>> Changed the System property fix the issue, but it looks like we have some
>>> undocument information need to updated.
>>>
>>>
>>>
>>> Willem Jiang
>>>
>>> Twitter: willemjiang
>>> Weibo: 姜宁willem
>>>
>>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com> wrote:
>>>
>>> > you write a local registry.yaml, but missed some important data
>>> > a easy way to fix: do not write the registry.yaml
>>> > because you test case is self invoke self, ServiceComb engine can
>>> generate
>>> > informations dynamiclly
>>> >
>>> > change: org.apache.servicecomb.saga.discovery.service.center.
>>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
>>> >
>>> > private static void setUpLocalRegistry() {
>>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustFor
>>> ceLocal");
>>> > }
>>> >
>>> >
>>> >
>>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>>> >
>>> > > Hi
>>> > >
>>> > > When I recovery the old saga code in the SCB-692 branch[1] , I got
>>> the
>>> > > error when running the ServiceCenterDiscoveryRestTransportTest in
>>> the
>>> > > ServiceComb Discovery module.
>>> > > It looks like the service provide already registered, but the Service
>>> > Path
>>> > > Manager cannot find the right instance. I tried to debug the code,
>>> but
>>> > > there are some points those I missed.
>>> > >
>>> > > You can reproduce the error by checking out the saga code and switch
>>> to
>>> > > SCB-692 branch.
>>> > >
>>> > > [1]https://github.com/apache/incubator-servicecomb-saga/tree/SCB-692
>>> > >
>>> > > Willem Jiang
>>> > >
>>> > > Twitter: willemjiang
>>> > > Weibo: 姜宁willem
>>> > >
>>> >
>>>
>>
>>
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by Willem Jiang <wi...@gmail.com>.
It looks like there is still some thing wrong when using the service-center
to discover the published services when running the integration test of
dependency-free-transaction-demo: demo-tests.
You can reproduce the error by checking out the SCB-692 and running the
test from saga-demo/dependency-free-transaction-demo/demo-tests

saga> 07:27:11.094 [saga-pool-thread-3] INFO
org.apache.servicecomb.saga.core.LoggingRecoveryPolicy - Starting request
id=request-hotel for service hotel-reservation-service
saga> 07:27:11.136 [saga-pool-thread-2] INFO
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions -
create MicroserviceVersions, appId=saga,
microserviceName=car-rental-service.
saga> 07:27:11.137 [saga-pool-thread-4] INFO
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions -
create MicroserviceVersions, appId=saga,
microserviceName=flight-booking-service.
saga> 07:27:11.137 [saga-pool-thread-3] INFO
org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersions -
create MicroserviceVersions, appId=saga,
microserviceName=hotel-reservation-service.
service-center> 2018-07-25 07:27:11.147 +00:00 ERROR
service/instance.go:538 find instance failed, provider not exist, consumer
2342a4c78fdc11e8a80c0242ac110002 find provider
saga/flight-booking-service/0.0.0+
service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
service/instance.go:538 find instance failed, provider not exist, consumer
2342a4c78fdc11e8a80c0242ac110002 find provider
saga/car-rental-service/0.0.0+
service-center> 2018-07-25 07:27:11.149 +00:00 ERROR
service/instance.go:538 find instance failed, provider not exist, consumer
2342a4c78fdc11e8a80c0242ac110002 find provider
saga/hotel-reservation-service/0.0.0+
saga> 07:27:11.151 [registry-vert.x-eventloop-thread-0] WARN
org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl
- {"errorCode":"400012","errorMessage":"Micro-service does not
exist","detail":"provider not exist, consumer
2342a4c78fdc11e8a80c0242ac110002 find provider
saga/flight-booking-service/0.0.0+"}
saga>
saga> 07:27:11.151 [saga-pool-thread-4] ERROR
org.apache.servicecomb.serviceregistry.registry.AbstractServiceRegistry -
Can not find any instances from service center due to previous errors.
service=saga/flight-booking-service/0.0.0+
saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl
- {"errorCode":"400012","errorMessage":"Micro-service does not
exist","detail":"provider not exist, consumer
2342a4c78fdc11e8a80c0242ac110002 find provider
saga/car-rental-service/0.0.0+"}
saga>
saga> 07:27:11.152 [registry-vert.x-eventloop-thread-0] WARN
org.apache.servicecomb.serviceregistry.client.http.ServiceRegistryClientImpl
- {"errorCode":"400012","errorMessage":"Micro-service does not
exist","detail":"provider not exist, consumer
2342a4c78fdc11e8a80c0242ac110002 find provider
saga/hotel-reservation-service/0.0.0+"}

Just checked the saga instance log, there are some WARN message,

saga> 07:42:55.327 [main] WARN
org.apache.servicecomb.foundation.vertx.VertxTLSBuilder - keyStore
[server.p12] file not exist, please check!
saga> 07:42:55.327 [main] WARN
org.apache.servicecomb.foundation.vertx.VertxTLSBuilder - trustStore
[trust.jks] file not exist, please check!
saga> 07:42:55.345 [main] WARN
org.apache.servicecomb.foundation.vertx.VertxTLSBuilder - keyStore
[server.p12] file not exist, please check!
saga> 07:42:55.345 [main] WARN
org.apache.servicecomb.foundation.vertx.VertxTLSBuilder - trustStore
[trust.jks] file not exist, please check!
saga> 07:42:55.396 [transport-vert.x-eventloop-thread-2] ERROR
org.apache.servicecomb.foundation.vertx.client.ClientVerticle -
saga> io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS
engine
saga> at
io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(SSLHelper.java:90)
~[vertx-core-3.5.0.jar!/:?]
saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
~[vertx-core-3.5.0.jar!/:?]
saga> at
io.vertx.core.http.impl.HttpClientImpl.<init>(HttpClientImpl.java:131)
~[vertx-core-3.5.0.jar!/:?]
saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.java:296)
~[vertx-core-3.5.0.jar!/:?]
saga> at
org.apache.servicecomb.foundation.vertx.client.http.HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:36)
~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
saga> at
org.apache.servicecomb.foundation.vertx.client.http.HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:27)
~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
saga> at
org.apache.servicecomb.foundation.vertx.client.ClientPoolManager.createClientPool(ClientPoolManager.java:60)
~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
saga> at
org.apache.servicecomb.foundation.vertx.client.ClientVerticle.start(ClientVerticle.java:35)
~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
saga> at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:111)
~[vertx-core-3.5.0.jar!/:?]
saga> at
io.vertx.core.impl.DeploymentManager.lambda$doDeploy$10(DeploymentManager.java:481)
~[vertx-core-3.5.0.jar!/:?]
saga> at
io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:344)
~[vertx-core-3.5.0.jar!/:?]
saga> at
io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
~[netty-common-4.1.24.Final.jar!/:4.1.24.Final]
saga> at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
~[netty-common-4.1.24.Final.jar!/:4.1.24.Final]
saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
saga> at
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
~[netty-common-4.1.24.Final.jar!/:4.1.24.Final]
saga> at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
~[netty-common-4.1.24.Final.jar!/:4.1.24.Final]
saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
saga> 07:42:55.407 [transport-vert.x-eventloop-thread-3] ERROR
org.apache.servicecomb.foundation.vertx.VertxUtils - deploy vertx failed,
cause
saga> io.vertx.core.VertxException: ALPN not available for JDK SSL/TLS
engine
saga> at
io.vertx.core.net.impl.SSLHelper.resolveEngineOptions(SSLHelper.java:90)
~[vertx-core-3.5.0.jar!/:?]
saga> at io.vertx.core.net.impl.SSLHelper.<init>(SSLHelper.java:151)
~[vertx-core-3.5.0.jar!/:?]
saga> at
io.vertx.core.http.impl.HttpClientImpl.<init>(HttpClientImpl.java:131)
~[vertx-core-3.5.0.jar!/:?]
saga> at io.vertx.core.impl.VertxImpl.createHttpClient(VertxImpl.java:296)
~[vertx-core-3.5.0.jar!/:?]
saga> at
org.apache.servicecomb.foundation.vertx.client.http.HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:36)
~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
saga> at
org.apache.servicecomb.foundation.vertx.client.http.HttpClientPoolFactory.createClientPool(HttpClientPoolFactory.java:27)
~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
saga> at
org.apache.servicecomb.foundation.vertx.client.ClientPoolManager.createClientPool(ClientPoolManager.java:60)
~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
saga> at
org.apache.servicecomb.foundation.vertx.client.ClientVerticle.start(ClientVerticle.java:35)
~[foundation-vertx-1.0.0-m2.jar!/:1.0.0-m2]
saga> at io.vertx.core.AbstractVerticle.start(AbstractVerticle.java:111)
~[vertx-core-3.5.0.jar!/:?]
saga> at
io.vertx.core.impl.DeploymentManager.lambda$doDeploy$10(DeploymentManager.java:481)
~[vertx-core-3.5.0.jar!/:?]
saga> at
io.vertx.core.impl.ContextImpl.lambda$wrapTask$2(ContextImpl.java:344)
~[vertx-core-3.5.0.jar!/:?]
saga> at
io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
~[netty-common-4.1.24.Final.jar!/:4.1.24.Final]
saga> at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
~[netty-common-4.1.24.Final.jar!/:4.1.24.Final]
saga> at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463)
~[netty-transport-4.1.24.Final.jar!/:4.1.24.Final]
saga> at
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
~[netty-common-4.1.24.Final.jar!/:4.1.24.Final]
saga> at
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
~[netty-common-4.1.24.Final.jar!/:4.1.24.Final]
saga> at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]


But it looks like the service is registered rightly.

service-center> 2018-07-25 08:00:43.056 +00:00 INFO backend/listwatch.go:74
caught event {action: PUT, count: 1/1, rev: 18, succeed: true}, watch
prefix /cse-sr/ms/indexes/, start rev 15+1,
service-center> 2018-07-25 08:00:43.060 +00:00 INFO backend/listwatch.go:74
caught event {action: PUT, count: 1/1, rev: 18, succeed: true}, watch
prefix /cse-sr/ms/alias/, start rev 3+1,
payment> 2018-07-25 08:00:43.058  INFO 7 --- [           main]
o.a.s.s.task.MicroserviceRegisterTask    : Registry Microservice
successfully. id=[d435f3f78fe011e89bc30242ac110002] appId=[saga-crossapp],
name=[payment-service], version=[0.0.1], schemaIds=[payment-endpoint],
env=[]
payment> 2018-07-25 08:00:43.063  INFO 7 --- [           main]
o.a.s.s.task.MicroserviceRegisterTask    : schemaId [payment-endpoint]
exists [true], summary exists [false]
service-center> 2018-07-25 08:00:43.064 +00:00 ERROR service/schema.go:69
get schema failed, serviceId d435f3f78fe011e89bc30242ac110002, schemaId
payment-endpoint: schema not exists.
payment> 2018-07-25 08:00:43.065  WARN 7 --- [ntloop-thread-0]
o.a.s.s.c.h.ServiceRegistryClientImpl    : get response for
org.apache.servicecomb.serviceregistry.api.response.GetSchemaResponse
failed, 400:Bad Request, {"errorCode":"400016","errorMessage":"Schema does
not exist","detail":"Do not have this schema info."}
payment>
service-center> 2018-07-25 08:00:43.086 +00:00 INFO service/schema.go:564
start to modify schema, serviceId  d435f3f78fe011e89bc30242ac110002,
schemaId payment-endpoint
service-center> 2018-07-25 08:00:43.089 +00:00 INFO service/schema.go:518
modify schema successfully: serviceId d435f3f78fe011e89bc30242ac110002,
schemaId payment-endpoint.
service-center> 2018-07-25 08:00:43.089 +00:00 INFO backend/listwatch.go:74
caught event {action: PUT, count: 1/1, rev: 19, succeed: true}, watch
prefix /cse-sr/ms/schema-sum/, start rev 16+1,
payment> 2018-07-25 08:00:43.090  INFO 7 --- [           main]
o.a.s.s.c.h.ServiceRegistryClientImpl    : register schema
d435f3f78fe011e89bc30242ac110002/payment-endpoint success.

Is there any thing that I'm missing?

Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jul 25, 2018 at 2:30 PM, Willem Jiang <wi...@gmail.com>
wrote:

> It could handy for the user to write the test without starting the
> service-center,
> we could add it into  the section of best practice of writing a uni test.
>
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
>
>> LocalRegistry for java-chassis is created only for test purpose and not
>> intended for product  use. Is there many scenarios need this? Or we need to
>> reorganize its code to meet product use.
>>
>>
>>
>>
>> ------------------ 原始邮件 ------------------
>> 发件人: "willem.jiang"<wi...@gmail.com>;
>> 发送时间: 2018年7月25日(星期三) 下午2:22
>> 收件人: "dev"<de...@servicecomb.apache.org>;
>>
>> 主题: Re: Cannot find the instance in ServiceComb Discovery
>>
>>
>>
>> Hi, jimin,
>>
>> Changed the System property fix the issue, but it looks like we have some
>> undocument information need to updated.
>>
>>
>>
>> Willem Jiang
>>
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com> wrote:
>>
>> > you write a local registry.yaml, but missed some important data
>> > a easy way to fix: do not write the registry.yaml
>> > because you test case is self invoke self, ServiceComb engine can
>> generate
>> > informations dynamiclly
>> >
>> > change: org.apache.servicecomb.saga.discovery.service.center.
>> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
>> >
>> > private static void setUpLocalRegistry() {
>> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustForceLocal");
>> > }
>> >
>> >
>> >
>> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>> >
>> > > Hi
>> > >
>> > > When I recovery the old saga code in the SCB-692 branch[1] , I got the
>> > > error when running the ServiceCenterDiscoveryRestTransportTest in the
>> > > ServiceComb Discovery module.
>> > > It looks like the service provide already registered, but the Service
>> > Path
>> > > Manager cannot find the right instance. I tried to debug the code, but
>> > > there are some points those I missed.
>> > >
>> > > You can reproduce the error by checking out the saga code and switch
>> to
>> > > SCB-692 branch.
>> > >
>> > > [1]https://github.com/apache/incubator-servicecomb-saga/tree/SCB-692
>> > >
>> > > Willem Jiang
>> > >
>> > > Twitter: willemjiang
>> > > Weibo: 姜宁willem
>> > >
>> >
>>
>
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by wjm wjm <zz...@gmail.com>.
document updated

2018-07-25 15:45 GMT+08:00 wjm wjm <zz...@gmail.com>:

> i'm updating the document.
>
> 2018-07-25 14:30 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>
>> It could handy for the user to write the test without starting the
>> service-center,
>> we could add it into  the section of best practice of writing a uni test.
>>
>>
>> Willem Jiang
>>
>> Twitter: willemjiang
>> Weibo: 姜宁willem
>>
>> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
>>
>> > LocalRegistry for java-chassis is created only for test purpose and not
>> > intended for product  use. Is there many scenarios need this? Or we
>> need to
>> > reorganize its code to meet product use.
>> >
>> >
>> >
>> >
>> > ------------------ 原始邮件 ------------------
>> > 发件人: "willem.jiang"<wi...@gmail.com>;
>> > 发送时间: 2018年7月25日(星期三) 下午2:22
>> > 收件人: "dev"<de...@servicecomb.apache.org>;
>> >
>> > 主题: Re: Cannot find the instance in ServiceComb Discovery
>> >
>> >
>> >
>> > Hi, jimin,
>> >
>> > Changed the System property fix the issue, but it looks like we have
>> some
>> > undocument information need to updated.
>> >
>> >
>> >
>> > Willem Jiang
>> >
>> > Twitter: willemjiang
>> > Weibo: 姜宁willem
>> >
>> > On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com> wrote:
>> >
>> > > you write a local registry.yaml, but missed some important data
>> > > a easy way to fix: do not write the registry.yaml
>> > > because you test case is self invoke self, ServiceComb engine can
>> > generate
>> > > informations dynamiclly
>> > >
>> > > change: org.apache.servicecomb.saga.discovery.service.center.
>> > > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
>> > >
>> > > private static void setUpLocalRegistry() {
>> > >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustFor
>> ceLocal");
>> > > }
>> > >
>> > >
>> > >
>> > > 2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>> > >
>> > > > Hi
>> > > >
>> > > > When I recovery the old saga code in the SCB-692 branch[1] , I got
>> the
>> > > > error when running the ServiceCenterDiscoveryRestTransportTest in
>> the
>> > > > ServiceComb Discovery module.
>> > > > It looks like the service provide already registered, but the
>> Service
>> > > Path
>> > > > Manager cannot find the right instance. I tried to debug the code,
>> but
>> > > > there are some points those I missed.
>> > > >
>> > > > You can reproduce the error by checking out the saga code and
>> switch to
>> > > > SCB-692 branch.
>> > > >
>> > > > [1]https://github.com/apache/incubator-servicecomb-saga/tree
>> /SCB-692
>> > > >
>> > > > Willem Jiang
>> > > >
>> > > > Twitter: willemjiang
>> > > > Weibo: 姜宁willem
>> > > >
>> > >
>> >
>>
>
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by wjm wjm <zz...@gmail.com>.
i'm updating the document.

2018-07-25 14:30 GMT+08:00 Willem Jiang <wi...@gmail.com>:

> It could handy for the user to write the test without starting the
> service-center,
> we could add it into  the section of best practice of writing a uni test.
>
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:
>
> > LocalRegistry for java-chassis is created only for test purpose and not
> > intended for product  use. Is there many scenarios need this? Or we need
> to
> > reorganize its code to meet product use.
> >
> >
> >
> >
> > ------------------ 原始邮件 ------------------
> > 发件人: "willem.jiang"<wi...@gmail.com>;
> > 发送时间: 2018年7月25日(星期三) 下午2:22
> > 收件人: "dev"<de...@servicecomb.apache.org>;
> >
> > 主题: Re: Cannot find the instance in ServiceComb Discovery
> >
> >
> >
> > Hi, jimin,
> >
> > Changed the System property fix the issue, but it looks like we have some
> > undocument information need to updated.
> >
> >
> >
> > Willem Jiang
> >
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
> > On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com> wrote:
> >
> > > you write a local registry.yaml, but missed some important data
> > > a easy way to fix: do not write the registry.yaml
> > > because you test case is self invoke self, ServiceComb engine can
> > generate
> > > informations dynamiclly
> > >
> > > change: org.apache.servicecomb.saga.discovery.service.center.
> > > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
> > >
> > > private static void setUpLocalRegistry() {
> > >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"
> notExistJustForceLocal");
> > > }
> > >
> > >
> > >
> > > 2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> > >
> > > > Hi
> > > >
> > > > When I recovery the old saga code in the SCB-692 branch[1] , I got
> the
> > > > error when running the ServiceCenterDiscoveryRestTransportTest in
> the
> > > > ServiceComb Discovery module.
> > > > It looks like the service provide already registered, but the Service
> > > Path
> > > > Manager cannot find the right instance. I tried to debug the code,
> but
> > > > there are some points those I missed.
> > > >
> > > > You can reproduce the error by checking out the saga code and switch
> to
> > > > SCB-692 branch.
> > > >
> > > > [1]https://github.com/apache/incubator-servicecomb-saga/tree/SCB-692
> > > >
> > > > Willem Jiang
> > > >
> > > > Twitter: willemjiang
> > > > Weibo: 姜宁willem
> > > >
> > >
> >
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by Willem Jiang <wi...@gmail.com>.
It could handy for the user to write the test without starting the
service-center,
we could add it into  the section of best practice of writing a uni test.


Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jul 25, 2018 at 2:27 PM, bismy <bi...@qq.com> wrote:

> LocalRegistry for java-chassis is created only for test purpose and not
> intended for product  use. Is there many scenarios need this? Or we need to
> reorganize its code to meet product use.
>
>
>
>
> ------------------ 原始邮件 ------------------
> 发件人: "willem.jiang"<wi...@gmail.com>;
> 发送时间: 2018年7月25日(星期三) 下午2:22
> 收件人: "dev"<de...@servicecomb.apache.org>;
>
> 主题: Re: Cannot find the instance in ServiceComb Discovery
>
>
>
> Hi, jimin,
>
> Changed the System property fix the issue, but it looks like we have some
> undocument information need to updated.
>
>
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com> wrote:
>
> > you write a local registry.yaml, but missed some important data
> > a easy way to fix: do not write the registry.yaml
> > because you test case is self invoke self, ServiceComb engine can
> generate
> > informations dynamiclly
> >
> > change: org.apache.servicecomb.saga.discovery.service.center.
> > ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
> >
> > private static void setUpLocalRegistry() {
> >   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustForceLocal");
> > }
> >
> >
> >
> > 2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:
> >
> > > Hi
> > >
> > > When I recovery the old saga code in the SCB-692 branch[1] , I got the
> > > error when running the ServiceCenterDiscoveryRestTransportTest in the
> > > ServiceComb Discovery module.
> > > It looks like the service provide already registered, but the Service
> > Path
> > > Manager cannot find the right instance. I tried to debug the code, but
> > > there are some points those I missed.
> > >
> > > You can reproduce the error by checking out the saga code and switch to
> > > SCB-692 branch.
> > >
> > > [1]https://github.com/apache/incubator-servicecomb-saga/tree/SCB-692
> > >
> > > Willem Jiang
> > >
> > > Twitter: willemjiang
> > > Weibo: 姜宁willem
> > >
> >
>

回复: Cannot find the instance in ServiceComb Discovery

Posted by bismy <bi...@qq.com>.
LocalRegistry for java-chassis is created only for test purpose and not intended for product  use. Is there many scenarios need this? Or we need to reorganize its code to meet product use. 




------------------ 原始邮件 ------------------
发件人: "willem.jiang"<wi...@gmail.com>;
发送时间: 2018年7月25日(星期三) 下午2:22
收件人: "dev"<de...@servicecomb.apache.org>;

主题: Re: Cannot find the instance in ServiceComb Discovery



Hi, jimin,

Changed the System property fix the issue, but it looks like we have some
undocument information need to updated.



Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com> wrote:

> you write a local registry.yaml, but missed some important data
> a easy way to fix: do not write the registry.yaml
> because you test case is self invoke self, ServiceComb engine can generate
> informations dynamiclly
>
> change: org.apache.servicecomb.saga.discovery.service.center.
> ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
>
> private static void setUpLocalRegistry() {
>   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustForceLocal");
> }
>
>
>
> 2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>
> > Hi
> >
> > When I recovery the old saga code in the SCB-692 branch[1] , I got the
> > error when running the ServiceCenterDiscoveryRestTransportTest in the
> > ServiceComb Discovery module.
> > It looks like the service provide already registered, but the Service
> Path
> > Manager cannot find the right instance. I tried to debug the code, but
> > there are some points those I missed.
> >
> > You can reproduce the error by checking out the saga code and switch to
> > SCB-692 branch.
> >
> > [1]https://github.com/apache/incubator-servicecomb-saga/tree/SCB-692
> >
> > Willem Jiang
> >
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by Willem Jiang <wi...@gmail.com>.
Hi, jimin,

Changed the System property fix the issue, but it looks like we have some
undocument information need to updated.



Willem Jiang

Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Jul 25, 2018 at 11:44 AM, wjm wjm <zz...@gmail.com> wrote:

> you write a local registry.yaml, but missed some important data
> a easy way to fix: do not write the registry.yaml
> because you test case is self invoke self, ServiceComb engine can generate
> informations dynamiclly
>
> change: org.apache.servicecomb.saga.discovery.service.center.
> ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry
>
> private static void setUpLocalRegistry() {
>   System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustForceLocal");
> }
>
>
>
> 2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:
>
> > Hi
> >
> > When I recovery the old saga code in the SCB-692 branch[1] , I got the
> > error when running the ServiceCenterDiscoveryRestTransportTest in the
> > ServiceComb Discovery module.
> > It looks like the service provide already registered, but the Service
> Path
> > Manager cannot find the right instance. I tried to debug the code, but
> > there are some points those I missed.
> >
> > You can reproduce the error by checking out the saga code and switch to
> > SCB-692 branch.
> >
> > [1]https://github.com/apache/incubator-servicecomb-saga/tree/SCB-692
> >
> > Willem Jiang
> >
> > Twitter: willemjiang
> > Weibo: 姜宁willem
> >
>

Re: Cannot find the instance in ServiceComb Discovery

Posted by wjm wjm <zz...@gmail.com>.
you write a local registry.yaml, but missed some important data
a easy way to fix: do not write the registry.yaml
because you test case is self invoke self, ServiceComb engine can generate
informations dynamiclly

change: org.apache.servicecomb.saga.discovery.service.center.ServiceCenterDiscoveryRestTransportTest#setUpLocalRegistry

private static void setUpLocalRegistry() {
  System.setProperty(LOCAL_REGISTRY_FILE_KEY,"notExistJustForceLocal");
}



2018-07-24 11:17 GMT+08:00 Willem Jiang <wi...@gmail.com>:

> Hi
>
> When I recovery the old saga code in the SCB-692 branch[1] , I got the
> error when running the ServiceCenterDiscoveryRestTransportTest in the
> ServiceComb Discovery module.
> It looks like the service provide already registered, but the Service Path
> Manager cannot find the right instance. I tried to debug the code, but
> there are some points those I missed.
>
> You can reproduce the error by checking out the saga code and switch to
> SCB-692 branch.
>
> [1]https://github.com/apache/incubator-servicecomb-saga/tree/SCB-692
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>