-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
集群模式bug,使用discovery会报错java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([172.XX.XX.23:80]) tried #1993
Comments
没有具体错误信息?客户端版本是什么? |
0.9.0.RELEASE Server是1.1.3.另外0.9.0是最新客户端了吧,还是大量甩出心跳日志,很烦,并不是你说的最新版本默认关闭的. 报错: <2019-11-01 09:42:47,414>[ERROR] request 120.79.76.96:8848 failed. - com.alibaba.nacos.client.naming |
spring-cloud-alibaba最新版本依赖(nacos-client 1.1.1),不是nacos-client最新版本(nacos-client 1.1.4),你可以手动覆盖到nacos-client 1.1.4,如何覆盖请参考:https://nacos.io/zh-cn/docs/faq.html#3.15 另外我怀疑你依赖的不是0.9.0-RELEASE,nacos-client 1.1.1在NamingProxy 340行只是一个简单的map.put操作,不会出现空指针。你检查下以下依赖的版本是什么:
|
我知道了,我没有添加到最新的客户端版本,我 稍后尝试,集群模式这个问题怎么办.特别影响 |
请更新到最新版本客户端,再重试看看是否还有问题。 |
有,现在ncos的spring-cloud-alibaba-dependencies和spring-cloud-starter-alibaba-nacos-*版本0.9.0-RELEASE,nacos-client 1.1.4,依然是这个问题,你们可以自己尝试下.server是部署在云服务器的,不是本地,然后采用集群模式,config没问题,discovery会报这个错误 |
麻烦贴一下最新的报错,主要看错误堆栈 |
基本上报错都是这些了: <2019-11-07 10:34:00,641>[ERROR] [NA] failed to request - com.alibaba.nacos.client.naming |
请看一下{user.home}/logs/naco/naming.log里的报错 |
无此文件 |
{user.home}/logs/nacos/naming.log 少打了个字母 |
你说的可是服务端里面的日志?也没有,naming-distro.log,naming-event.log,naming-performance.log,naming-push.log,naming-server.log都有 |
客户端 |
这边在windows和linux系统都跑了一遍,没有你说的这个目录/logs/nacos/和文件naming.log |
{user.home}知道啥意思吧? |
大概猜到是项目的根目录,我找不到,都跑去整个盘的根目录,linux的根目录,home,哪都找过了------------------ 原始邮件 ------------------
发件人: "Fury Zhu"<[email protected]>
发送时间: 2019年11月7日(星期四) 晚上6:54
收件人: "alibaba/nacos"<[email protected]>;
抄送: "besthanliu"<[email protected]>;"Author"<[email protected]>;
主题: Re: [alibaba/nacos] 集群模式bug,使用discovery会报错java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([172.XX.XX.23:80]) tried (#1993)
这边在windows和linux系统都跑了一遍,没有你说的这个目录/logs/nacos/和文件naming.log
{user.home}知道啥意思吧?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
{user.home}是用户根目录 |
如上图,整个盘都搜索过了,没有的,/usr/local/nacos,放的是nacos-server |
你客户端和nacos-server跑在一个机器上? |
嗯 |
那就在nacos-server的日志里搜一下NullPointerException |
我看了你们的聊天,我也是这个问题,然后我查看了你说的对应位置的的文件,内容如下 2019-11-08 10:44:16.725 INFO [com.alibaba.nacos.naming.beat.sender:c.a.n.c.naming] [BEAT] 0abd1eef-7bdb-433d-967f-3c499a61998f sending beat to server: {"cluster":"DEFAULT","ip":"192.168.30.1","metadata":{"preserved.register.source":"SPRING_CLOUD"},"port":8881,"scheduled":true,"serviceName":"DEFAULT_GROUP@@sale","weight":1.0} |
@wangpin1997 你的是另外一个问题,你需要看一下Raft集群是否选举成功,可以看下控制台上 集群管理->节点列表。 |
这个文件里面有 |
你这个有NullPointer异常的机器,应该是cluster.conf配置有问题,执行下面的url看看和其他Nacos Server返回的是否一样:
|
确实有一台机器没开,这个会影响到整个集群吗,我尝试下开了看看 |
现在两台机器都有开,还是一样.都能正常登录,还是一样,说不在服务列表 |
关于:你本机IP172.18.137.185不在cluster.conf里,需要加到里面去。 这个问题解决了,其实算是一个bug.如上图我配的全是外网ip,nacos会自己找它们内网ip,关键这样一来,回到配置里,自然不存在172.18.137.185这个ip. 我百度了一下,人家是这么说的. 最后全部节点启动完成之后,主题的问题也不存在了,可以正常使用.这边问一下,集群情况下都会这样吗?如果存在十来个节点,不会挂了一个就整个集群客户端异常吧,那不太好 |
最后,非常感谢你的耐心回答,祝nacos项目越来越强 |
com.alibaba.nacos.api.exception.NacosException: failed to req API:http://59.110.54.188:8848/nacos/v1/ns/instance/beat. code:500 msg: java.net.SocketTimeoutException: connect timed out 2020-05-28 23:43:33.310 ERROR [cloud-auth,,,] 15564 --- [ing.beat.sender] com.alibaba.nacos.client.naming : [CLIENT-BEAT] failed to send beat: {"cluster":"DEFAULT","ip":"192.168.2.103","metadata":{"preserved.register.source":"SPRING_CLOUD"},"port":9777,"scheduled":true,"serviceName":"DEFAULT_GROUP@@cloud-auth","weight":1.0} java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance/beat after all servers([59.110.54.188:8848]) tried: failed to req API:http://59.110.54.188:8848/nacos/v1/ns/instance/beat. code:500 msg: java.net.SocketTimeoutException: connect timed out 我这里也有这个问题,nacos-server:1.0.1 单个nacos,非集群 |
我的是1.1.4的NACOS集群 也是这个状况,有解决的办法吗,报错如下 [:] -- 2020-07-08 10:38:46.254 -- [requestId:] -- ERROR com.alibaba.nacos.client.naming.net.NamingProxy 457 reqAPI -- request nacos-service:8848 [:] -- 2020-07-08 10:38:46.254 -- [requestId:] -- ERROR com.alibaba.nacos.client.naming.net.NamingProxy 319 sendBeat -- [CLIENT-BEAT] failed to s [:] -- 2020-07-08 10:39:49.297 -- [requestId:] -- ERROR com.alibaba.nacos.client.naming.net.HttpClient 103 request -- [NA] failed to request java [:] -- 2020-07-08 10:39:49.298 -- [requestId:] -- ERROR com.alibaba.nacos.client.naming.net.NamingProxy 457 reqAPI -- request nacos-service:8848 failed. com.alibaba.nacos.api.exception.NacosException: failed to req API:nacos-service:8848/nacos/v1/ns/instance/beat. code:500 msg: java.net.SocketTimeoutException: connect timed out: nacos-service:8848 [:] -- 2020-07-08 10:39:49.298 -- [requestId:] -- ERROR com.alibaba.nacos.client.naming.net.NamingProxy 319 sendBeat -- [CLIENT-BEAT] failed to send beat: {"cluster":"DEFAULT","ip":"10.42.1.238","metadata":{"preserved.register.source":"SPRING_CLOUD"},"period":5000,"port":9000,"scheduled":false,"serviceName":"DEFAULT_GROUP@@cfyy-gateway","stopped":false,"weight":1.0} java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance/beat after all servers([nacos-service:8848]) tried: failed to req API:nacos-service:8848/nacos/v1/ns/instance/beat. code:500 msg: java.net.SocketTimeoutException: connect timed out: nacos-service:8848 |
naming.log |
你好,我的是用docker搭建的nacos集群配和docker下的nginx做的,nginx端口是1111,报如下的错误能问下要怎么解决吗 java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([192.168.3.29:1111]) tried: failed to req API:192.168.3.29:1111/nacos/v1/ns/instance. code:500 msg: java.net.SocketTimeoutException: Read timed out 2020-09-22 13:11:05.126 INFO 24064 --- [ restartedMain] com.doublez.springcloud.PaymentMain9002 : Started PaymentMain9002 in 11.418 seconds (JVM running for 12.175) |
也是碰到相同的问题。把discovery版本改成2.2.3.RELEASE解决的。 |
问题解决了吗,我也碰到了同样的问题,项目启动的时候注册成功了。 |
但是之后就开始报这个错误 |
解决了吗??? |
java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/service/list after all servers([127.0.0.1:8838]) tried: failed to req API:127.0.0.1:8838/nacos/v1/ns/service/list. code:500 msg: java.net.ConnectException: Connection refused: connect naming-server.log里也没报错 2021-12-28 15:24:44,911 WARN naming.distro config will be removed, please use core.protocol.distro replace. 2021-12-28 15:24:44,911 WARN Using naming.distro config to replace core.distro config 2021-12-28 15:24:45,032 INFO open empty service auto clean job, initialDelay : 50000 ms, period : 30000 ms 2021-12-28 15:24:45,034 INFO listen for service meta change 2021-12-28 15:24:45,043 INFO upgrade.state file is not exist 2021-12-28 15:24:48,046 INFO Load instance extension handler [] 2021-12-28 15:24:48,064 INFO [SelectorManager] Load SelectorContextBuilder(class com.alibaba.nacos.naming.selector.context.CmdbSelectorContextBuilder) contextType(CMDB) successfully. 2021-12-28 15:24:48,064 INFO [SelectorManager] Load SelectorContextBuilder(class com.alibaba.nacos.naming.selector.context.NoneSelectorContextBuilder) contextType(NONE) successfully. 2021-12-28 15:24:48,064 INFO [SelectorManager] Load Selector(class com.alibaba.nacos.naming.selector.LabelSelector) type(label) contextType(CMDB) successfully. 2021-12-28 15:24:48,064 INFO [SelectorManager] Load Selector(class com.alibaba.nacos.naming.selector.NoneSelector) type(none) contextType(NONE) successfully. |
客户端访问正常的,服务端访问的nginx80端口的时候报500 |
naming-server.log报错 2022-03-28 15:03:14,988 WARN Exception while request: http://127.0.0.1:8845/nacos/v1/ns/operator/cluster/state, caused: {} java.net.SocketException: Permission denied: connect java.io.IOException: failed to req API:http://127.0.0.1:8845/nacos/v1/ns/operator/cluster/state. code:500 msg: java.net.SocketException: Permission denied: connect |
建议优化一下。 |
集群模式bug,使用discovery会报错java.lang.IllegalStateException: failed to req API:/nacos/v1/ns/instance after all servers([172.XX.XX.23:80]) tried
这个问题百度里也是大量反馈了
现在我用的全是最新的,还是有这个bug
The text was updated successfully, but these errors were encountered: