I'm writing a elastic search wrapper for our application. I'm doing disruptive testing by taking a node down and similar things, so that I can do retry on the basis of the exception type.
I'm getting TransportException "TransportService is closed stopped can't send request". Also I'm using Transport client to connect to elastic search.
Not sure when will this happen. I need some clarification on this exception.
Also I need help on possible exceptions which can happen while doing disruptive testing.
what nodes was that? client node or one of the cluster node?
from the exception, it looks like the client node been taken down that gave the exception.
clientHandlers.put(requestId, new RequestHolder<>(handler, node, action, timeoutHandler));
if (started.get() == false) {
// if we are not started the exception handling will remove the RequestHolder again and calls the handler to notify the caller.
// it will only notify if the toStop code hasn't done the work yet.
throw new TransportException("TransportService is closed stopped can't send request");
}
The index operations are successful but I get an error when I close the node.
Feb 12, 2016 12:33:51 AM org.elasticsearch.cluster.action.shard.ShardStateAction$2 handleException
WARNING: [Pyro] failed to send shard started to [{Pyro}{ud9W86hCQ5OEWJ9FCCHQIQ}{127.0.0.1}{127.0.0.1:9300}]
SendRequestTransportException[[Pyro][127.0.0.1:9300][internal:cluster/shard/started]]; nested: TransportException[TransportService is closed stopped can't send request];
at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:323)
at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:282)
at org.elasticsearch.cluster.action.shard.ShardStateAction.shardStarted(ShardStateAction.java:122)
at org.elasticsearch.cluster.action.shard.ShardStateAction.shardStarted(ShardStateAction.java:116)
at org.elasticsearch.indices.cluster.IndicesClusterStateService$2.onRecoveryDone(IndicesClusterStateService.java:639)
at org.elasticsearch.index.shard.StoreRecoveryService$1.run(StoreRecoveryService.java:156)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: TransportException[TransportService is closed stopped can't send request]
at org.elasticsearch.transport.TransportService.sendRequest(TransportService.java:303)
... 8 more
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.