AEROSPIKE_ERR_CONNECTION 错误的文件描述符,127.0.0.1:3000;无法从 aql 连接到本地节点

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

我已经在我的 mac 上安装了 aerospike 我关注这个 installation steps

所有验证工作正常。我可以使用浏览器 chrome 连接到集群。下面是屏幕截图。

我还按照说明安装了 AQL 工具 here

但是我无法从 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.

此外,我注意到 Java 客户端出错。

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

当我将 localhost 更改为 vagrant ssh -c "ip addr"|grep 'global eth1' 返回的实际 Ip 时,它工作正常。

如何使用客户参数连接aql?我想将 ip 地址和端口作为参数传递给 aql。任何建议。

$ 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

还有另一种可能性,您有自己的端口而不是默认的 3000,因此当您尝试连接到 aerospike 时,您可以尝试 运行 命令,例如:aql -p4000

希望对您有所帮助

似乎即使在退出 vagrant 控制台后端口也没有被释放。

尝试关闭所有终端 windows 然后重新启动。但是运气不好。

最后,重启系统解决了问题。