I have created 3 node consul servers and 1 node agent for on premise setup, and few more agent node to join.
to make the number 3 I used raspberry pi 0 , on which I had to used the consul version 1.5.3 as past this version the consul binaries are crashing with Illegal Instruct or segmentation fault error.
since this version of consul worked and all other nodes have the latest versions
==> Starting Consul agent...
Version: 'v1.5.3'
Node ID: '2b8c1d1f-daa3-3719-de1a-1cff592a673c'
Node name: 'pizero'
Datacenter: 'nyc' (Segment: '<all>')
Server: true (Bootstrap: false)
Client Addr: [0.0.0.0] (HTTP: 8500, HTTPS: -1, gRPC: -1, DNS: 8600)
Cluster Addr: 192.168.1.46 (LAN: 8301, WAN: 8302)
Encrypt: Gossip: false, TLS-Outgoing: false, TLS-Incoming: false, Auto-Encrypt-TLS: false
==> Log data will now stream in as it occurs:
2021/11/07 13:19:40 [INFO] raft: Initial configuration (index=3742): [{Suffrage:Voter ID:79321fb9-b766-8b1b-3915-0991c9f8750d Address:192.168.1.
raft: Initial configuration (index=3742): [{Suffrage:Voter ID:79321fb9-b766-8b1b-3915-0991c9f8750d Address:192.168.1.11:8300} {Suffrage:Voter ID:bce
2021/11/07 13:19:40 [INFO] raft: Node at 192.168.1.46:8300 [Follower] entering Follower state (Leader: "")
raft: Node at 192.168.1.46:8300 [Follower] entering Follower state (Leader: "")
2021/11/07 13:19:40 [INFO] serf: EventMemberJoin: pizero.nyc 192.168.1.46
serf: EventMemberJoin: pizero.nyc 192.168.1.46
2021/11/07 13:19:40 [INFO] serf: Attempting re-join to previously known node: rockpix.nyc: 192.168.1.11:8302
serf: Attempting re-join to previously known node: rockpix.nyc: 192.168.1.11:8302
2021/11/07 13:19:40 [INFO] serf: EventMemberJoin: pizero 192.168.1.46
serf: EventMemberJoin: pizero 192.168.1.46
2021/11/07 13:19:40 [INFO] agent: Started DNS server 0.0.0.0:8600 (udp)
agent: Started DNS server 0.0.0.0:8600 (udp)
2021/11/07 13:19:40 [INFO] agent: Started DNS server 0.0.0.0:8600 (tcp)
agent: Started DNS server 0.0.0.0:8600 (tcp)
2021/11/07 13:19:40 [INFO] agent: Started HTTP server on [::]:8500 (tcp)
agent: Started HTTP server on [::]:8500 (tcp)
2021/11/07 13:19:40 [INFO] agent: started state syncer
agent: started state syncer
==> Consul agent running!
2021/11/07 13:19:40 [INFO] serf: Attempting re-join to previously known node: rockpix: 192.168.1.11:8301
serf: Attempting re-join to previously known node: rockpix: 192.168.1.11:8301
2021/11/07 13:19:40 [INFO] agent: Retry join LAN is supported for: aliyun aws azure digitalocean gce k8s mdns os packet scaleway softlayer triton
2021/11/07 13:19:40 [INFO] agent: Joining LAN cluster...
2021/11/07 13:19:40 [INFO] agent: (LAN) joining: [192.168.1.11 192.168.1.40]
agent: Retry join LAN is supported for: aliyun aws azure digitalocean gce k8s mdns os packet scaleway softlayer triton vsphere
2021/11/07 13:19:40 [INFO] consul: Adding LAN server pizero (Addr: tcp/192.168.1.46:8300) (DC: nyc)
2021/11/07 13:19:40 [INFO] consul: Raft data found, disabling bootstrap mode
2021/11/07 13:19:40 [INFO] consul: Handled member-join event for server "pizero.nyc" in area "wan"
agent: Joining LAN cluster...
2021/11/07 13:19:40 [WARN] memberlist: Refuting a suspect message (from: pizero.nyc)
2021/11/07 13:19:40 [INFO] serf: EventMemberJoin: rockpix.nyc 192.168.1.11
agent: (LAN) joining: [192.168.1.11 192.168.1.40]
consul: Adding LAN server pizero (Addr: tcp/192.168.1.46:8300) (DC: nyc)
consul: Raft data found, disabling bootstrap mode
2021/11/07 13:19:40 [INFO] serf: EventMemberJoin: rockpro64.nyc 192.168.1.40
2021/11/07 13:19:40 [INFO] serf: Re-joined to previously known node: rockpix.nyc: 192.168.1.11:8302
2021/11/07 13:19:40 [INFO] consul: Handled member-join event for server "rockpix.nyc" in area "wan"
2021/11/07 13:19:40 [INFO] consul: Handled member-join event for server "rockpro64.nyc" in area "wan"
consul: Handled member-join event for server "pizero.nyc" in area "wan"
memberlist: Refuting a suspect message (from: pizero.nyc)
serf: EventMemberJoin: rockpix.nyc 192.168.1.11
serf: EventMemberJoin: rockpro64.nyc 192.168.1.40
serf: Re-joined to previously known node: rockpix.nyc: 192.168.1.11:8302
consul: Handled member-join event for server "rockpix.nyc" in area "wan"
consul: Handled member-join event for server "rockpro64.nyc" in area "wan"
2021/11/07 13:19:40 [INFO] serf: EventMemberJoin: rockpi 192.168.1.10
2021/11/07 13:19:40 [WARN] memberlist: Refuting a suspect message (from: pizero)
serf: EventMemberJoin: rockpi 192.168.1.10
2021/11/07 13:19:40 [INFO] serf: EventMemberJoin: rockpix 192.168.1.11
2021/11/07 13:19:40 [INFO] consul: Adding LAN server rockpix (Addr: tcp/192.168.1.11:8300) (DC: nyc)
memberlist: Refuting a suspect message (from: pizero)
serf: EventMemberJoin: rockpix 192.168.1.11
this is my pi zero server configuration.
# cat server/config.json
{
"node_name": "pizero",
"bind_addr": "{{GetInterfaceIP \"wlan0\"}}",
"client_addr": "127.0.0.1 {{ GetPrivateIPs }}",
"data_dir": "/opt/consul",
"datacenter": "nyc",
"disable_remote_exec": true,
"log_level": "INFO",
"enable_syslog": true,
"enable_debug": true,
"server": true,
"bootstrap_expect": 3,
"leave_on_terminate": false,
"skip_leave_on_interrupt": true,
"rejoin_after_leave": true,
"advertise_addr": "{{GetInterfaceIP \"wlan0\"}}",
"retry_join": [
"192.168.1.11",
"192.168.1.40"
]
}