Run java examples throws Client timeout exception

I installed the CE 3.5.3 on my PC, then run the example throws exception described as bellow . What’s the problem? Please help me… Thank you advanced.

./run_examples -h localhost -p 3000 -n test -s demoset PutGet 2015-03-11 20:43:21 CST INFO Add node BB9449B93D9BED4 127.0.0.1:3000 2015-03-11 20:43:21 CST INFO PutGet Begin 2015-03-11 20:43:21 CST INFO Put: namespace=test set=demoset key=putgetkey bin1=bin1 value1=value1 bin2=bin2 value2=value2

Client timeout: timeout=0 iterations=2 failedNodes=0 failedConns=0 com.aerospike.client.AerospikeException$Timeout: Client timeout: timeout=0 iterations=2 failedNodes=0 failedConns=0 at com.aerospike.client.command.SyncCommand.execute(SyncCommand.java:131) at com.aerospike.client.AerospikeClient.put(AerospikeClient.java:299) at com.aerospike.examples.PutGet.runMultiBinTest(PutGet.java:55) at com.aerospike.examples.PutGet.runExample(PutGet.java:39) at com.aerospike.examples.Example.run(Example.java:80) at com.aerospike.examples.Example.runExample(Example.java:65) at com.aerospike.examples.Example.runExamples(Example.java:47) at com.aerospike.examples.Main.runExamples(Main.java:198) at com.aerospike.examples.Main.main(Main.java:122)

Could you let us know which OS is Aerospike running on? Was the install done on a VM? Basically the exception you posted shows that Aerospike server is not running on 127.0.0.1 port 3000.

You can check on aerospike status by running:

sudo /etc/init.d/aerospike status

Ensure that server is accessible on port 3000

telnet localost 3000

On the server you can also run the asmonitor tool to get cluster health:

sudo asmonitor -e info

Hi,lucien : Thank you for your reply. Aerospike is running on my physical machine (Ubuntu 12.04 x86_64).

   sudo /etc/init.d/aerospike status
   output :  
      * asd is running


   telnet localhost 3000
   output:
           Trying 127.0.0.1...
           Connected to localhost. 
           Escape character is '^]'.

   sudo asmonitor -e info

output:

Enter help for commands

1 hosts in cluster: 10.236.121.46:3000 ===NODES=== 2015-03-16 14:26:45.957207 Sorting by IP, in Ascending order: ip:port Build Cluster Cluster Free Free Migrates Node Principal Replicated Sys . Size Visibility Disk Mem . ID ID Objects Free . . . pct pct . . . . Mem bieyong.local:3000 3.5.3 1 true 0 99 (0,0) BB9449B93D9BED4 BB9CE179D56B1F8 1 63 Number of nodes displayed: 1

===NAMESPACE=== Total (unique) objects in cluster for test : 1 Total (unique) objects in cluster for bar : 0 Note: Total (unique) objects is an under estimate if migrations are in progress.

ip/namespace Avail Evicted Master Repl Stop Used Used Used Used hwm hwm Pct Objects Objects Factor Writes Disk Disk Mem Mem Disk Mem . . . . . . % . % . . bieyong.local/test n/a 0 1 1 false n/a n/a 98.00 B 1 50 60 bieyong.local/bar n/a 0 0 1 false n/a n/a 0.00 B 0 50 60

I have found the cause of the problem.

The heartbeat protocal in default aerospike.conf is :

mode multicast address 239.1.99.222 port 9918

I changed the mode to mesh, then it works.

Thank you for your reply.