Invalid node in Dropwizard app


My team is working on an app that uses Dropwizard for REST service. In the context of this app, any attempt to get a record returns an “-3 Invalid node” error. Running a different, non-REST entry point from the same .jar, Aerospike client runs fine. Stepping through via debugger, in the error case the client finds all the nodes on the deployment, but all nodes are active=false. Ideas? I am guessing something activated by running Dropwizard interferes with the client.


Nodes are set to inactive only when the node is dropped from the cluster or AerospikeClient.close() was called. Since AerospikeClient.getNodes() is returning nodes in the cluster that are inactive, I assume AerospikeClient.close() was called.


Ah, that was indeed the problem! Had a client.close() in the wrong part of the Dropwizard lifecycle. thanks.