Closed seedscoder closed 1 year ago
It works for me pretty well. The error message indicates your nacos cluster cannot handle the registration request. It's more likely a problem on nacos side, probably some misconfiguration on your cluster setup. You should refer to /Users/me/workspace/data/docker/nacos/logs/nacos-server01/nacos.logs
for more error details.
@ptyin Thank you for your reply. I have checked the logs of three nodes in the Nacos cluster, and their logs are similar to the following section. I did not see any error information, but the Seata Server still cannot function properly. I hope you can help me take a look at this again
2023-10-30 21:26:58,218 INFO Connection check task start
2023-10-30 21:26:58,219 INFO Long connection metrics detail ,Total count =2, sdkCount=0,clusterCount=2
2023-10-30 21:26:58,220 INFO Connection check task end
2023-10-30 21:27:01,166 INFO ConnectionMetrics, totalCount = 3, detail = {long_connection=2, long_polling=1}
2023-10-30 21:27:01,222 INFO Connection check task start
2023-10-30 21:27:01,222 INFO Long connection metrics detail ,Total count =2, sdkCount=0,clusterCount=2
2023-10-30 21:27:01,222 INFO Connection check task end
2023-10-30 21:27:04,171 INFO ConnectionMetrics, totalCount = 3, detail = {long_connection=2, long_polling=1}
2023-10-30 21:27:04,226 INFO Connection check task start
2023-10-30 21:27:04,227 INFO Long connection metrics detail ,Total count =2, sdkCount=0,clusterCount=2
2023-10-30 21:27:04,227 INFO Connection check task end
2023-10-30 21:27:07,177 INFO ConnectionMetrics, totalCount = 3, detail = {long_connection=2, long_polling=1}
2023-10-30 21:27:07,228 INFO Connection check task start
2023-10-30 21:27:07,228 INFO Long connection metrics detail ,Total count =2, sdkCount=0,clusterCount=2
2023-10-30 21:27:07,229 INFO Connection check task end
2023-10-30 21:27:10,180 INFO ConnectionMetrics, totalCount = 3, detail = {long_connection=2, long_polling=1}
2023-10-30 21:27:10,231 INFO Connection check task start
2023-10-30 21:27:10,238 INFO Long connection metrics detail ,Total count =2, sdkCount=0,clusterCount=2
2023-10-30 21:27:10,238 INFO Connection check task end
2023-10-30 21:27:13,184 INFO ConnectionMetrics, totalCount = 3, detail = {long_connection=2, long_polling=1}
2023-10-30 21:27:13,240 INFO Connection check task start
2023-10-30 21:27:13,327 INFO Long connection metrics detail ,Total count =2, sdkCount=0,clusterCount=2
2023-10-30 21:27:13,327 INFO Connection check task end
2023-10-30 08:47:00,773 INFO Current addressing mode selection : FileConfigMemberLookup
2023-10-30 08:47:00,777 WARN [serverlist] updated to : [Member{ip='nacos3', port=8848, state=UP, extendInfo={raftPort=7848, readyToUpgrade=true}}, Member{ip='nacos2', port=8848, state=UP, extendInfo={raftPort=7848, readyToUpgrade=true}}, Member{ip='nacos1', port=8848, state=UP, extendInfo={raftPort=7848, readyToUpgrade=true, version=2.2.3}}]
2023-10-30 08:47:03,440 INFO start a new rpc client to member - > : Member{ip='nacos2', port=8848, state=UP, extendInfo={raftPort=7848, readyToUpgrade=true}}
2023-10-30 08:47:03,706 INFO start a new rpc client to member - > : Member{ip='nacos3', port=8848, state=UP, extendInfo={raftPort=7848, readyToUpgrade=true}}
2023-10-30 08:47:03,728 INFO [ClusterRpcClientProxy] success to refresh cluster rpc client on start up,members =[Member{ip='nacos2', port=8848, state=UP, extendInfo={raftPort=7848, readyToUpgrade=true}}, Member{ip='nacos3', port=8848, state=UP, extendInfo={raftPort=7848, readyToUpgrade=true}}]
2023-10-30 08:47:08,613 INFO This node is ready to provide external services
2023-10-30 21:26:50 apm-skywalking not enabled
2023-10-30 21:26:50 Affected JVM parameters: -Dlog.home=/root/logs/seata -server -Dloader.path=/lib -Xmx2048m -Xms2048m -Xss640k -XX:SurvivorRatio=10 -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:MaxDirectMemorySize=1024m -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/root/logs/seata/java_heapdump.hprof -XX:+DisableExplicitGC -Xloggc:/root/logs/seata/seata_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -Dio.netty.leakDetectionLevel=advanced -Dapp.name=seata-server -Dapp.pid=1 -Dapp.home=/ -Dbasedir=/
2023-10-30 21:26:51 ███████╗███████╗ █████╗ ████████╗ █████╗
2023-10-30 21:26:51 ██╔════╝██╔════╝██╔══██╗╚══██╔══╝██╔══██╗
2023-10-30 21:26:51 ███████╗█████╗ ███████║ ██║ ███████║
2023-10-30 21:26:51 ╚════██║██╔══╝ ██╔══██║ ██║ ██╔══██║
2023-10-30 21:26:51 ███████║███████╗██║ ██║ ██║ ██║ ██║
2023-10-30 21:26:51 ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
2023-10-30 21:26:51
2023-10-30 21:26:51
2023-10-30 21:26:51 21:26:51.403 INFO --- [ main] [ta.config.ConfigurationFactory] [ load] [] : load Configuration from :Spring Configuration
2023-10-30 21:26:51 21:26:51.415 INFO --- [ main] [onfig.nacos.NacosConfiguration] [ getConfigProperties] [] : Nacos check auth with userName/password.
2023-10-30 21:26:51 21:26:51.636 INFO --- [ main] [seata.server.ServerApplication] [ logStarting] [] : Starting ServerApplication using Java 1.8.0_342 on seata-server with PID 1 (/seata-server/classes started by root in /seata-server)
2023-10-30 21:26:51 21:26:51.637 INFO --- [ main] [seata.server.ServerApplication] [ogStartupProfileInfo] [] : No active profile set, falling back to 1 default profile: "default"
2023-10-30 21:26:52 21:26:52.734 INFO --- [ main] [mbedded.tomcat.TomcatWebServer] [ initialize] [] : Tomcat initialized with port(s): 7091 (http)
2023-10-30 21:26:52 21:26:52.743 INFO --- [ main] [oyote.http11.Http11NioProtocol] [ log] [] : Initializing ProtocolHandler ["http-nio-7091"]
2023-10-30 21:26:52 21:26:52.744 INFO --- [ main] [.catalina.core.StandardService] [ log] [] : Starting service [Tomcat]
2023-10-30 21:26:52 21:26:52.744 INFO --- [ main] [e.catalina.core.StandardEngine] [ log] [] : Starting Servlet engine: [Apache Tomcat/9.0.62]
2023-10-30 21:26:52 21:26:52.801 INFO --- [ main] [rBase.[Tomcat].[localhost].[/]] [ log] [] : Initializing Spring embedded WebApplicationContext
2023-10-30 21:26:52 21:26:52.801 INFO --- [ main] [letWebServerApplicationContext] [ebApplicationContext] [] : Root WebApplicationContext: initialization completed in 1134 ms
2023-10-30 21:26:53 21:26:53.215 INFO --- [ main] [vlet.WelcomePageHandlerMapping] [ <init>] [] : Adding welcome page: class path resource [static/index.html]
2023-10-30 21:26:53 21:26:53.443 INFO --- [ main] [oyote.http11.Http11NioProtocol] [ log] [] : Starting ProtocolHandler ["http-nio-7091"]
2023-10-30 21:26:53 21:26:53.457 INFO --- [ main] [mbedded.tomcat.TomcatWebServer] [ start] [] : Tomcat started on port(s): 7091 (http) with context path ''
2023-10-30 21:26:53 21:26:53.464 INFO --- [ main] [seata.server.ServerApplication] [ logStarted] [] : Started ServerApplication in 2.662 seconds (JVM running for 3.145)
2023-10-30 21:26:53 21:26:53.773 INFO --- [ main] [a.server.session.SessionHolder] [ init] [] : use session store mode: db
2023-10-30 21:26:53 21:26:53.976 INFO --- [ main] [aba.druid.pool.DruidDataSource] [ init] [] : {dataSource-1} inited
2023-10-30 21:26:54 21:26:54.025 ERROR --- [ main] [lock.DataBaseDistributedLocker] [ <init>] [] : The distribute lock table is not config, please create the target table and config it
2023-10-30 21:26:54 21:26:54.031 INFO --- [ main] [rver.lock.LockerManagerFactory] [ init] [] : use lock store mode: db
2023-10-30 21:26:54 21:26:54.276 INFO --- [ main] [rpc.netty.NettyServerBootstrap] [ start] [] : Server started, service listen port: 8091
2023-10-30 21:26:54 21:26:54.416 ERROR --- [ main] [io.seata.server.ServerRunner ] [ run] [] : seata server start error: Server start failed
2023-10-30 21:26:54 ==>
2023-10-30 21:26:54 java.lang.RuntimeException: Server start failed
2023-10-30 21:26:54 at io.seata.core.rpc.netty.NettyServerBootstrap.start(NettyServerBootstrap.java:179) ~[seata-core-1.7.1.jar:1.7.1]
2023-10-30 21:26:54 at io.seata.core.rpc.netty.AbstractNettyRemotingServer.init(AbstractNettyRemotingServer.java:56) ~[seata-core-1.7.1.jar:1.7.1]
2023-10-30 21:26:54 at io.seata.core.rpc.netty.NettyRemotingServer.init(NettyRemotingServer.java:61) ~[seata-core-1.7.1.jar:1.7.1]
2023-10-30 21:26:54 at io.seata.server.Server.start(Server.java:87) ~[classes/:na]
2023-10-30 21:26:54 at io.seata.server.ServerRunner.run(ServerRunner.java:60) ~[classes/:na]
2023-10-30 21:26:54 at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:812) [spring-boot-2.5.13.jar:2.5.13]
2023-10-30 21:26:54 at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:796) [spring-boot-2.5.13.jar:2.5.13]
2023-10-30 21:26:54 at org.springframework.boot.SpringApplication.run(SpringApplication.java:346) [spring-boot-2.5.13.jar:2.5.13]
2023-10-30 21:26:54 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365) [spring-boot-2.5.13.jar:2.5.13]
2023-10-30 21:26:54 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) [spring-boot-2.5.13.jar:2.5.13]
2023-10-30 21:26:54 at io.seata.server.ServerApplication.main(ServerApplication.java:31) [classes/:na]
2023-10-30 21:26:54 Caused by: com.alibaba.nacos.api.exception.NacosException: failed to req API:/nacos/v1/ns/instance after all servers([nacos1:8848]) tried: ErrCode:400, ErrMsg:<!doctype html><html lang="en"><head><title>HTTP Status 400 – Bad Request</title><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style></head><body><h1>HTTP Status 400 – Bad Request</h1></body></html>
2023-10-30 21:26:54 at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:556) ~[nacos-client-1.4.2.jar:na]
2023-10-30 21:26:54 at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:498) ~[nacos-client-1.4.2.jar:na]
2023-10-30 21:26:54 at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:493) ~[nacos-client-1.4.2.jar:na]
2023-10-30 21:26:54 at com.alibaba.nacos.client.naming.net.NamingProxy.registerService(NamingProxy.java:246) ~[nacos-client-1.4.2.jar:na]
2023-10-30 21:26:54 at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:212) ~[nacos-client-1.4.2.jar:na]
2023-10-30 21:26:54 at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:196) ~[nacos-client-1.4.2.jar:na]
2023-10-30 21:26:54 at io.seata.discovery.registry.nacos.NacosRegistryServiceImpl.register(NacosRegistryServiceImpl.java:114) ~[seata-discovery-nacos-1.7.1.jar:1.7.1]
2023-10-30 21:26:54 at io.seata.core.rpc.netty.NettyServerBootstrap.start(NettyServerBootstrap.java:173) ~[seata-core-1.7.1.jar:1.7.1]
2023-10-30 21:26:54 ... 10 common frames omitted
2023-10-30 21:26:54 <==
2023-10-30 21:26:54
2023-10-30 21:26:54 21:26:54.418 WARN --- [ Thread-1] [mmon.http.HttpClientBeanHolder] [ shutdown] [] : [HttpClientBeanHolder] Start destroying common HttpClient
2023-10-30 21:26:54 21:26:54.418 WARN --- [ Thread-13] [cos.common.notify.NotifyCenter] [ shutdown] [] : [NotifyCenter] Start destroying Publisher
2023-10-30 21:26:54 21:26:54.419 WARN --- [ Thread-13] [cos.common.notify.NotifyCenter] [ shutdown] [] : [NotifyCenter] Destruction of the end
2023-10-30 21:26:54 21:26:54.419 WARN --- [ Thread-1] [mmon.http.HttpClientBeanHolder] [ shutdown] [] : [HttpClientBeanHolder] Destruction of the end
2023-10-30 21:26:54 21:26:54.426 INFO --- [ngApplicationShutdownHook] [rpc.netty.NettyServerBootstrap] [ shutdown] [] : Shutting server down, the listen port: 8091
@seedscoder If it’s convenient, could you please provide the reason? This way, others can benefit from it.
@seedscoder Hi, a followup here. After some days, I tried to reboot the services with docker-compose configuration. I reproduced the same errors as yours😂.
FYI, after I changed
NACOS_SERVERS=nacos1:8848 nacos2:8848 nacos3:8848
to
NACOS_SERVERS=nacos-server-01:8848 nacos-server-02:8848 nacos-server-03:8848
in docker-compose.yml, I got the problems solved. And hope you can benefit from it.
I wanted to use Nacos as the registry and configuration center for Seata Server, but starting through Docker Compose failed
I wanted to use Nacos as the registry and configuration center for Seata Server, but starting through Docker Compose failed