Can some one help me to configure aerospike.conf file.
I have 2 linux ubuntu PC’s and installed aerospike in both. that means now i have 2 nodes.
Now I’m trying add these 2-nodes(192.168.239.1 and 192.168.239.3) to 1-cluster.
Now I’m running my application on node-1(192.168.239.1) and now my question is how to check
whether my 2nodes added in cluster or not? if not could some help me to add those 2 nodes into
the cluster.
kindly give clear steps to approach.
network {
service {
address any
port 3000
access-address 192.168.239.3
}
heartbeat {
#mode multicast
#multicast-group 239.1.99.222
#port 9918
mode mesh
address 192.168.239.1
port 3002
mesh-seed-address-port 192.168.239.3 3002
# To use unicast-mesh heartbeats, remove the 3 lines above, and see
# aerospike_mesh.conf for alternative.
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
}
You can use the asadm tool to query the Aerospike cluster. It is part of the aerospike-tools package, which should already be installed when you install the Aerospike server.
In particular, if you use the “info” command, it will show you the connected nodes in the cluster. Refer the documentation at:
I tried to execute the info command and others as well, but it is showing only NODE1-id.
How can I confirm that 2nd node is connected or not? if not pls guide me to add the node2 into the cluster.
The two Ubuntu systems are able to ping each other, so it is not a network issue.
Where and how are the Ubuntu systems running?
Is there any firewall enabled, and does the Ubuntu machine have multiple network interfaces? Post output of the following from a terminal:
$ sudo iptables -L $ ifconfig -a
If the Ubuntu system has multiple interfaces, you can explicitly specify the node interface for the 192.168.239.x network in the service section of the Aerospike configuration file:
Are you advertising the correct address-ports on each node? I think you have these mixed up. The config file you show seems to be for 192.168.239.3 (based on access-address that you are advertising). If so, its config should be: ( I am listening on 3002 for incoming nodes trying to join my cluster and I am going to reach out to 192.168.239.1:3002 to join an existing node/cluster.)
mode mesh
port 3002
mesh-seed-address-port 192.168.239.1 3002
BTW, you can also dynamicaly add one node to an existing/node cluster using the following command where aa.bb.cc.dd is ip address of the node you want to join in to and its listening on port 3002 for incoming nodes trying to join its cluster.
$asinfo -v "tip:host=aa.bb.cc.dd;port=3002"
So, just to be clear, in your case, you will execute this command on 192.168.239.3 and it will be:
$asinfo -v "tip:host=192.168.239.1;port=3002"
@Deva
Please refer @pgupta’s reply. Your address and access-address have to match! The other node’s IP address should be added in mesh-seed-address-port.
Secondly, check in the ifconfig output if eth1 is the interface that is assigned to 192.168.239.3.
Check the network interface name for 192.168.239.1 in the output of “ifconfig”. “lo” is the local loopback interface, and you cannot use it to network with other computers.
after this I tried to check “info”, but still it is showing node-1 information only.
when I trying to connect admin there also it showing found 1 node.
please find the below configuration for both the NODEs.
Node-1-(192.168.239.1) config file.
network {
service {
address any
port 3000
# access-address 192.168.239.1
# network-interface-name lo
}
heartbeat {
# mode multicast
# multicast-group 239.1.99.222
# port 9918
mode mesh
#address 192.168.239.1
port 3002
# mesh-seed-address-port 192.168.239.3 3002
# To use unicast-mesh heartbeats, remove the 3 lines above, and see
# aerospike_mesh.conf for alternative.
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
}
Node-2-(192.168.239.3) config file.
network {
service {
address any
port 3000
# access-address 192.168.239.3
}
heartbeat {
# mode multicast
# multicast-group 239.1.99.222
# port 9918
# To use unicast-mesh heartbeats, remove the 3 lines above, and see
# aerospike_mesh.conf for alternative.
mode mesh
# address 192.168.239.3
port 3002
# mesh-seed-address-port 192.168.239.1 3002
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
with these config files, if you uncomment the mesh-seed-address-port entry on any one or both, the way you have it, cluster should form. assuming your setup is something like this…
I have one more doubt, How to see or check resultant values on the screen whether both NODE 1 & 2 working or not ?
I mean checking the heartbeat for both node1 & 2?