nacos本地集群,mysql是一个ecs的单机版。
集群启动正常并且可以访问,但是服务注册不上。
控制台:java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([127.0.0.1:8848, 127.0.0.1:8849, 127.0.0.1:8850]) tried
nacos.log:java.lang.IllegalStateException: unable to find local peer: 192.168.43.8:8848, all peers: [127.0.0.1:8849, 127.0.0.1:8850, 127.0.0.1:8848]
已尝试配置spring.zipkin.discoveryClientEnable=false,无效。
配置文件
spring.application.name=demo
server.port=8001
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848,127.0.0.1:8849,127.0.0.1:8850
spring.zipkin.discoveryClientEnable=false
环境
nacos 1.0.0 ga
springboot 2.1.4.RELEASE
springcloud Greenwich.SR1
alibaba-dependencies 0.2.1.RELEASE
Hi @taifenglan, we detect non-English characters in the issue. This comment is an auto translation from @nacos-bot to help other users to understand this issue.
We encourage you to describe your issue in English which is more friendly to other users.
Nacos local cluster, mysql is a stand-alone version of ecs.
The cluster is up and running, but the service is not registered.
控制台:java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([127.0.0.1:8848, 127.0.0.1:8849, 127.0.0.1:8850]) tried
nacos.log:java.lang.IllegalStateException: unable to find local peer: 192.168.43.8:8848, all peers: [127.0.0.1:8849, 127.0.0.1:8850, 127.0.0.1:8848]
An attempt was made to configure spring.zipkin.discoveryClientEnable=false, which is invalid.
Configuration file
spring.application.name=demo
server.port=8001
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848,127.0.0.1:8849,127.0.0.1:8850
spring.zipkin.discoveryClientEnable=false
surroundings
nacos 1.0.0 ga
springboot 2.1.4.RELEASE
springcloud Greenwich.SR1
alibaba-dependencies 0.2.1.RELEASE
而且java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([127.0.0.1:8848, 127.0.0.1:8849, 127.0.0.1:8850]) tried这个错已经是一个老生常谈的问题了,想请教一下到底是什么原因造成的,看很多close issue并没有完全解决这个问题。
@taifenglan 你的cluster.conf里配的IP需要和你机器上执行hostname -i的结果一致。从你报错来看你的cluster.conf配的是127.0.0.1,但是实际获取到的hostname -i的值是192.168.43.8
@taifenglan 你的cluster.conf里配的IP需要和你机器上执行hostname -i的结果一致。从你报错来看你的cluster.conf配的是127.0.0.1,但是实际获取到的hostname -i的值是192.168.43.8
thank you very much
Most helpful comment
@taifenglan 你的cluster.conf里配的IP需要和你机器上执行hostname -i的结果一致。从你报错来看你的cluster.conf配的是127.0.0.1,但是实际获取到的hostname -i的值是192.168.43.8