woodliu / raft-example

A raft example, support node discovery, request forward and observability
Other
1 stars 1 forks source link

Leaving GOMAXPROCS=2: CPU quota undefined #1

Open codecoron opened 3 months ago

codecoron commented 3 months ago

when i trying to run raft-example in my arm ubuntu vm,i get this trouble.

./raft --http-address 0.0.0.0:5000 --raft-address 192.168.0.105:6000 --rpc-address=0.0.0.0:7000 --serf-address 192.168.0.105:8000 --data-dir /node0 --bootstrap true
2024/07/01 10:00:40 Leaving GOMAXPROCS=2: CPU quota undefined
No help topic for 'true'

when i remove --bootstrap true , it seem to work successfully. i wonder how --bootstrap work?

image

leaving my arm ubuntu machine info.

uname -a
Linux node0 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:26:57 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
woodliu commented 3 months ago

Hi, @codecoron, thank you for posting the issue. The issue is caused by the wrong README, please start it with ./raft --http-address 0.0.0.0:5000 --raft-address 192.168.0.105:6000 --rpc-address=0.0.0.0:7000 --serf-address 192.168.0.105:8000 --data-dir /node0 --bootstrap

When use --bootstrap? The flag can be used when this is a new created cluster, and this node is the first started node of the cluster. When use this flag, it will: check if there is raft state(the raft configuration, include the data, peers .etc) in the data folder, if there is no state, it will bootstrap a new raft cluster, otherwise, it will start as a memeber of existed raft cluster.