While adding node into cluster: "docker exec -ti aerospike1 asinfo -v ‘tip:host=;port=3002’ "
Getting below error, have tried to exposed 3002 port via TCP & udp both portocol.
Aug 16 2022 10:25:38 GMT: WARNING (hb): (hb.c:4906) (repeated:10) could not create heartbeat connection to node - 172.17.0.3 {172.17.0.3:3002}
Aug 16 2022 10:25:38 GMT: WARNING (socket): (socket.c:871) (repeated:10) Error while connecting: 111 (Connection refused)
Aug 16 2022 10:25:38 GMT: WARNING (socket): (socket.c:930) (repeated:10) Error while connecting socket to 172.17.0.3:3002
Hi @Ghanshyam, I was pointed to this repo that has a nice Docker Compose setup for a two node cluster with Aerospike Community Edition. I imagine it would be fairly easy to breakdown and see how it works. Hopefully this helps!
Looks like a change in default aerospike.conf is at play here:
The address is binding to “local” instead of “eth0” the container’s interface:
heartbeat {
# mesh is used for environments that do not support multicast
mode mesh
address local
port 3002
interval 150
timeout 10
}
fabric {
# Intra-cluster communication port (migrates, replication, etc)
# default to same address in 'service'
address local
port 3001
}
You can solve it by providing your own aerospike.conf in the docker run command line as described here:
If you don’t have an aerospike.conf file, you can use the one from the running containers that you created and replace address local with address eth0.