Immediately Connection reset exeption

Hi! I am running aerospike server on Vagrant on mac OS. On my local machine, in IJ IDEA I am using your java client to connect to my aerospile on vagrant, but immediately I got an exception with following stacktrace: Exception in thread “main” com.aerospike.client.AerospikeException$Connection: Error Code -8: Failed to connect to host(s): 127.0.0.1 3000 java.net.SocketException: Connection reset

at com.aerospike.client.cluster.Cluster.seedNodes(Cluster.java:508)
at com.aerospike.client.cluster.Cluster.tend(Cluster.java:401)
at com.aerospike.client.cluster.Cluster.waitTillStabilized(Cluster.java:356)
at com.aerospike.client.cluster.Cluster.initTendThread(Cluster.java:262)
at com.aerospike.client.cluster.Cluster.<init>(Cluster.java:219)
at com.aerospike.client.AerospikeClient.<init>(AerospikeClient.java:232)
at com.aerospike.client.AerospikeClient.<init>(AerospikeClient.java:173)
at aerospike.AerospikeTest.main(AerospikeTest.java:11)

FAILURE: Build failed with an exception.

That’s how I create client: AerospikeClient client = new AerospikeClient(“127.0.0.1”, 3000);
when I run command “nc -z -v -w5 127.0.0.1 3000” in my terminal I got successful response: “Connection to 127.0.0.1 port 3000 [tcp/hbci] succeeded!”

Any ideas what could be the cause of that exception?

Your vagrant OS is listening on a different IP address. Use “ifconfig” to determine IP address on your vagrant OS.

Typically, it would be: 172.28.128.3

Works, thanks!

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.