sofastack / sofa-rpc

SOFARPC is a high-performance, high-extensibility, production-level Java RPC framework.
https://www.sofastack.tech/sofa-rpc/docs/Home
Apache License 2.0
3.81k stars 1.17k forks source link

A SofaRouteException will occur when the service is started multiple times when using nacos as the service registry. #763

Closed dxp909 closed 4 years ago

dxp909 commented 5 years ago

Describe the bug

使用nacos作为服务注册中心,当服务提供端第一次启动时,服务发现调用都没有问题,当把服务重启(在同一台服务器上,使用相同的boltPort)后,就会引发SofaRouteException异常。具体异常信息如下: com.alipay.sofa.rpc.core.exception.SofaRouteException: RPC-02312: 当前服务[XXXService:1.0]的地址[bolt://IP地址:PORT?accepts=100000&appName=message&weight=100&language=java&pid=2132&interface=XXXService&timeout=0&serialization=hessian2&protocol=bolt&delay=-1&sofa.group=test&dynamic=true&startTime=1568781552627&id=rpc-cfg-3&uniqueId=&rpcVer=50505,]不可用,或指定的地址不在可用的地址列表中

Environment

sofastack-bot[bot] commented 5 years ago

Hi @dxp909, we detect non-English characters in the issue. This comment is an auto translation by @sofastack-robot to help other users to understand this issue.

We encourage you to describe your issue in English which is more friendly to other users.

Describe the bug Using nacos as the service registry, when the service provider starts for the first time, the service discovery call is no problem. When the service is restarted (on the same server, using the same boltPort), Raises a SofaRouteException. The specific exception information is as follows: com.alipay.sofa.rpc.core.exception.SofaRouteException: RPC-02312: The address of the current service [XXXService:1.0] [bolt://IP address: PORT?accepts=100000&appName=message&weight=100&language= Java&pid=2132&interface=XXXService&timeout=0&serialization=hessian2&protocol=bolt&delay=-1&sofa.group=test&dynamic=true&startTime=1568781552627&id=rpc-cfg-3&uniqueId=&rpcVer=50505,] is not available, or the specified address is not in the available address list### Environment - SOFARPC version: 5.5.5 - JVM version (eg java -version): 1.8 - OS version (eg uname -a): windows10 - Maven version: 3.6

dxp909 commented 5 years ago

使用的是sofa-boot 3.1.5

khotyn commented 4 years ago

@dxp909 看起来和 https://github.com/sofastack/sofa-rpc/issues/664 有关,这个问题已经 Fix 了,可以使用 SOFABoot 3.2.0 看下,我本地试了是 OK 的。

dxp909 commented 4 years ago

ok,我升级下试试,@khotyn 多谢