It’s not clear what is really happening in your case. There is some sort of networking issue going on. I suggest adding logging statements in the client code to obtain more information about cause of failure and run packaged scan example.
For example:
MultiCommand.java: in readBytes() add
Log.info("readBytes " + length);
Connection.java: right before socket.connect() add
Log.info("Connect " + address);
Node.java: in getConnection() change first block to following:
Log.info("getConnection " + timeoutMillis);
while ((conn = connectionQueue.poll()) != null) {
if (conn.isValid()) {
try {
conn.setTimeout(timeoutMillis);
Log.info("found connection " + conn);
return conn;
}
catch (Exception e) {
// Set timeout failed. Something is probably wrong with timeout
// value itself, so don't empty queue retrying. Just get out.
Log.info("connection failed " + conn);
closeConnection(conn);
throw new AerospikeException.Connection(e);
}
}
Log.info("connection not valid " + conn);
closeConnection(conn);
}
Log.info("create connection");