Segmentation Fault


#1

Attempting to set up NodeJS application to connect to Aerospike, and I hit an error I can’t find a solution to.

Basically, I connect as such:

var client = Aerospike.client({
        hosts: [{addr: '10.10.128.48', port: 3000}],
        log: {level: Aerospike.log.DEBUG}
});
client.connect(function (error) {
  if (error) {
        console.log('Connection to Aerospike cluster failed!')
  } else {
        console.log('Connection to Aerospike cluster succeeded!')
  }
});

Then as part of processing a command, I attempt to issue a put:

    var key = new Aerospike.Key('test22', 'node_set', accessKey);

    var rec = {
            sid: 'ABCDEF99',
            site_id: 1,
            language_id: 2
    };

    client.put(key, rec, function(err) {
            if (err) {
                    console.log("Error: %s", err.message);
                    callbackFunc(err, res, null);
            }
            else {
                    console.log("Create success");
                    callbackFunc(err, res, session);
            }
    });

Output:

May 09 2016 20:58:19 GMT: DEBUG(32599) [client.cc:115] [New] - Aerospike object initialization : success
May 09 2016 20:58:19 GMT: DEBUG(32599) [cluster.cc:52] [Connect] - Connecting to Cluster: Success
Connection to Aerospike cluster succeeded!
PORT defined as undefined
Binding to port 9001
May 09 2016 20:58:24 GMT: DEBUG(32599) [put_async.cc:81] [PutAsync] - Sending async put command

May 09 2016 20:58:24 GMT: DEBUG(32599) [async.cc:165] [async_write_listener] - Command failed: -6 uv_tcp_connect failed: unknown error
May 09 2016 20:58:24 GMT: DEBUG(32599) [async.cc:171] [async_write_listener] - Invoking JS callback function
Error: uv_tcp_connect failed: unknown error
Segmentation fault (core dumped)

I assume this to mean that the initial connection succeeds, but it appears to be a connection error when it attempts the PUT. I’m not sure where to look for further info to debug.

Thanks, Sam


#2

Hey Sam, can you open this as an issue on the aerospike/aerospike-client-nodejs GitHub repo? Please add information about your OS, and the version of Node and our client that you’re using.


#3

Done - Issue #128 - https://github.com/aerospike/aerospike-client-nodejs/issues/128