sofastack / sofa-registry

SOFARegistry is a production-level, low-latency, high-availability service registry powered by Ant Financial.
https://www.sofastack.tech/sofa-registry/docs/Home
Apache License 2.0
648 stars 243 forks source link

Help registry start error #104

Open tylorswift opened 4 years ago

tylorswift commented 4 years ago

Your question

registry-integeration 集成部署启动后 common-error.log 报错 ,单三种health check 均显示正常

报错信息

[2020-04-14 18:15:50,507][ERROR][DataNodeChangePushTaskSessionDispatcher-7][SessionNodeServiceImpl] - Push sessionNode list error! No session node connected! [2020-04-14 18:15:50,507][ERROR][DataNodeChangePushTaskDataDispatcher-1][DataNodeServiceImpl] - Push dataNode list error! No data node registered! [2020-04-14 18:15:50,511][ERROR][DataNodeChangePushTaskSessionDispatcher-7][DataNodeSingleTaskProcessor] - [Task] Data node SingleTask Process error! java.lang.RuntimeException: Push sessionNode list error! No session node connected! at com.alipay.sofa.registry.server.meta.node.impl.SessionNodeServiceImpl.pushDataNodes(SessionNodeServiceImpl.java:131)

[2020-04-14 18:15:51,795][ERROR][main][RegistryApplication] - localhost:9622 health check failed. javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1098)

khotyn commented 4 years ago

Checking this problem on the way.

khotyn commented 4 years ago

能否把日志目录下完整的日志给贴上来。

khotyn commented 4 years ago

可以打个包放上来,另外启动过程中前几次 HealthCheck 是有可能失败的,因为在等待 Data 节点 Ready,过了几次应该就成功了才对。

tylorswift commented 4 years ago

logs.zip 启动过很多次,分别尝试过两台电脑,偶尔有一次能成功 但极少次,session节点应该是9603端口吧 也是启动的 。并且sofastack 官方demo报找不到 balanceMng service 服务引用,应该是provider list 里面找不到 服务, 但balance rpc日志也显示已经注册到 registry ,

khotyn commented 4 years ago

看了下错误的日志,应该是不影响后面的使用,启动过程中有些节点没有 Ready,导致健康检查有问题,但是最终健康检查通过,启动成功了。

khotyn commented 4 years ago

可以通过访问以下的地址看下服务是否注册上来了:

http://localhost:9603/digest/PUB/data/query?dataInfoId=com.example.demo.SampleService:1.0@DEFAULT%23@%23DEFAULT_INSTANCE_ID%23@%23SOFA

":1.0" 之前的为接口名,后面的在 SOFA RPC 的情况下是固定字符串。

tylorswift commented 4 years ago

官网demo BalanceMng 和 StockMng(web) 调用错误 logs.zip

khotyn commented 4 years ago

@tylorswift 我跑下 Demo 看看。

khotyn commented 4 years ago

@tylorswift 确认教程应该没有什么问题,你的 BalanceMngImpl 这个类上打上了下面的注解了吗?

@SofaService(interfaceType = BalanceMngFacade.class, uniqueId = "${service.unique.id}", bindings = { @SofaServiceBinding(bindingType = "bolt") })
class BalanceMngImpl implements BalanceMngFacade {
}
khotyn commented 4 years ago

另外,服务注册的日志里面发现了比较多这样的:

RPC-00203: UnPublish RPC service:[io.sofastack.spring.balance.manage.facade.BalanceMngFacade:1.0:dongtailai@DEFAULT]    num: [1] 

最好是 BalanceMngApplication 启动之后,从服务注册中心上 Query 看下对应的服务是否注册上去了。

tylorswift commented 4 years ago

同一主机 BalanceMngFacade (找不到服务),StockMngFacade(找到服务)(web项目这个是本地调用吧) error

tylorswift commented 4 years ago

极少数次能调用成功 ,且会报超时错误(Balance服务并没有报错执行成功):Caused by: com.alipay.remoting.rpc.exception.InvokeTimeoutException: Rpc invocation timeout[responseCommand TIMEOUT]! the address is 192.168.43.251:22200,然后就是又是找不到Balance服务。是客户端故障剔除么 ?

khotyn commented 4 years ago

我昨天看了你的日志,似乎 BalanceMngFacade 这个服务一会儿注册一会儿又取消了注册。BalanceMngFacade 所在的应用你是一直启动着的吧?

khotyn commented 4 years ago

看 Pub 也是有数据的。

tylorswift commented 4 years ago

一直启动的 ,其他人也遇到同样问题 应该是generally

khotyn commented 4 years ago

@tylorswift 能否把你的代码做一遍 mvn clean,然后打个包上传上来,我直接用你的试一下,虽然都是用的官方 Demo,但是可能改动的地方不一样之类的,我看下能否在我本地重现。

tylorswift commented 4 years ago

kc-sofastack-demo-master.zip registry-integeration 是最新版的 win10系统

khotyn commented 4 years ago

@tylorswift 好吧,我试下 Windows 下的,一直用的 Mac

tylorswift commented 4 years ago

@khotyn 你好 有结果了么?

khotyn commented 4 years ago

@tylorswift 周末我再看下哈