Data being stored on one node only

Post by salmanbukhari » Sat Jul 05, 2014 11:51 pm

I have setup the cluster of two nodes. In the aerospace management console i can see the RAM that is sum of the RAM shared from both the nodes. But when i run the client code to insert the data in cluster it is being stored in one node only and the total records on other nodes is zero.The data is stored in host 172.20.48.155 that is node2 in my code’s context.

MY CODE IS

void insert (int a , int b , int c )
{
Host[] hosts = new Host[] {
             new Host("172.20.48.153", 3000),
             new Host("172.20.48.155", 3000),
            
         };
      AerospikeClient client = new AerospikeClient(new ClientPolicy(), hosts);
      
      WritePolicy policy = new WritePolicy();
      policy.timeout = 5000 ;
                ByteBuffer key = ByteBuffer.allocate(8);
                key.putInt(a);
                key.putInt(b);
                key.rewind();
      Key k = new Key ("mynamespace","data",key);
                Bin b = new Bin ("n",c);
                client.add(policy,k,b);
                client.close();
}

my configuration files are

NODE1:

service {
   user root
   group root
   paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
   pidfile /var/run/aerospike/asd.pid
   service-threads 4
   transaction-queues 4
   transaction-threads-per-queue 4
   proto-fd-max 15000
}

logging {
   # Log file must be an absolute path.
   file /var/log/aerospike/aerospike.log {
      context any info
   }
}

network {
   service {
      address any
      port 3000
      access-address 172.20.48.153
   }

   heartbeat {
      mode multicast
      address 239.1.99.222
      port 9918
      interface-address 172.20.48.153
      
      interval 150
      timeout 10
   }

   fabric {
      port 3001
   }

   info {
      port 3003
   }
}

namespace mynamespace {
        memory-size 65G
        single-bin true
        data-in-index true
        storage-engine device {

        file /ssd-data/aerospikedata
        file /ssd-data/aerospikedata2
        filesize 75G
        data-in-memory true
        }
}

NODE2:

service {
   user root
   group root
   paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
   pidfile /var/run/aerospike/asd.pid
   service-threads 4
   transaction-queues 4
   transaction-threads-per-queue 4
   proto-fd-max 15000
}

logging {
   # Log file must be an absolute path.
   file /var/log/aerospike/aerospike.log {
      context any info
   }
}

network {
   service {
      address any
      port 3000
      access-address 172.20.48.155
   }

   heartbeat {
      mode multicast
      address 239.1.99.222
      port 9918
      interface-address 172.20.48.155
      
      interval 150
      timeout 10
   }

   fabric {
      port 3001
   }

   info {
      port 3003
   }
}

namespace mynamespace {
        memory-size 65G
        single-bin true
        data-in-index true
        storage-engine device {

        file /ssd-data/aerospikedata
        file /ssd-data/aerospikedata2
        filesize 75G
        data-in-memory true
        }
}

Hi,

After looking at your configuration it seems like you might be having a network issue. I was wondering if you have tried turning off Storm Control? More information can be found on the following link:

http//www.aerospike.com/docs/operations/plan/network/

Also can you ping the NODE1 with port 3000? and vice versa?

Post by salmanbukhari » Wed Jul 09, 2014 10:13 am

I executed it using another NIC and it worked. Thanks.