docker-compose修改meta_server_addrs、local_ip、ws_ip为宿主机IP会无法选举或提示不允许配置宿主机IP的问题

提问参考模版:

  • nebula 版本:V3.2.0、V3.3.0
  • 部署方式:宿主机单机,使用docker-compose部署3个meta节点
  • 安装方式:Docker(docker-compose)
  • 是否为线上版本:Y / N
  • 硬件信息
    • 磁盘( 推荐使用 SSD)
    • CPU、内存信息
  • 问题的具体描述
    meta-test.yaml (2.7 KB)
    附件中的docker-compose配置文件基于Github中V3.3.0版本docker-compose配置文件修改而来,以下是对几种情况的说明:
    1、仅修改监听的端口时,集群可以启动并选举成功
    docker-compose.yaml部分配置:
  metad0:
    image: vesoft/nebula-metad:v3.3.0
    privileged: true
    container_name: nebula_metad0
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=metad0
      - --ws_ip=metad0
      - --port=9559
      - --ws_http_port=19559
    ...
  metad1:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad1
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=metad1
      - --ws_ip=metad1
      - --port=9569
      - --ws_http_port=19569
    ...
  metad2:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad2
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=1metad0:9559,metad1:9569,metad2:9579
      - --local_ip=metad2
      - --ws_ip=metad2
      - --port=9579
      - --ws_http_port=19579
    ...

启动后日志:
metad0:

Log file created at: 2022/11/03 05:52:55
Running on machine: 0072c3f7b3d1
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
I20221103 05:52:55.364564     1 MetaDaemon.cpp:137] localhost = "metad0":9559
I20221103 05:52:55.379048     1 NebulaStore.cpp:51] Start the raft service...
I20221103 05:52:55.379796     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 05:52:55.408669     1 RaftexService.cpp:46] Start raft service on 9560
I20221103 05:52:55.408869     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 05:52:55.408919     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 05:52:55.409462     1 NebulaStore.cpp:271] Init data from partManager for "metad0":9559
I20221103 05:52:55.409495     1 NebulaStore.cpp:387] Create data space 0
I20221103 05:52:55.448639     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 05:52:55.459609     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 05:52:55.459678     1 NebulaStore.cpp:78] Register handler...
I20221103 05:52:55.459693     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 05:52:55.459703     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 05:52:55.952325    58 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:55.953826    58 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:55.956544    59 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:55.957245    59 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:55.959575    60 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:55.960191    61 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:55.960779    60 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:55.961270    61 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:56.460011     1 KVBasedClusterIdMan.h:109] There is no clusterId existed in kvstore!
I20221103 05:52:56.460098     1 MetaDaemonInit.cpp:126] I am leader, create cluster Id
I20221103 05:52:56.460115     1 KVBasedClusterIdMan.h:36] Create ClusterId 5483944714920733148
I20221103 05:52:56.461488    62 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:56.462651    62 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:56.464144    43 KVBasedClusterIdMan.h:142] Put key __meta_cluster_id_key__, val 5483944714920733148
I20221103 05:52:56.464287     1 MetaDaemonInit.cpp:145] Get meta version is 3
I20221103 05:52:56.464325     1 MetaDaemonInit.cpp:162] Nebula store init succeeded, clusterId 5483944714920733148
I20221103 05:52:56.464340     1 MetaDaemon.cpp:150] Start http service
I20221103 05:52:56.464843     1 MetaDaemonInit.cpp:219] Starting Meta HTTP Service
I20221103 05:52:56.469525    97 WebService.cpp:124] Web service started on HTTP[19559]
I20221103 05:52:56.469902     1 JobManager.cpp:60] JobManager initialized
I20221103 05:52:56.469933   103 JobManager.cpp:136] JobManager::scheduleThread enter
I20221103 05:52:56.470041     1 MetaDaemonInit.cpp:185] Check root user
I20221103 05:52:56.470074     1 RootUserMan.h:40] God user is not exists
I20221103 05:52:56.470089     1 RootUserMan.h:58] Init root user
I20221103 05:52:56.471141    63 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:56.472304    63 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:56.484951     1 MetaDaemon.cpp:201] The meta daemon start on "metad0":9559
I20221103 05:52:57.823122    64 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570

metad1:

Log file created at: 2022/11/03 05:52:55
Running on machine: 60be93c12324
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
I20221103 05:52:55.385033     1 MetaDaemon.cpp:137] localhost = "metad1":9569
I20221103 05:52:55.399439     1 NebulaStore.cpp:51] Start the raft service...
I20221103 05:52:55.400303     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 05:52:55.425683     1 RaftexService.cpp:46] Start raft service on 9570
I20221103 05:52:55.425844     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 05:52:55.425880     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 05:52:55.426239     1 NebulaStore.cpp:271] Init data from partManager for "metad1":9569
I20221103 05:52:55.426256     1 NebulaStore.cpp:387] Create data space 0
I20221103 05:52:55.466558     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 05:52:55.477401     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 05:52:55.477460     1 NebulaStore.cpp:78] Register handler...
I20221103 05:52:55.477476     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 05:52:55.477488     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 05:52:56.477711     1 MetaDaemonInit.cpp:145] Get meta version is 3
I20221103 05:52:56.477820     1 MetaDaemonInit.cpp:162] Nebula store init succeeded, clusterId 5483944714920733148
I20221103 05:52:56.477836     1 MetaDaemon.cpp:150] Start http service
I20221103 05:52:56.478349     1 MetaDaemonInit.cpp:219] Starting Meta HTTP Service
I20221103 05:52:56.483130    97 WebService.cpp:124] Web service started on HTTP[19569]
I20221103 05:52:56.483333     1 JobManager.cpp:74] Not leader, skip reading remaining jobs
I20221103 05:52:56.483525     1 JobManager.cpp:60] JobManager initialized
I20221103 05:52:56.483556   103 JobManager.cpp:136] JobManager::scheduleThread enter
I20221103 05:52:56.483608     1 MetaDaemonInit.cpp:185] Check root user
I20221103 05:52:56.483659     1 RootUserMan.h:40] God user is not exists
I20221103 05:52:56.492540     1 MetaDaemon.cpp:201] The meta daemon start on "metad1":9569

metad2:

Log file created at: 2022/11/03 05:52:55
Running on machine: f02c84f59274
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
I20221103 05:52:55.288565     1 MetaDaemon.cpp:137] localhost = "metad2":9579
I20221103 05:52:55.304672     1 NebulaStore.cpp:51] Start the raft service...
I20221103 05:52:55.305555     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 05:52:55.335666     1 RaftexService.cpp:46] Start raft service on 9580
I20221103 05:52:55.336086     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 05:52:55.336170     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 05:52:55.336930     1 NebulaStore.cpp:271] Init data from partManager for "metad2":9579
I20221103 05:52:55.336966     1 NebulaStore.cpp:387] Create data space 0
I20221103 05:52:55.409549     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 05:52:55.420691     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 05:52:55.420831     1 NebulaStore.cpp:78] Register handler...
I20221103 05:52:55.420855     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 05:52:55.420871     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 05:52:56.421061     1 KVBasedClusterIdMan.h:109] There is no clusterId existed in kvstore!
I20221103 05:52:56.421145     1 MetaDaemonInit.cpp:134] I am follower, wait for the leader's clusterId
I20221103 05:52:56.421157     1 MetaDaemonInit.cpp:136] Waiting for the leader's clusterId
I20221103 05:52:57.421417     1 MetaDaemonInit.cpp:145] Get meta version is 3
I20221103 05:52:57.421499     1 MetaDaemonInit.cpp:162] Nebula store init succeeded, clusterId 5483944714920733148
I20221103 05:52:57.421514     1 MetaDaemon.cpp:150] Start http service
I20221103 05:52:57.422117     1 MetaDaemonInit.cpp:219] Starting Meta HTTP Service
I20221103 05:52:57.426306    97 WebService.cpp:124] Web service started on HTTP[19579]
I20221103 05:52:57.426453     1 JobManager.cpp:74] Not leader, skip reading remaining jobs
I20221103 05:52:57.426585     1 JobManager.cpp:60] JobManager initialized
I20221103 05:52:57.426617   103 JobManager.cpp:136] JobManager::scheduleThread enter
I20221103 05:52:57.426654     1 MetaDaemonInit.cpp:185] Check root user
I20221103 05:52:57.426774     1 RootUserMan.h:40] God user is not exists
I20221103 05:52:57.435431     1 MetaDaemon.cpp:201] The meta daemon start on "metad2":9579

2、修改监听端口,且将local_ip、ws_ip设置为宿主机IP,此时会启动失败,并提示宿主机IP不是当前主机的有效IP
docker-compose.yaml部分配置:

  metad0:
    image: vesoft/nebula-metad:v3.3.0
    privileged: true
    container_name: nebula_metad0
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=172.16.50.56
      - --ws_ip=172.16.50.56
      - --port=9559
      - --ws_http_port=19559
    ...
  metad1:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad1
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=172.16.50.56
      - --ws_ip=172.16.50.56
      - --port=9569
      - --ws_http_port=19569
    ...
  metad2:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad2
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=172.16.50.56
      - --ws_ip=172.16.50.56
      - --port=9579
      - --ws_http_port=19579
    ...

启动后日志:
metad0:

Log file created at: 2022/11/03 07:31:06
Running on machine: 1d67b124dd1f
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
E20221103 07:31:06.327914     1 MetaDaemon.cpp:131] 172.16.50.56 is not a valid ip in current host, candidates: 172.22.0.4,127.0.0.1

metad1:

Log file created at: 2022/11/03 07:31:05
Running on machine: 4d8f7180d952
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
E20221103 07:31:05.634927     1 MetaDaemon.cpp:131] 172.16.50.56 is not a valid ip in current host, candidates: 172.22.0.3,127.0.0.1

metad2:

Log file created at: 2022/11/03 07:31:05
Running on machine: b1b630df9bcb
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
E20221103 07:31:05.529847     1 MetaDaemon.cpp:131] 172.16.50.56 is not a valid ip in current host, candidates: 172.22.0.2,127.0.0.1

3、修改监听端口,不修改local_ip、ws_ip,但将meta_server_addrs中的IP设置为宿主机IP,会无法完成选举
docker-compose.yaml部分配置:

  metad0:
    image: vesoft/nebula-metad:v3.3.0
    privileged: true
    container_name: nebula_metad0
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=172.16.50.56:9559,172.16.50.56:9569,172.16.50.56:9579
      - --local_ip=metad0
      - --ws_ip=metad0
      - --port=9559
      - --ws_http_port=19559
    ...
  metad1:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad1
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=172.16.50.56:9559,172.16.50.56:9569,172.16.50.56:9579
      - --local_ip=metad1
      - --ws_ip=metad1
      - --port=9569
      - --ws_http_port=19569
    ...
  metad2:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad2
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=172.16.50.56:9559,172.16.50.56:9569,172.16.50.56:9579
      - --local_ip=metad2
      - --ws_ip=metad2
      - --port=9579
      - --ws_http_port=19579
    ...

启动后日志:
metad0:

I20221103 07:47:23.019814     1 MetaDaemon.cpp:137] localhost = "metad0":9559
I20221103 07:47:23.035113     1 NebulaStore.cpp:51] Start the raft service...
I20221103 07:47:23.036267     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 07:47:23.061661     1 RaftexService.cpp:46] Start raft service on 9560
I20221103 07:47:23.061827     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 07:47:23.061873     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 07:47:23.062319     1 NebulaStore.cpp:271] Init data from partManager for "metad0":9559
I20221103 07:47:23.062341     1 NebulaStore.cpp:387] Create data space 0
I20221103 07:47:23.097232     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 07:47:23.108716     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 07:47:23.108882     1 NebulaStore.cpp:78] Register handler...
I20221103 07:47:23.108903     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 07:47:23.108918     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:24.109084     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:25.109417     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:26.109652     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:27.109870     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:28.110138     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:29.110378     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...
I20221103 07:49:34.142464     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:49:35.142676     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
*** Aborted at 1667461775 (Unix time, try 'date -d @1667461775') ***
*** Signal 15 (SIGTERM) (0x0) received by PID 1 (pthread TID 0x7fa9d13c40c0) (linux TID 1) (maybe from PID 0, UID 0) (code: 0), stack trace: ***
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer17getStackTraceSafeEPmm+0x31)[0x2532f51]
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb+0x26)[0x252a456]
/usr/local/nebula/bin/nebula-metad[0x25283e7]
/lib64/libpthread.so.0(+0xf62f)[0x7fa9d087d62f]
/lib64/libc.so.6(nanosleep+0x2d)[0x7fa9d056585d]
/lib64/libc.so.6(sleep+0xd3)[0x7fa9d05656f3]
/usr/local/nebula/bin/nebula-metad(_Z6initKVSt6vectorIN6nebula8HostAddrESaIS1_EES1_+0x819)[0x1152c59]
/usr/local/nebula/bin/nebula-metad(main+0x8e2)[0x1103ab2]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x7fa9d04c2554]
/usr/local/nebula/bin/nebula-metad[0x114124d]
(safe mode, symbolizer not available)
I20221103 07:49:36.039155     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:49:37.039471     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...

metad1:

I20221103 07:47:22.910059     1 MetaDaemon.cpp:137] localhost = "metad0":9569
I20221103 07:47:22.927635     1 NebulaStore.cpp:51] Start the raft service...
I20221103 07:47:22.928370     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 07:47:22.954931     1 RaftexService.cpp:46] Start raft service on 9570
I20221103 07:47:22.955211     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 07:47:22.955261     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 07:47:22.955868     1 NebulaStore.cpp:271] Init data from partManager for "metad0":9569
I20221103 07:47:22.955904     1 NebulaStore.cpp:387] Create data space 0
I20221103 07:47:23.001088     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 07:47:23.012598     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 07:47:23.012696     1 NebulaStore.cpp:78] Register handler...
I20221103 07:47:23.012717     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 07:47:23.012771     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:24.015769     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:25.016069     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:26.016304     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...
I20221103 07:49:34.050483     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:49:35.050704     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
*** Aborted at 1667461776 (Unix time, try 'date -d @1667461776') ***
*** Signal 15 (SIGTERM) (0x0) received by PID 1 (pthread TID 0x7f22ff38a0c0) (linux TID 1) (maybe from PID 0, UID 0) (code: 0), stack trace: ***
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer17getStackTraceSafeEPmm+0x31)[0x2532f51]
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb+0x26)[0x252a456]
/usr/local/nebula/bin/nebula-metad[0x25283e7]
/lib64/libpthread.so.0(+0xf62f)[0x7f22fe84362f]
/lib64/libc.so.6(nanosleep+0x2d)[0x7f22fe52b85d]
/lib64/libc.so.6(sleep+0xd3)[0x7f22fe52b6f3]
/usr/local/nebula/bin/nebula-metad(_Z6initKVSt6vectorIN6nebula8HostAddrESaIS1_EES1_+0x819)[0x1152c59]
/usr/local/nebula/bin/nebula-metad(main+0x8e2)[0x1103ab2]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x7f22fe488554]
/usr/local/nebula/bin/nebula-metad[0x114124d]
(safe mode, symbolizer not available)
I20221103 07:49:36.042485     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:49:37.042711     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:49:38.042959     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...

metad2:

I20221103 07:47:23.050781     1 MetaDaemon.cpp:137] localhost = "metad0":9579
I20221103 07:47:23.066309     1 NebulaStore.cpp:51] Start the raft service...
I20221103 07:47:23.067160     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 07:47:23.092676     1 RaftexService.cpp:46] Start raft service on 9580
I20221103 07:47:23.092900     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 07:47:23.092957     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 07:47:23.093487     1 NebulaStore.cpp:271] Init data from partManager for "metad0":9579
I20221103 07:47:23.093524     1 NebulaStore.cpp:387] Create data space 0
I20221103 07:47:23.158695     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 07:47:23.170003     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 07:47:23.170081     1 NebulaStore.cpp:78] Register handler...
I20221103 07:47:23.170101     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 07:47:23.170115     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:24.170285     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:25.170512     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:47:26.170756     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...
I20221103 07:49:34.207149     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:49:35.207394     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
*** Aborted at 1667461775 (Unix time, try 'date -d @1667461775') ***
*** Signal 15 (SIGTERM) (0x0) received by PID 1 (pthread TID 0x7fb1d7b490c0) (linux TID 1) (maybe from PID 0, UID 0) (code: 0), stack trace: ***
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer17getStackTraceSafeEPmm+0x31)[0x2532f51]
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb+0x26)[0x252a456]
/usr/local/nebula/bin/nebula-metad[0x25283e7]
/lib64/libpthread.so.0(+0xf62f)[0x7fb1d700262f]
/lib64/libc.so.6(nanosleep+0x2d)[0x7fb1d6cea85d]
/lib64/libc.so.6(sleep+0xd3)[0x7fb1d6cea6f3]
/usr/local/nebula/bin/nebula-metad(_Z6initKVSt6vectorIN6nebula8HostAddrESaIS1_EES1_+0x819)[0x1152c59]
/usr/local/nebula/bin/nebula-metad(main+0x8e2)[0x1103ab2]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x7fb1d6c47554]
/usr/local/nebula/bin/nebula-metad[0x114124d]
(safe mode, symbolizer not available)
I20221103 07:49:36.042439     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 07:49:37.042637     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...

第一个成功案例的compose文件中有个meta_server_addrs我写错了,然后第三个案例的local_ip、ws_ip写的有错误,不过不影响结果,以下是重新修正后的3个测试结果样例:

附件中的docker-compose配置文件基于Github中V3.3.0版本docker-compose配置文件修改而来,以下是对几种情况的说明:
1、仅修改监听的端口时,集群可以启动并选举成功
docker-compose.yaml部分配置:

  metad0:
    image: vesoft/nebula-metad:v3.3.0
    privileged: true
    container_name: nebula_metad0
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=metad0
      - --ws_ip=metad0
      - --port=9559
      - --ws_http_port=19559
    ...
  metad1:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad1
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=metad1
      - --ws_ip=metad1
      - --port=9569
      - --ws_http_port=19569
    ...
  metad2:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad2
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=metad2
      - --ws_ip=metad2
      - --port=9579
      - --ws_http_port=19579
    ...

启动后日志:
metad0:

Log file created at: 2022/11/03 05:52:55
Running on machine: 0072c3f7b3d1
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
I20221103 05:52:55.364564     1 MetaDaemon.cpp:137] localhost = "metad0":9559
I20221103 05:52:55.379048     1 NebulaStore.cpp:51] Start the raft service...
I20221103 05:52:55.379796     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 05:52:55.408669     1 RaftexService.cpp:46] Start raft service on 9560
I20221103 05:52:55.408869     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 05:52:55.408919     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 05:52:55.409462     1 NebulaStore.cpp:271] Init data from partManager for "metad0":9559
I20221103 05:52:55.409495     1 NebulaStore.cpp:387] Create data space 0
I20221103 05:52:55.448639     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 05:52:55.459609     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 05:52:55.459678     1 NebulaStore.cpp:78] Register handler...
I20221103 05:52:55.459693     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 05:52:55.459703     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 05:52:55.952325    58 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:55.953826    58 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:55.956544    59 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:55.957245    59 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:55.959575    60 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:55.960191    61 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:55.960779    60 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:55.961270    61 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:56.460011     1 KVBasedClusterIdMan.h:109] There is no clusterId existed in kvstore!
I20221103 05:52:56.460098     1 MetaDaemonInit.cpp:126] I am leader, create cluster Id
I20221103 05:52:56.460115     1 KVBasedClusterIdMan.h:36] Create ClusterId 5483944714920733148
I20221103 05:52:56.461488    62 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:56.462651    62 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:56.464144    43 KVBasedClusterIdMan.h:142] Put key __meta_cluster_id_key__, val 5483944714920733148
I20221103 05:52:56.464287     1 MetaDaemonInit.cpp:145] Get meta version is 3
I20221103 05:52:56.464325     1 MetaDaemonInit.cpp:162] Nebula store init succeeded, clusterId 5483944714920733148
I20221103 05:52:56.464340     1 MetaDaemon.cpp:150] Start http service
I20221103 05:52:56.464843     1 MetaDaemonInit.cpp:219] Starting Meta HTTP Service
I20221103 05:52:56.469525    97 WebService.cpp:124] Web service started on HTTP[19559]
I20221103 05:52:56.469902     1 JobManager.cpp:60] JobManager initialized
I20221103 05:52:56.469933   103 JobManager.cpp:136] JobManager::scheduleThread enter
I20221103 05:52:56.470041     1 MetaDaemonInit.cpp:185] Check root user
I20221103 05:52:56.470074     1 RootUserMan.h:40] God user is not exists
I20221103 05:52:56.470089     1 RootUserMan.h:58] Init root user
I20221103 05:52:56.471141    63 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570
I20221103 05:52:56.472304    63 ThriftClientManager-inl.h:67] resolve "metad2":9580 as "172.22.0.2":9580
I20221103 05:52:56.484951     1 MetaDaemon.cpp:201] The meta daemon start on "metad0":9559
I20221103 05:52:57.823122    64 ThriftClientManager-inl.h:67] resolve "metad1":9570 as "172.22.0.4":9570

metad1:

Log file created at: 2022/11/03 05:52:55
Running on machine: 60be93c12324
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
I20221103 05:52:55.385033     1 MetaDaemon.cpp:137] localhost = "metad1":9569
I20221103 05:52:55.399439     1 NebulaStore.cpp:51] Start the raft service...
I20221103 05:52:55.400303     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 05:52:55.425683     1 RaftexService.cpp:46] Start raft service on 9570
I20221103 05:52:55.425844     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 05:52:55.425880     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 05:52:55.426239     1 NebulaStore.cpp:271] Init data from partManager for "metad1":9569
I20221103 05:52:55.426256     1 NebulaStore.cpp:387] Create data space 0
I20221103 05:52:55.466558     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 05:52:55.477401     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 05:52:55.477460     1 NebulaStore.cpp:78] Register handler...
I20221103 05:52:55.477476     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 05:52:55.477488     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 05:52:56.477711     1 MetaDaemonInit.cpp:145] Get meta version is 3
I20221103 05:52:56.477820     1 MetaDaemonInit.cpp:162] Nebula store init succeeded, clusterId 5483944714920733148
I20221103 05:52:56.477836     1 MetaDaemon.cpp:150] Start http service
I20221103 05:52:56.478349     1 MetaDaemonInit.cpp:219] Starting Meta HTTP Service
I20221103 05:52:56.483130    97 WebService.cpp:124] Web service started on HTTP[19569]
I20221103 05:52:56.483333     1 JobManager.cpp:74] Not leader, skip reading remaining jobs
I20221103 05:52:56.483525     1 JobManager.cpp:60] JobManager initialized
I20221103 05:52:56.483556   103 JobManager.cpp:136] JobManager::scheduleThread enter
I20221103 05:52:56.483608     1 MetaDaemonInit.cpp:185] Check root user
I20221103 05:52:56.483659     1 RootUserMan.h:40] God user is not exists
I20221103 05:52:56.492540     1 MetaDaemon.cpp:201] The meta daemon start on "metad1":9569

metad2:

Log file created at: 2022/11/03 05:52:55
Running on machine: f02c84f59274
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
I20221103 05:52:55.288565     1 MetaDaemon.cpp:137] localhost = "metad2":9579
I20221103 05:52:55.304672     1 NebulaStore.cpp:51] Start the raft service...
I20221103 05:52:55.305555     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 05:52:55.335666     1 RaftexService.cpp:46] Start raft service on 9580
I20221103 05:52:55.336086     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 05:52:55.336170     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 05:52:55.336930     1 NebulaStore.cpp:271] Init data from partManager for "metad2":9579
I20221103 05:52:55.336966     1 NebulaStore.cpp:387] Create data space 0
I20221103 05:52:55.409549     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 05:52:55.420691     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 05:52:55.420831     1 NebulaStore.cpp:78] Register handler...
I20221103 05:52:55.420855     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 05:52:55.420871     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 05:52:56.421061     1 KVBasedClusterIdMan.h:109] There is no clusterId existed in kvstore!
I20221103 05:52:56.421145     1 MetaDaemonInit.cpp:134] I am follower, wait for the leader's clusterId
I20221103 05:52:56.421157     1 MetaDaemonInit.cpp:136] Waiting for the leader's clusterId
I20221103 05:52:57.421417     1 MetaDaemonInit.cpp:145] Get meta version is 3
I20221103 05:52:57.421499     1 MetaDaemonInit.cpp:162] Nebula store init succeeded, clusterId 5483944714920733148
I20221103 05:52:57.421514     1 MetaDaemon.cpp:150] Start http service
I20221103 05:52:57.422117     1 MetaDaemonInit.cpp:219] Starting Meta HTTP Service
I20221103 05:52:57.426306    97 WebService.cpp:124] Web service started on HTTP[19579]
I20221103 05:52:57.426453     1 JobManager.cpp:74] Not leader, skip reading remaining jobs
I20221103 05:52:57.426585     1 JobManager.cpp:60] JobManager initialized
I20221103 05:52:57.426617   103 JobManager.cpp:136] JobManager::scheduleThread enter
I20221103 05:52:57.426654     1 MetaDaemonInit.cpp:185] Check root user
I20221103 05:52:57.426774     1 RootUserMan.h:40] God user is not exists
I20221103 05:52:57.435431     1 MetaDaemon.cpp:201] The meta daemon start on "metad2":9579

2、修改监听端口,且将local_ip、ws_ip设置为宿主机IP,此时会启动失败,并提示宿主机IP不是当前主机的有效IP
docker-compose.yaml部分配置:

  metad0:
    image: vesoft/nebula-metad:v3.3.0
    privileged: true
    container_name: nebula_metad0
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=172.16.50.56
      - --ws_ip=172.16.50.56
      - --port=9559
      - --ws_http_port=19559
    ...
  metad1:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad1
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=172.16.50.56
      - --ws_ip=172.16.50.56
      - --port=9569
      - --ws_http_port=19569
    ...
  metad2:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad2
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9569,metad2:9579
      - --local_ip=172.16.50.56
      - --ws_ip=172.16.50.56
      - --port=9579
      - --ws_http_port=19579
    ...

启动后日志:
metad0:

Log file created at: 2022/11/03 07:31:06
Running on machine: 1d67b124dd1f
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
E20221103 07:31:06.327914     1 MetaDaemon.cpp:131] 172.16.50.56 is not a valid ip in current host, candidates: 172.22.0.4,127.0.0.1

metad1:

Log file created at: 2022/11/03 07:31:05
Running on machine: 4d8f7180d952
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
E20221103 07:31:05.634927     1 MetaDaemon.cpp:131] 172.16.50.56 is not a valid ip in current host, candidates: 172.22.0.3,127.0.0.1

metad2:

Log file created at: 2022/11/03 07:31:05
Running on machine: b1b630df9bcb
Running duration (h:mm:ss): 0:00:00
Log line format: [IWEF]yyyymmdd hh:mm:ss.uuuuuu threadid file:line] msg
E20221103 07:31:05.529847     1 MetaDaemon.cpp:131] 172.16.50.56 is not a valid ip in current host, candidates: 172.22.0.2,127.0.0.1

3、修改监听端口,不修改local_ip、ws_ip,但将meta_server_addrs中的IP设置为宿主机IP,会无法完成选举
docker-compose.yaml部分配置:

  metad0:
    image: vesoft/nebula-metad:v3.3.0
    privileged: true
    container_name: nebula_metad0
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=172.16.50.56:9559,172.16.50.56:9569,172.16.50.56:9579
      - --local_ip=metad0
      - --ws_ip=metad0
      - --port=9559
      - --ws_http_port=19559
    ...
  metad1:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad1
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=172.16.50.56:9559,172.16.50.56:9569,172.16.50.56:9579
      - --local_ip=metad1
      - --ws_ip=metad1
      - --port=9569
      - --ws_http_port=19569
    ...
  metad2:
    image: vesoft/nebula-metad:v3.3.0
    container_name: nebula_metad2
    privileged: true
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=172.16.50.56:9559,172.16.50.56:9569,172.16.50.56:9579
      - --local_ip=metad2
      - --ws_ip=metad2
      - --port=9579
      - --ws_http_port=19579
    ...

启动后日志:
metad0:

I20221103 08:01:55.825546     1 MetaDaemon.cpp:137] localhost = "metad0":9559
I20221103 08:01:55.840965     1 NebulaStore.cpp:51] Start the raft service...
I20221103 08:01:55.841959     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 08:01:55.869691     1 RaftexService.cpp:46] Start raft service on 9560
I20221103 08:01:55.869915     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 08:01:55.869966     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 08:01:55.870554     1 NebulaStore.cpp:271] Init data from partManager for "metad0":9559
I20221103 08:01:55.870587     1 NebulaStore.cpp:387] Create data space 0
I20221103 08:01:55.931102     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 08:01:55.942299     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 08:01:55.942381     1 NebulaStore.cpp:78] Register handler...
I20221103 08:01:55.942402     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 08:01:55.942417     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:01:56.942603     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:01:57.942792     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:01:58.943069     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...
I20221103 08:03:38.968501     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:03:39.968706     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
*** Aborted at 1667462620 (Unix time, try 'date -d @1667462620') ***
*** Signal 15 (SIGTERM) (0x0) received by PID 1 (pthread TID 0x7f082252b0c0) (linux TID 1) (maybe from PID 0, UID 0) (code: 0), stack trace: ***
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer17getStackTraceSafeEPmm+0x31)[0x2532f51]
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb+0x26)[0x252a456]
/usr/local/nebula/bin/nebula-metad[0x25283e7]
/lib64/libpthread.so.0(+0xf62f)[0x7f08219e462f]
/lib64/libc.so.6(nanosleep+0x2d)[0x7f08216cc85d]
/lib64/libc.so.6(sleep+0xd3)[0x7f08216cc6f3]
/usr/local/nebula/bin/nebula-metad(_Z6initKVSt6vectorIN6nebula8HostAddrESaIS1_EES1_+0x819)[0x1152c59]
/usr/local/nebula/bin/nebula-metad(main+0x8e2)[0x1103ab2]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x7f0821629554]
/usr/local/nebula/bin/nebula-metad[0x114124d]
(safe mode, symbolizer not available)
I20221103 08:03:40.873911     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:03:41.874193     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...

metad1:

I20221103 08:01:55.715914     1 MetaDaemon.cpp:137] localhost = "metad1":9569
I20221103 08:01:55.732647     1 NebulaStore.cpp:51] Start the raft service...
I20221103 08:01:55.734603     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 08:01:55.761842     1 RaftexService.cpp:46] Start raft service on 9570
I20221103 08:01:55.762050     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 08:01:55.762104     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 08:01:55.762825     1 NebulaStore.cpp:271] Init data from partManager for "metad1":9569
I20221103 08:01:55.762868     1 NebulaStore.cpp:387] Create data space 0
I20221103 08:01:55.838248     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 08:01:55.849454     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 08:01:55.849541     1 NebulaStore.cpp:78] Register handler...
I20221103 08:01:55.849562     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 08:01:55.849576     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:01:56.849747     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:01:57.850101     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:01:58.850313     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...
I20221103 08:03:38.875092     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:03:39.875404     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
*** Aborted at 1667462620 (Unix time, try 'date -d @1667462620') ***
*** Signal 15 (SIGTERM) (0x0) received by PID 1 (pthread TID 0x7fd2058f30c0) (linux TID 1) (maybe from PID 0, UID 0) (code: 0), stack trace: ***
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer17getStackTraceSafeEPmm+0x31)[0x2532f51]
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb+0x26)[0x252a456]
/usr/local/nebula/bin/nebula-metad[0x25283e7]
/lib64/libpthread.so.0(+0xf62f)[0x7fd204dac62f]
/lib64/libc.so.6(nanosleep+0x2d)[0x7fd204a9485d]
/lib64/libc.so.6(sleep+0xd3)[0x7fd204a946f3]
/usr/local/nebula/bin/nebula-metad(_Z6initKVSt6vectorIN6nebula8HostAddrESaIS1_EES1_+0x819)[0x1152c59]
/usr/local/nebula/bin/nebula-metad(main+0x8e2)[0x1103ab2]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x7fd2049f1554]
/usr/local/nebula/bin/nebula-metad[0x114124d]
(safe mode, symbolizer not available)
I20221103 08:03:40.875551     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:03:41.875777     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...

metad2:

I20221103 08:01:55.796653     1 MetaDaemon.cpp:137] localhost = "metad2":9579
I20221103 08:01:55.814049     1 NebulaStore.cpp:51] Start the raft service...
I20221103 08:01:55.815425     1 NebulaSnapshotManager.cpp:25] Send snapshot is rate limited to 10485760 for each part by default
I20221103 08:01:55.842710     1 RaftexService.cpp:46] Start raft service on 9580
I20221103 08:01:55.842876     1 NebulaStore.cpp:85] Scan the local path, and init the spaces_
E20221103 08:01:55.842917     1 FileUtils.cpp:377] Failed to read the directory "/data/meta/nebula" (2): No such file or directory
I20221103 08:01:55.843339     1 NebulaStore.cpp:271] Init data from partManager for "metad2":9579
I20221103 08:01:55.843364     1 NebulaStore.cpp:387] Create data space 0
I20221103 08:01:55.930805     1 RocksEngine.cpp:97] open rocksdb on /data/meta/nebula/0/data
I20221103 08:01:55.942378     1 NebulaStore.cpp:459] Space 0, part 0 has been added, asLearner 0
I20221103 08:01:55.942454     1 NebulaStore.cpp:78] Register handler...
I20221103 08:01:55.942473     1 MetaDaemonInit.cpp:106] Waiting for the leader elected...
I20221103 08:01:55.942487     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:01:56.942631     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:01:57.942822     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:01:58.943059     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...
I20221103 08:03:38.968443     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:03:39.968703     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
*** Aborted at 1667462620 (Unix time, try 'date -d @1667462620') ***
*** Signal 15 (SIGTERM) (0x0) received by PID 1 (pthread TID 0x7f0a6be140c0) (linux TID 1) (maybe from PID 0, UID 0) (code: 0), stack trace: ***
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer17getStackTraceSafeEPmm+0x31)[0x2532f51]
/usr/local/nebula/bin/nebula-metad(_ZN5folly10symbolizer21SafeStackTracePrinter15printStackTraceEb+0x26)[0x252a456]
/usr/local/nebula/bin/nebula-metad[0x25283e7]
/lib64/libpthread.so.0(+0xf62f)[0x7f0a6b2cd62f]
/lib64/libc.so.6(nanosleep+0x2d)[0x7f0a6afb585d]
/lib64/libc.so.6(sleep+0xd3)[0x7f0a6afb56f3]
/usr/local/nebula/bin/nebula-metad(_Z6initKVSt6vectorIN6nebula8HostAddrESaIS1_EES1_+0x819)[0x1152c59]
/usr/local/nebula/bin/nebula-metad(main+0x8e2)[0x1103ab2]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x7f0a6af12554]
/usr/local/nebula/bin/nebula-metad[0x114124d]
(safe mode, symbolizer not available)
I20221103 08:03:40.880121     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
I20221103 08:03:41.880322     1 MetaDaemonInit.cpp:118] Leader has not been elected, sleep 1s
...

前期推荐用云吧