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.38k stars 8.79k forks source link

Installing Seata Server using Docker Compose encountered a problem #5969

Closed seedscoder closed 1 year ago

seedscoder commented 1 year ago

I wanted to use Nacos as the registry and configuration center for Seata Server, but starting through Docker Compose failed

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>
version: "3"

services:
  nacos1:
    container_name: nacos-server-17848
    hostname: nacos-server-01
    image: nacos/nacos-server:v2.2.3-slim
    networks:
      - public
    environment:
      - MODE=cluster
      - NACOS_AUTH_ENABLE=true
      - nacos.core.auth.enabled=true
      - nacos.core.auth.plugin.nacos.token.secret.key=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
      - nacos.core.auth.server.identity.key=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
      - nacos.core.auth.server.identity.value=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
      - PREFER_HOST_MODE=hostname
      - NACOS_SERVERS=nacos1:8848 nacos2:8848 nacos3:8848
      - SPRING_DATASOURCE_PLATFORM=mysql
      - MYSQL_SERVICE_HOST=mysql
      - MYSQL_SERVICE_PORT=3306
      - MYSQL_SERVICE_USER=nacosuser
      - MYSQL_SERVICE_PASSWORD=nacosp@ssw0rd
      - MYSQL_SERVICE_DB_NAME=nacos_server
      - MYSQL_SERVICE_DB_PARAM=characterEncoding=utf8&connectTimeout=10000&socketTimeout=30000&autoReconnect=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
      - JVM_XMS=128m
      - JVM_XMX=128m
    volumes:
      - /Users/me/workspace/data/docker/nacos/logs/nacos-server01:/home/nacos/logs
    # ports:
    #   - 17848:7848
    #   - 18848:8848
    #   - 19848:9848
    #   - 19849:9849

  nacos2:
    container_name: nacos-server-27848
    hostname: nacos-server-02
    image: nacos/nacos-server:v2.2.3-slim
    networks:
      - public
    environment:
      - MODE=cluster
      - NACOS_AUTH_ENABLE=true
      - nacos.core.auth.enabled=true
      - nacos.core.auth.plugin.nacos.token.secret.key=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
      - nacos.core.auth.server.identity.key=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
      - nacos.core.auth.server.identity.value=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
      - PREFER_HOST_MODE=hostname
      - NACOS_SERVERS=nacos1:8848 nacos2:8848 nacos3:8848
      - SPRING_DATASOURCE_PLATFORM=mysql
      - MYSQL_SERVICE_HOST=mysql
      - MYSQL_SERVICE_PORT=3306
      - MYSQL_SERVICE_USER=nacosuser
      - MYSQL_SERVICE_PASSWORD=nacosp@ssw0rd
      - MYSQL_SERVICE_DB_NAME=nacos_server
      - MYSQL_SERVICE_DB_PARAM=characterEncoding=utf8&connectTimeout=10000&socketTimeout=30000&autoReconnect=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
      - JVM_XMS=128m
      - JVM_XMX=128m
    volumes:
      - /Users/me/workspace/data/docker/nacos/logs/nacos-server02:/home/nacos/logs
    # ports:
    #   - 27848:7848
    #   - 28848:8848
    #   - 29848:9848
    #   - 29849:9849

  nacos3:
    container_name: nacos-server-37848
    hostname: nacos-server-03
    image: nacos/nacos-server:v2.2.3-slim
    networks:
      - public
    environment:
      - MODE=cluster
      - NACOS_AUTH_ENABLE=true
      - nacos.core.auth.enabled=true
      - nacos.core.auth.plugin.nacos.token.secret.key=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
      - nacos.core.auth.server.identity.key=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
      - nacos.core.auth.server.identity.value=VGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
      - PREFER_HOST_MODE=hostname
      - NACOS_SERVERS=nacos1:8848 nacos2:8848 nacos3:8848
      - SPRING_DATASOURCE_PLATFORM=mysql
      - MYSQL_SERVICE_HOST=mysql
      - MYSQL_SERVICE_PORT=3306
      - MYSQL_SERVICE_USER=nacosuser
      - MYSQL_SERVICE_PASSWORD=nacosp@ssw0rd
      - MYSQL_SERVICE_DB_NAME=nacos_server
      - MYSQL_SERVICE_DB_PARAM=characterEncoding=utf8&connectTimeout=10000&socketTimeout=30000&autoReconnect=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
      - JVM_XMS=128m
      - JVM_XMX=128m
    volumes:
      - /Users/me/workspace/data/docker/nacos/logs/nacos-server03:/home/nacos/logs
    # ports:
    #   - 37848:7848
    #   - 38848:8848
    #   - 39848:9848
    #   - 39849:9849

networks:
  public:
    external: true

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
}

http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}

stream {
    upstream nacos-server-grpc {
        server nacos1:9848;
        server nacos2:9848;
        server nacos3:9848;
    }
    server {
        listen 9848;
        proxy_pass nacos-server-grpc;
    }
}
upstream nacos {
    server nacos1:8848 weight=1 max_fails=2 fail_timeout=10s;
    server nacos2:8848 weight=1 max_fails=2 fail_timeout=10s;
    server nacos3:8848 weight=1 max_fails=2 fail_timeout=10s;
}

server {
    listen       8848;
    listen  [::]:8848;
    server_name  localhost;

    location / {
            proxy_pass http://nacos;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header REMOTE-HOST $remote_addr;
            add_header X-Cache $upstream_cache_status;
            add_header Cache-Control no-cache;
    }
}

When I use a browser to directly access http://localhost:8848/nacos, I can access the console normally; In addition, through the Spring Cloud Alibaba project(spring-cloud-alibaba/spring-cloud-alibaba-examples/nacos-example/nacos-discovery-provider-example), the Spring Boot application can also be registered on Nacos

image

I wanted to use Nacos as the registry and configuration center for Seata Server, but starting through Docker Compose failed

version: "3"
services:
  seata-server-1:
    image: seataio/seata-server:1.7.1-slim
    hostname: seata-server
    ports:
      - "8091:8091"
      - "7091:7091"
    networks:
      - public
    environment:
      - SEATA_PORT=8091
     # - SEATA_IP=192.168.0.181
    #  - SEATA_CONFIG_NAME=file:/seata-server/resources/registry.conf
    volumes:
      - "/Users/me/workspace/data/docker/seata/conf:/seata-server/resources"
      - "/Users/me/workspace/data/docker/seata/logs:/root/logs/seata"

networks:
  public:
    external: true
#  Copyright 1999-2019 Seata.io Group.
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.

server:
  port: 7091

spring:
  application:
    name: seata-server

logging:
  config: classpath:logback-spring.xml
  file:
    path: ${log.home:${user.home}/logs/seata}
  extend:
    logstash-appender:
      destination: 127.0.0.1:4560
    kafka-appender:
      bootstrap-servers: 127.0.0.1:9092
      topic: logback_to_logstash

console:
  user:
    username: seata
    password: seata
seata:
  config:
    # support: nacos, consul, apollo, zk, etcd3
    type: nacos
    nacos:
      server-addr: nacos1:8848
      namespace: 718668d4-2de9-46ed-b0d4-0f9a86afa18b
      data-id: seata-server.properties
      group: SEATA_GROUP
      username: nacos
      password: nacos
  registry:
    # support: nacos, eureka, redis, zk, consul, etcd3, sofa
    type: nacos
    nacos:
      application: seata-server
      server-addr: nacos1:8848
      group: SEATA_GROUP
      namespace: 718668d4-2de9-46ed-b0d4-0f9a86afa18b
      cluster: default
      username: nacos
      password: nacos
  store:
    # support: file 、 db 、 redis
    mode: db
#  server:
#    service-port: 8091 #If not configured, the default is '${server.port} + 1000'
  security:
    secretKey: SeataSecretKeyVGhpc0lzTXlDdXN0b21TZWNyZXRLZXkwMTIzNDU2Nzg=
    tokenValidityInMilliseconds: 1800000
    ignore:
      urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.jpeg,/**/*.ico,/api/v1/auth/login

The error message for starting the Seata Server is as follows:

2023-10-29 19:34:26 apm-skywalking not enabled
2023-10-29 19:34:26 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-29 19:34:27 ███████╗███████╗ █████╗ ████████╗ █████╗
2023-10-29 19:34:27 ██╔════╝██╔════╝██╔══██╗╚══██╔══╝██╔══██╗
2023-10-29 19:34:27 ███████╗█████╗  ███████║   ██║   ███████║
2023-10-29 19:34:27 ╚════██║██╔══╝  ██╔══██║   ██║   ██╔══██║
2023-10-29 19:34:27 ███████║███████╗██║  ██║   ██║   ██║  ██║
2023-10-29 19:34:27 ╚══════╝╚══════╝╚═╝  ╚═╝   ╚═╝   ╚═╝  ╚═╝
2023-10-29 19:34:27 
2023-10-29 19:34:27 
2023-10-29 19:34:27 19:34:27.779  INFO --- [                     main] [ta.config.ConfigurationFactory] [                load]  [] : load Configuration from :Spring Configuration
2023-10-29 19:34:27 19:34:27.804  INFO --- [                     main] [onfig.nacos.NacosConfiguration] [ getConfigProperties]  [] : Nacos check auth with userName/password.
2023-10-29 19:34:28 19:34:28.038  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-29 19:34:28 19:34:28.038  INFO --- [                     main] [seata.server.ServerApplication] [ogStartupProfileInfo]  [] : No active profile set, falling back to 1 default profile: "default"
2023-10-29 19:34:29 19:34:29.087  INFO --- [                     main] [mbedded.tomcat.TomcatWebServer] [          initialize]  [] : Tomcat initialized with port(s): 7091 (http)
2023-10-29 19:34:29 19:34:29.100  INFO --- [                     main] [oyote.http11.Http11NioProtocol] [                 log]  [] : Initializing ProtocolHandler ["http-nio-7091"]
2023-10-29 19:34:29 19:34:29.102  INFO --- [                     main] [.catalina.core.StandardService] [                 log]  [] : Starting service [Tomcat]
2023-10-29 19:34:29 19:34:29.102  INFO --- [                     main] [e.catalina.core.StandardEngine] [                 log]  [] : Starting Servlet engine: [Apache Tomcat/9.0.62]
2023-10-29 19:34:29 19:34:29.180  INFO --- [                     main] [rBase.[Tomcat].[localhost].[/]] [                 log]  [] : Initializing Spring embedded WebApplicationContext
2023-10-29 19:34:29 19:34:29.180  INFO --- [                     main] [letWebServerApplicationContext] [ebApplicationContext]  [] : Root WebApplicationContext: initialization completed in 1109 ms
2023-10-29 19:34:29 19:34:29.637  INFO --- [                     main] [vlet.WelcomePageHandlerMapping] [              <init>]  [] : Adding welcome page: class path resource [static/index.html]
2023-10-29 19:34:29 19:34:29.846  INFO --- [                     main] [oyote.http11.Http11NioProtocol] [                 log]  [] : Starting ProtocolHandler ["http-nio-7091"]
2023-10-29 19:34:29 19:34:29.860  INFO --- [                     main] [mbedded.tomcat.TomcatWebServer] [               start]  [] : Tomcat started on port(s): 7091 (http) with context path ''
2023-10-29 19:34:29 19:34:29.868  INFO --- [                     main] [seata.server.ServerApplication] [          logStarted]  [] : Started ServerApplication in 2.82 seconds (JVM running for 3.289)
2023-10-29 19:34:30 19:34:30.185  INFO --- [                     main] [a.server.session.SessionHolder] [                init]  [] : use session store mode: file
2023-10-29 19:34:30 19:34:30.211  INFO --- [                     main] [rver.lock.LockerManagerFactory] [                init]  [] : use lock store mode: file
2023-10-29 19:34:30 19:34:30.352  INFO --- [                     main] [rpc.netty.NettyServerBootstrap] [               start]  [] : Server started, service listen port: 8091
2023-10-29 19:34:30 19:34:30.577 ERROR --- [                     main] [io.seata.server.ServerRunner  ] [                 run]  [] : seata server start error: Server start failed 
2023-10-29 19:34:30 ==>
2023-10-29 19:34:30 java.lang.RuntimeException: Server start failed
2023-10-29 19:34:30 at io.seata.core.rpc.netty.NettyServerBootstrap.start(NettyServerBootstrap.java:179) ~[seata-core-1.7.1.jar:1.7.1]
2023-10-29 19:34:30 at io.seata.core.rpc.netty.AbstractNettyRemotingServer.init(AbstractNettyRemotingServer.java:56) ~[seata-core-1.7.1.jar:1.7.1]
2023-10-29 19:34:30 at io.seata.core.rpc.netty.NettyRemotingServer.init(NettyRemotingServer.java:61) ~[seata-core-1.7.1.jar:1.7.1]
2023-10-29 19:34:30 at io.seata.server.Server.start(Server.java:87) ~[classes/:na]
2023-10-29 19:34:30 at io.seata.server.ServerRunner.run(ServerRunner.java:60) ~[classes/:na]
2023-10-29 19:34:30 at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:812) [spring-boot-2.5.13.jar:2.5.13]
2023-10-29 19:34:30 at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:796) [spring-boot-2.5.13.jar:2.5.13]
2023-10-29 19:34:30 at org.springframework.boot.SpringApplication.run(SpringApplication.java:346) [spring-boot-2.5.13.jar:2.5.13]
2023-10-29 19:34:30 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1365) [spring-boot-2.5.13.jar:2.5.13]
2023-10-29 19:34:30 at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) [spring-boot-2.5.13.jar:2.5.13]
2023-10-29 19:34:30 at io.seata.server.ServerApplication.main(ServerApplication.java:31) [classes/:na]
2023-10-29 19:34:30 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-29 19:34:30 at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:556) ~[nacos-client-1.4.2.jar:na]
2023-10-29 19:34:30 at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:498) ~[nacos-client-1.4.2.jar:na]
2023-10-29 19:34:30 at com.alibaba.nacos.client.naming.net.NamingProxy.reqApi(NamingProxy.java:493) ~[nacos-client-1.4.2.jar:na]
2023-10-29 19:34:30 at com.alibaba.nacos.client.naming.net.NamingProxy.registerService(NamingProxy.java:246) ~[nacos-client-1.4.2.jar:na]
2023-10-29 19:34:30 at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:212) ~[nacos-client-1.4.2.jar:na]
2023-10-29 19:34:30 at com.alibaba.nacos.client.naming.NacosNamingService.registerInstance(NacosNamingService.java:196) ~[nacos-client-1.4.2.jar:na]
2023-10-29 19:34:30 at io.seata.discovery.registry.nacos.NacosRegistryServiceImpl.register(NacosRegistryServiceImpl.java:114) ~[seata-discovery-nacos-1.7.1.jar:1.7.1]
2023-10-29 19:34:30 at io.seata.core.rpc.netty.NettyServerBootstrap.start(NettyServerBootstrap.java:173) ~[seata-core-1.7.1.jar:1.7.1]
2023-10-29 19:34:30 ... 10 common frames omitted
2023-10-29 19:34:30 <==
2023-10-29 19:34:30 
2023-10-29 19:34:30 19:34:30.579  WARN --- [                Thread-11] [cos.common.notify.NotifyCenter] [            shutdown]  [] : [NotifyCenter] Start destroying Publisher
2023-10-29 19:34:30 19:34:30.580  WARN --- [                 Thread-1] [mmon.http.HttpClientBeanHolder] [            shutdown]  [] : [HttpClientBeanHolder] Start destroying common HttpClient
2023-10-29 19:34:30 19:34:30.580  WARN --- [                Thread-11] [cos.common.notify.NotifyCenter] [            shutdown]  [] : [NotifyCenter] Destruction of the end
2023-10-29 19:34:30 19:34:30.581  WARN --- [                 Thread-1] [mmon.http.HttpClientBeanHolder] [            shutdown]  [] : [HttpClientBeanHolder] Destruction of the end
2023-10-29 19:34:30 19:34:30.624  INFO --- [ngApplicationShutdownHook] [rpc.netty.NettyServerBootstrap] [            shutdown]  [] : Shutting server down, the listen port: 8091
ptyin commented 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.

seedscoder commented 1 year ago

@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
leizhiyuan commented 1 year ago

@seedscoder If it’s convenient, could you please provide the reason? This way, others can benefit from it.

ptyin commented 1 year ago

@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.