Adding 2 nodes to the cluster and how to check whether 2 nodes are connected or not?

@Deva Please post the output of the info command from asadm.

Shakthimaan,

pls check the attachment for info .

Is this after you have made the change as stated by @pgupta? The cluster is not formed yet.

Yes Shakthimaan.

To confirm that I am asking for procedure how to check whether cluster is formed or not?

  • You will have one more entry in the list of clients in the output of the info command. We earlier shared this link with you: http://www.aerospike.com/docs/tools/asadm/user_guide/cluster_mode_guide#info

  • From the ifconfig output, we see that the network interfaces are en01 and enp2s0.

  • The following is an example of aerospike.conf that works for me on Ubuntu 16.04 with network interface name enp0s8. Replace the IP address and node-id-interface according to your setup:

      service {
              paxos-single-replica-limit 1
              service-threads 8
              transaction-queues 8
              transaction-threads-per-queue 8
              proto-fd-max 15000
              node-id-interface enp0s8 # <-- CHANGE
      }
    
      logging {
              console {
                      context any info
               }
      }
    
      network {
              service {
                      address any
                      access-address 10.0.0.11 # <-- CHANGE
                      port 3000
              }
    
              heartbeat {
                      mode mesh
                      address 10.0.0.11 # <-- CHANGE
               
                      port 3002
                      mesh-seed-address-port 10.0.0.12 3002 # <-- CHANGE
    
                      interval 150
                      timeout 10
              }
    
              fabric {
                      port 3001
              }
    
              info {
                      port 3003
              }
      }
    
      namespace test {
              replication-factor 2
              memory-size 4G
              default-ttl 30d # 30 days, use 0 to never expire/evict.
    
              storage-engine memory
      }
    
  • I strongly suggest that you read the documentation once on setting up a mesh network: http://www.aerospike.com/docs/operations/configure/network/heartbeat.

Something is preventing these nodes from talking.

Note: you may need to find and install the neccesary packages for your platform to use this checklist.

  1. Can both nodes ping each other?
  2. Check connectivity over aerospike ports. Stop aerospike and run the following for PORTS 3000 and 3002. On node A: iperf -s -p PORT and on node b: iperf -c IP. OF. NODE.A -p PORT also try swapping a and b.
  3. Firewall blocking Aerospike ports? What does iptables -L output?
  4. Is selinux blocking? What does sestatus output?
$asadm
Admin>info

Look for Cluster size - it should be “2” Are you specifying at least one namespace? For example,

namespace test {
        replication-factor 2
        memory-size 4G
        default-ttl 30d # 30 days, use 0 to never expire/evict.

        storage-engine memory
}

Dear kporter,

Pls find the information below, which you have requested.

1.Can both nodes ping each other? → Ping is happening from both end(node-1 & 2).

2.Check connectivity over aerospike ports. Stop aerospike and run the following for PORTS 3000 and 3002. On node A: iperf -s -p PORT and on node b: iperf -c IP. OF. NODE.A -p PORT also try swapping a and b.

3.Firewall blocking Aerospike ports? What does iptables -L output?

4.Is selinux blocking? What does sestatus output?

Dear PGupta, Here I am using namespace test only and if I am checking cluster size in command promt its showing only 1.

I think KPorter is helping you - you have something going on in your network. This appears out of the realm of the aerospike config file. Tell us what are these two instances … physically? how are they instantiated…where?

Lets return to:

This test failed, though I do not see a clear reason why. My suspicion is that you killed the iperf server “iperf -s” before running the associated iperf client “iperf -c”.

The iperf -s commands need to be running when the iperf -c commands are executed. Please confirm.

Also are you running Aerospike in docker containers?

Dear Kporter, Actually I am new this aerospike. Iam trying to run basic “C”- applications which are provided in aerospike client.

Are you also new to Linux? Basically if you aren’t able to establish a connection with iperf then there is no reason to expect Aerospike to be able to.

Also can you answer what type of environment these a running on? Such as on laptop, in AWS, etc, also are they running in a vm and/or docker container.

Dear kporter,

connection establishment through “iperf”, kindly guide me further.

This I am using in Desktop. Here I installed aerospike in 2 machines and just running the client examples as it is.

Dear kporter, shakthimaan & pgupta,

Thanq very much for helping me.

Atlast My problem got resolved.

Great! but what was the problem/solution.

Hi Kporter,

At the initial stage while executing sample programs I Have added extra namespace in the configuration file, due to that reason it is not getting added in cluster. Once I removed the extra namespace it is working fine now. Thanq.