Aerospike connect problem


#1

Postby moriya » Thu Jan 16, 2014 12:26 am

Hi all

I am new to aerospike 3, and currently trying to use C language to insert data into aerospike, however, I found that everytime I try to connect to aerospike, vaglrind told me problem error

==25477== Conditional jump or move depends on uninitialised value(s) ==25477== at 0x5E6E987: cl_cluster_node_parse_check (cl_cluster.c:146) ==25477== by 0x5E6EE85: cluster_ping_node (cl_cluster.c:1255) ==25477== by 0x5E6F187: cluster_tend (cl_cluster.c:1411) ==25477== by 0x5E6F5DE: citrusleaf_cluster_add_host (cl_cluster.c:293) ==25477== by 0x5E7854E: aerospike_connect (aerospike.c:147) ==25477== by 0x4058DF: main (in /opt/ads_lib/test) ==25477== ==25477== Conditional jump or move depends on uninitialised value(s) ==25477== at 0x5E6E5CD: cl_cluster_node_parse_replicas (cl_cluster.c:146) ==25477== by 0x5E6EF04: cluster_ping_node (cl_cluster.c:1276) ==25477== by 0x5E6F187: cluster_tend (cl_cluster.c:1411) ==25477== by 0x5E6F5DE: citrusleaf_cluster_add_host (cl_cluster.c:293) ==25477== by 0x5E7854E: aerospike_connect (aerospike.c:147) ==25477== by 0x4058DF: main (in /opt/ads_lib/test)

Could anyone told me what happen?? (below are my code)

as_config config; as_config_init(&config); config.hosts[0].addr = “192.168.0.14”; config.hosts[0].port = 3000; aerospike *asconn; //aerospike_init(&asconn, &config); asconn = aerospike_new(&config);

as_error err; if(aerospike_connect(asconn, &err) != AEROSPIKE_OK){ printf(“Connection Error! %s\n”, err.message); }

Thanks !!!


#2

Postby young » Thu Jan 16, 2014 12:19 pm

You code is similar, but very slightly different than the code in the C documentation.

https://docs.aerospike.com/pages/viewpa … Id=3808003

You may want to make the minor changes and try again. In addition, you should look at the server logs for any additional information. The server logs should be at /var/log/aerospike/aerospike.log.

While developing, it is often useful to run “tail -f /var/log/aerospike/aerospike.log” on the server to see how the server is responding.


#3

Postby moriya » Thu Jan 16, 2014 7:56 pm

Thanks for you reply!

I had try the example.c code(provide by source) together with valgrind, still got the same result… And, I had checked with aerospike log, no error found!

As the code could connect to aerospike 3 server, so just leave it…

Beside, aerospike seem have another issue about indexing! Let say, I indexing a bin name “Bin1” (numeric), and could like to filter some of the records by using Bin1 index eg:“Select * from SetA where Bin1 Between 1 and 100”

However, aerospike aql will show me error 200 sometime [Error: (200) AEROSPIKE_ERR_CLIENT] and sometime could complete the operation and show me result…

Thanks again!


#4

Postby young » Thu Jan 16, 2014 10:14 pm

That is odd behavior. Can you specify exactly which version of the C client you are using? I will check with development on this issue.

Also, I have checked and our client may not work with Valgrind, so that could be a part of that problem.


#5

Postby moriya » Thu Jan 16, 2014 10:25 pm

Thank you very much!

Here is my Client: aerospike-client-c-3.0.37-1.el6.x86_64.rpm

And Centos Server Community edition: aerospike-community-server-3.0.48-1.el6.x86_64.rpm


#6

Postby young » Thu Jan 16, 2014 10:41 pm

Thank you for your reply. I have checked with our developers and there is an intermittent bug. We are fixing this. The short term workaround is to simply retry the request. Hopefully, it will be in the next release.


#7

Re: Aerospike connect problem Postby young » Thu Jan 16, 2014 10:50 pm

I have been informed the fix is in the code base already, but not quite yet released. It will be in 3.1.5.

Thanks for using Aerospike.


#8

Post by moriya » Thu Jan 16, 2014 11:28 pm

Thank you very much!