user51
user51

Reputation: 10143

AEROSPIKE_ERR_CONNECTION Bad file descriptor, 127.0.0.1:3000; Not able to connect to local node from aql

I have installed aerospike on my mac my following this installation steps

All the validations are working fine. I am able to connect to the cluster using browser chrome. Below is the screen shot.

I have also installed the AQL tools following the instructions here.

single node aerospike cluster

But I'm unable to connect to local node from aql.

$ aql
2017-11-21 16:06:09 WARN Failed to connect to seed 127.0.0.1 3000. 
AEROSPIKE_ERR_CONNECTION Bad file descriptor, 127.0.0.1:3000
Error -1: Failed to connect

$ asadm
Aerospike Interactive Shell, version 0.1.11
ERROR: Not able to connect any cluster.

Also, I have noticed the Java client is giving error.

AerospikeClient client = new AerospikeClient("localhost", 3000);

when I changed the localhost to actual Ip returned by vagrant ssh -c "ip addr"|grep 'global eth1' it is working fine.

How to connect with aql using customer parameters? I want to pass ip address and port as parameters to aql. Any suggestions.

Upvotes: 2

Views: 1966

Answers (3)

KayV
KayV

Reputation: 13835

Seems like the port is not getting freed even after exiting the vagrant console.

Tried closing all the terminal windows and then starting again. But no luck.

Finally, restarting the system resolved the issue.

Upvotes: 0

Leyla Lee
Leyla Lee

Reputation: 486

There is another possibility, you have your owned port instead of the default 3000, so when you try to connect to aerospike, you can try to run command like : aql -p4000

Hope this may help you

Upvotes: 0

pgupta
pgupta

Reputation: 5405

$ aql --help

https://www.aerospike.com/docs/tools/aql/index.html  - discusses all various command line options.

$ aql -h a.b.c.d -p 1234

Upvotes: 4

Related Questions