apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.08k stars 8.73k forks source link

0101 can not connect to 10.233.65.126:8091 cause:can not register RM,err:can not connect to services-server. #6601

Closed JecketLiao closed 1 month ago

JecketLiao commented 1 month ago

Ⅰ. Issue Description

seata server 部署在k8s,使用nacos作为配置和服务中心,nacos服务列表看到当前的ip是:10.233.65.126。seata server由于某种原因发生了重启导致ip发生了变化,nacos上的服务的变成:10.233.82.253。此时RM service还是向旧的server的ip发送注册请求,导致无法连接。

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

eoutChecker_1_1 | i.s.c.r.netty.NettyClientChannelManager | 0101 can not connect to 10.233.65.126:8091 cause:can not register RM,err:can not connect to services-server.

io.seata.common.exception.FrameworkException: can not register RM,err:can not connect to services-server. at io.seata.core.rpc.netty.NettyClientChannelManager.doConnect(NettyClientChannelManager.java:240) at io.seata.core.rpc.netty.NettyClientChannelManager.acquireChannel(NettyClientChannelManager.java:109) at io.seata.core.rpc.netty.NettyClientChannelManager.reconnect(NettyClientChannelManager.java:186) at io.seata.core.rpc.netty.AbstractNettyRemotingClient$1.run(AbstractNettyRemotingClient.java:115) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:831)

Ⅲ. Describe what you expected to happen

RM应该可以通过nacos获取到当前seata server的最新ip地址,而不是一直向旧的ip发送请求。

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. 启动seata server
  2. 启动RM service
  3. 重启seata server

Minimal yet complete reproducer code (or URL to code):

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

funky-eyes commented 1 month ago

https://github.com/apache/incubator-seata/issues/6500

JecketLiao commented 1 month ago

6500

这个和服务端下线有关系么?,我的问题是注册中心已经更新了最新服务端ip,RM没有订阅到最新的地址,使用的是本地map保存的ip。