# Issue with elastic search TransportClient of java API

**URL:** <https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974>\
**Category:** Elasticsearch\
**Created:** [September 26, 2014, 5:34am UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974 "2014-09-26T05:34:04Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vijay\_Tiwary](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@Vijay\_Tiwary](https://discuss.elastic.co/u/Vijay_Tiwary)\
**Post date:** [September 26, 2014, 5:34am UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974/1 "2014-09-26T05:34:04Z")

</div>

I am having a instance of "TransportClient" which is singleton in my web  
application. In one of the flow I have to query elastic search twice one  
after the other. However, first call to elastic search cluster is working  
and the other one is failing with the following exception:

No valid missing index type id: 38  
org.elasticsearch.ElasticsearchIllegalArgumentException: No valid missing  
index type id: 38  
at  
org.elasticsearch.action.support.IndicesOptions.readIndicesOptions(IndicesOptions.java:111)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.action.search.SearchRequest.readFrom(SearchRequest.java:505)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:209)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:109)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
~[elasticsearch-1.3.2.jar:na]  
at  
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
~[elasticsearch-1.3.2.jar:na]  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
~[na:1.8.0\_11]  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
~[na:1.8.0\_11]  
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0\_11]

There is no problem with the query that I have checked with curl. What is  
problem here?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 26, 2014, 6:18am UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974/2 "2014-09-26T06:18:51Z")

</div>

How your Java code looks like?  
What was your curl query?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 26 sept. 2014 à 07:34, Vijay Tiwary [vijaykr.tiwary@gmail.com](mailto:vijaykr.tiwary@gmail.com) a écrit :

I am having a instance of "TransportClient" which is singleton in my web application. In one of the flow I have to query elastic search twice one after the other. However, first call to elastic search cluster is working and the other one is failing with the following exception:

No valid missing index type id: 38  
org.elasticsearch.ElasticsearchIllegalArgumentException: No valid missing index type id: 38  
at org.elasticsearch.action.support.IndicesOptions.readIndicesOptions(IndicesOptions.java:111) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.action.search.SearchRequest.readFrom(SearchRequest.java:505) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:209) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:109) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.3.2.jar:na]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0\_11]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0\_11]  
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0\_11]

## There is no problem with the query that I have checked with curl. What is problem here?

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/574D32FE-BC19-4815-A266-49EEFD945A0D%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/574D32FE-BC19-4815-A266-49EEFD945A0D%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Vijay\_Tiwary](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@Vijay\_Tiwary](https://discuss.elastic.co/u/Vijay_Tiwary)\
**Post date:** [September 26, 2014, 6:28am UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974/3 "2014-09-26T06:28:35Z")

</div>

Blow is the junit test class:

public class BenchMarkES {  
private static final Logger LOG =  
LoggerFactory.getLogger(BenchMarkES.class);  
private static TransportClient client = null;  
@Before  
public void setUp() {  
Settings settings = ImmutableSettings.settingsBuilder().build();  
client = new TransportClient(settings).addTransportAddress(new  
InetSocketTransportAddress("localhost", 9300));  
}  
@Test  
public void doNormalQuery(){  
try{  
int queryExecutionCount = 5;  
SearchResponse sr = null;  
FilterBuilder filter = FilterBuilders.termFilter("brand\_context\_id","5");  
long start = System.currentTimeMillis();  
for (int i = 0; i \< queryExecutionCount; i++) {  
sr = launchSearch(filter, 2000);  
}  
long end = System.currentTimeMillis();  
LOG.info("Time taken for the normal quelry "+(end - start)+" ms");  
SearchHits sh = sr.getHits();  
SearchHit searchHit = sh.getHits();  
LOG.info("Hits :"+sh.getTotalHits()+", Docs fetched :"+searchHit.length);  
/_for (SearchHit doc : searchHit) {  
LOG.info("Document :"+doc.getSource().get("tweet\_id"));  
}_/  
}catch (Exception e) {  
LOG.error(e.getMessage(), e);  
}  
}  
private SearchResponse launchSearch(FilterBuilder filter, int size) throws  
IOException {

FilteredQueryBuilder fqb = new  
FilteredQueryBuilder(QueryBuilders.matchAllQuery(), filter);  
SearchRequestBuilder srb =  
client.prepareSearch("twitter").setTypes("tweet").setQuery(fqb);  
if(aggregation != null){

srb.addAggregation(aggregation);  
}  
srb.setFrom(0).setSize(size);  
SearchResponse response = srb.execute().actionGet();

```
    return response;
}

```

}

So the problem is this if i execute the block  
\* for (int i = 0; i \< queryExecutionCount; i++) {\*

- sr = launchSearch(filter, 2000);\*
- }\*

with "_queryExecutionCount_" set to 1 it works however if I set to any  
value greater than 1 it fails

On Friday, September 26, 2014 11:49:07 AM UTC+5:30, David Pilato wrote:

> How your Java code looks like?  
> What was your curl query?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 26 sept. 2014 à 07:34, Vijay Tiwary \<[vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> I am having a instance of "TransportClient" which is singleton in my  
> web application. In one of the flow I have to query Elasticsearch twice  
> one after the other. However, first call to Elasticsearch cluster is  
> working and the other one is failing with the following exception:
> 
> No valid missing index type id: 38  
> org.elasticsearch.ElasticsearchIllegalArgumentException: No valid missing  
> index type id: 38  
> at  
> org.elasticsearch.action.support.IndicesOptions.readIndicesOptions(IndicesOptions.java:111)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.action.search.SearchRequest.readFrom(SearchRequest.java:505)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:209)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:109)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
> ~[elasticsearch-1.3.2.jar:na]  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
> ~[na:1.8.0\_11]  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
> ~[na:1.8.0\_11]  
> at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0\_11]
> 
> There is no problem with the query that I have checked with curl. What is  
> problem here?
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 26, 2014, 6:54am UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974/4 "2014-09-26T06:54:12Z")

</div>

Just checking. Which version you elasticsearch cluster is?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 26 sept. 2014 à 08:28, Vijay Tiwary [vijaykr.tiwary@gmail.com](mailto:vijaykr.tiwary@gmail.com) a écrit :

Blow is the junit test class:

public class BenchMarkES {

```
private static final Logger LOG = LoggerFactory.getLogger(BenchMarkES.class);

private static TransportClient client = null;

@Before
 public void setUp() {
	
	Settings settings = ImmutableSettings.settingsBuilder().build();
	
	 client = new TransportClient(settings).addTransportAddress(new 
			InetSocketTransportAddress("localhost", 9300)); 
		
}

@Test
public void doNormalQuery(){
	
	try{
		int queryExecutionCount = 5;
		SearchResponse sr = null;
		FilterBuilder filter = FilterBuilders.termFilter("brand_context_id","5");
		long start = System.currentTimeMillis();
		
		for (int i = 0; i < queryExecutionCount; i++) {
			sr = launchSearch(filter, 2000);
		}
		long end = System.currentTimeMillis();
		
		LOG.info("Time taken for the normal quelry "+(end - start)+" ms");
		
		SearchHits sh = sr.getHits();
		SearchHit[] searchHit = sh.getHits();
		
		LOG.info("Hits :"+sh.getTotalHits()+", Docs fetched :"+searchHit.length);
		
		/*for (SearchHit doc : searchHit) {
			LOG.info("Document :"+doc.getSource().get("tweet_id"));
		}*/
		
	}catch (Exception e) {
		LOG.error(e.getMessage(), e);
	}
	
}

 private SearchResponse launchSearch(FilterBuilder filter, int size) throws IOException {
	 
	
	 FilteredQueryBuilder fqb = new FilteredQueryBuilder(QueryBuilders.matchAllQuery(), filter);
	 SearchRequestBuilder srb = client.prepareSearch("twitter").setTypes("tweet").setQuery(fqb);
	
	 if(aggregation != null){
		 
		 srb.addAggregation(aggregation);
	 }
	
	 srb.setFrom(0).setSize(size);
	SearchResponse response = srb.execute().actionGet();
	 
        return response;
    }

```

}

So the problem is this if i execute the block  
for (int i = 0; i \< queryExecutionCount; i++) {  
sr = launchSearch(filter, 2000);  
}

with "queryExecutionCount" set to 1 it works however if I set to any value greater than 1 it fails

> On Friday, September 26, 2014 11:49:07 AM UTC+5:30, David Pilato wrote:  
> How your Java code looks like?  
> What was your curl query?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 26 sept. 2014 à 07:34, Vijay Tiwary [vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) a écrit :
> 
> I am having a instance of "TransportClient" which is singleton in my web application. In one of the flow I have to query Elasticsearch twice one after the other. However, first call to Elasticsearch cluster is working and the other one is failing with the following exception:
> 
> No valid missing index type id: 38  
> org.elasticsearch.ElasticsearchIllegalArgumentException: No valid missing index type id: 38  
> at org.elasticsearch.action.support.IndicesOptions.readIndicesOptions(IndicesOptions.java:111) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.action.search.SearchRequest.readFrom(SearchRequest.java:505) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:209) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:109) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.3.2.jar:na]  
> at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.3.2.jar:na]  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0\_11]  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0\_11]  
> at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0\_11]
> 
> ## There is no problem with the query that I have checked with curl. What is problem here?
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3BD7A303-E088-40E8-BDCB-D47CD4CE6898%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/3BD7A303-E088-40E8-BDCB-D47CD4CE6898%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Vijay\_Tiwary](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@Vijay\_Tiwary](https://discuss.elastic.co/u/Vijay_Tiwary)\
**Post date:** [September 26, 2014, 7:03am UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974/5 "2014-09-26T07:03:46Z")

</div>

I am using Elasticsearch 1.2.1 and java client for the same is 1.3.2

On Friday, September 26, 2014 12:24:24 PM UTC+5:30, David Pilato wrote:

> Just checking. Which version you elasticsearch cluster is?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 26 sept. 2014 à 08:28, Vijay Tiwary \<[vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) \<javascript:\>\>  
> a écrit :
> 
> Blow is the junit test class:
> 
> public class BenchMarkES {  
> private static final Logger LOG =  
> LoggerFactory.getLogger(BenchMarkES.class);  
> private static TransportClient client = null;  
> @Before  
> public void setUp() {  
> Settings settings = ImmutableSettings.settingsBuilder().build();  
> client = new TransportClient(settings).addTransportAddress(new  
> InetSocketTransportAddress("localhost", 9300));  
> }  
> @Test  
> public void doNormalQuery(){  
> try{  
> int queryExecutionCount = 5;  
> SearchResponse sr = null;  
> FilterBuilder filter = FilterBuilders.termFilter("brand\_context\_id","5");  
> long start = System.currentTimeMillis();  
> for (int i = 0; i \< queryExecutionCount; i++) {  
> sr = launchSearch(filter, 2000);  
> }  
> long end = System.currentTimeMillis();  
> LOG.info("Time taken for the normal quelry "+(end - start)+" ms");  
> SearchHits sh = sr.getHits();  
> SearchHit searchHit = sh.getHits();  
> LOG.info("Hits :"+sh.getTotalHits()+", Docs fetched :"+searchHit.length);  
> /_for (SearchHit doc : searchHit) {  
> LOG.info("Document :"+doc.getSource().get("tweet\_id"));  
> }_/  
> }catch (Exception e) {  
> LOG.error(e.getMessage(), e);  
> }  
> }  
> private SearchResponse launchSearch(FilterBuilder filter, int size)  
> throws IOException {
> 
> FilteredQueryBuilder fqb = new  
> FilteredQueryBuilder(QueryBuilders.matchAllQuery(), filter);  
> SearchRequestBuilder srb =  
> client.prepareSearch("twitter").setTypes("tweet").setQuery(fqb);  
> if(aggregation != null){
> 
> srb.addAggregation(aggregation);  
> }  
> srb.setFrom(0).setSize(size);  
> SearchResponse response = srb.execute().actionGet();
> 
> ```
> return response;
> }
> 
> ```
> 
> }
> 
> So the problem is this if i execute the block  
> \* for (int i = 0; i \< queryExecutionCount; i++) {\*
> 
> - sr = launchSearch(filter, 2000);\*
> - }\*
> 
> with "_queryExecutionCount_" set to 1 it works however if I set to any  
> value greater than 1 it fails
> 
> On Friday, September 26, 2014 11:49:07 AM UTC+5:30, David Pilato wrote:
> 
> > How your Java code looks like?  
> > What was your curl query?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 26 sept. 2014 à 07:34, Vijay Tiwary [vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) a écrit :
> > 
> > I am having a instance of "TransportClient" which is singleton in my  
> > web application. In one of the flow I have to query Elasticsearch twice  
> > one after the other. However, first call to Elasticsearch cluster is  
> > working and the other one is failing with the following exception:
> > 
> > No valid missing index type id: 38  
> > org.elasticsearch.ElasticsearchIllegalArgumentException: No valid missing  
> > index type id: 38  
> > at  
> > org.elasticsearch.action.support.IndicesOptions.readIndicesOptions(IndicesOptions.java:111)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.action.search.SearchRequest.readFrom(SearchRequest.java:505)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:209)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:109)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
> > ~[elasticsearch-1.3.2.jar:na]  
> > at  
> > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
> > ~[na:1.8.0\_11]  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
> > ~[na:1.8.0\_11]  
> > at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0\_11]
> > 
> > There is no problem with the query that I have checked with curl. What is  
> > problem here?
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/54b76ecb-dad1-4086-bb1b-01307d5b140f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/54b76ecb-dad1-4086-bb1b-01307d5b140f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Vijay\_Tiwary](https://avatars.discourse-cdn.com/v4/letter/v/3da27b/32.png) [@Vijay\_Tiwary](https://discuss.elastic.co/u/Vijay_Tiwary)\
**Post date:** [September 26, 2014, 7:40am UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974/6 "2014-09-26T07:40:10Z")

</div>

Hi David,

I have identified the problem. Actually the transport client that i was  
creating was like this:

Settings settings =  
ImmutableSettings.settingsBuilder().put("client.transport.sniff",  
true).build();  
client = new TransportClient(settings).addTransportAddress(new  
InetSocketTransportAddress("localhost", 9300));

However if turn off the sniff portion then its working fine.

I am testing in a single node cluster so why does setting \*sniff \*property  
to true is causing the problem?

On Friday, September 26, 2014 12:33:46 PM UTC+5:30, Vijay Tiwary wrote:

> I am using Elasticsearch 1.2.1 and java client for the same is 1.3.2
> 
> On Friday, September 26, 2014 12:24:24 PM UTC+5:30, David Pilato wrote:
> 
> > Just checking. Which version you elasticsearch cluster is?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 26 sept. 2014 à 08:28, Vijay Tiwary [vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) a écrit :
> > 
> > Blow is the junit test class:
> > 
> > public class BenchMarkES {  
> > private static final Logger LOG =  
> > LoggerFactory.getLogger(BenchMarkES.class);  
> > private static TransportClient client = null;  
> > @Before  
> > public void setUp() {  
> > Settings settings = ImmutableSettings.settingsBuilder().build();  
> > client = new TransportClient(settings).addTransportAddress(new  
> > InetSocketTransportAddress("localhost", 9300));  
> > }  
> > @Test  
> > public void doNormalQuery(){  
> > try{  
> > int queryExecutionCount = 5;  
> > SearchResponse sr = null;  
> > FilterBuilder filter = FilterBuilders.termFilter("brand\_context\_id","5");  
> > long start = System.currentTimeMillis();  
> > for (int i = 0; i \< queryExecutionCount; i++) {  
> > sr = launchSearch(filter, 2000);  
> > }  
> > long end = System.currentTimeMillis();  
> > LOG.info("Time taken for the normal quelry "+(end - start)+" ms");  
> > SearchHits sh = sr.getHits();  
> > SearchHit searchHit = sh.getHits();  
> > LOG.info("Hits :"+sh.getTotalHits()+", Docs fetched  
> > :"+searchHit.length);  
> > /_for (SearchHit doc : searchHit) {  
> > LOG.info("Document :"+doc.getSource().get("tweet\_id"));  
> > }_/  
> > }catch (Exception e) {  
> > LOG.error(e.getMessage(), e);  
> > }  
> > }  
> > private SearchResponse launchSearch(FilterBuilder filter, int size)  
> > throws IOException {
> > 
> > FilteredQueryBuilder fqb = new  
> > FilteredQueryBuilder(QueryBuilders.matchAllQuery(), filter);  
> > SearchRequestBuilder srb =  
> > client.prepareSearch("twitter").setTypes("tweet").setQuery(fqb);  
> > if(aggregation != null){
> > 
> > srb.addAggregation(aggregation);  
> > }  
> > srb.setFrom(0).setSize(size);  
> > SearchResponse response = srb.execute().actionGet();
> > 
> > ```
> > return response;
> > }
> > 
> > ```
> > 
> > }
> > 
> > So the problem is this if i execute the block  
> > \* for (int i = 0; i \< queryExecutionCount; i++) {\*
> > 
> > - sr = launchSearch(filter, 2000);\*
> > - }\*
> > 
> > with "_queryExecutionCount_" set to 1 it works however if I set to any  
> > value greater than 1 it fails
> > 
> > On Friday, September 26, 2014 11:49:07 AM UTC+5:30, David Pilato wrote:
> > 
> > > How your Java code looks like?  
> > > What was your curl query?
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 26 sept. 2014 à 07:34, Vijay Tiwary [vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) a écrit :
> > > 
> > > I am having a instance of "TransportClient" which is singleton in my  
> > > web application. In one of the flow I have to query Elasticsearch twice  
> > > one after the other. However, first call to Elasticsearch cluster is  
> > > working and the other one is failing with the following exception:
> > > 
> > > No valid missing index type id: 38  
> > > org.elasticsearch.ElasticsearchIllegalArgumentException: No valid  
> > > missing index type id: 38  
> > > at  
> > > org.elasticsearch.action.support.IndicesOptions.readIndicesOptions(IndicesOptions.java:111)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.action.search.SearchRequest.readFrom(SearchRequest.java:505)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:209)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:109)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
> > > ~[elasticsearch-1.3.2.jar:na]  
> > > at  
> > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
> > > ~[na:1.8.0\_11]  
> > > at  
> > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
> > > ~[na:1.8.0\_11]  
> > > at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0\_11]
> > > 
> > > There is no problem with the query that I have checked with curl. What  
> > > is problem here?
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8d1c25cc-2562-4914-9789-70ec091b54f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8d1c25cc-2562-4914-9789-70ec091b54f3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 26, 2014, 4:54pm UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974/7 "2014-09-26T16:54:59Z")

</div>

I have no idea. Could be an issue.

Any chance you could create a small test project which reproduce it and share it on github?

--  
David Pilato | Technical Advocate | [elasticsearch.com](http://elasticsearch.com)  
[david.pilato@elasticsearch.com](mailto:david.pilato@elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 26 septembre 2014 à 09:40:15, Vijay Tiwary ([vijaykr.tiwary@gmail.com](mailto:vijaykr.tiwary@gmail.com)) a écrit:

Hi David,

I have identified the problem. Actually the transport client that i was creating was like this:

Settings settings = ImmutableSettings.settingsBuilder().put("client.transport.sniff", true).build();  
client = new TransportClient(settings).addTransportAddress(new  
InetSocketTransportAddress("localhost", 9300));

However if turn off the sniff portion then its working fine.

I am testing in a single node cluster so why does setting sniff property to true is causing the problem?

On Friday, September 26, 2014 12:33:46 PM UTC+5:30, Vijay Tiwary wrote:  
I am using elastic search 1.2.1 and java client for the same is 1.3.2

On Friday, September 26, 2014 12:24:24 PM UTC+5:30, David Pilato wrote:  
Just checking. Which version you elasticsearch cluster is?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 26 sept. 2014 à 08:28, Vijay Tiwary [vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) a écrit :

Blow is the junit test class:

public class BenchMarkES {  
private static final Logger LOG = LoggerFactory.getLogger(BenchMarkES.class);  
private static TransportClient client = null;  
@Before  
public void setUp() {  
Settings settings = ImmutableSettings.settingsBuilder().build();  
client = new TransportClient(settings).addTransportAddress(new  
InetSocketTransportAddress("localhost", 9300));  
}  
@Test  
public void doNormalQuery(){  
try{  
int queryExecutionCount = 5;  
SearchResponse sr = null;  
FilterBuilder filter = FilterBuilders.termFilter("brand\_context\_id","5");  
long start = System.currentTimeMillis();  
for (int i = 0; i \< queryExecutionCount; i++) {  
sr = launchSearch(filter, 2000);  
}  
long end = System.currentTimeMillis();  
LOG.info("Time taken for the normal quelry "+(end - start)+" ms");  
SearchHits sh = sr.getHits();  
SearchHit[] searchHit = sh.getHits();  
LOG.info("Hits :"+sh.getTotalHits()+", Docs fetched :"+searchHit.length);  
/_for (SearchHit doc : searchHit) {  
LOG.info("Document :"+doc.getSource().get("tweet\_id"));  
}_/  
}catch (Exception e) {  
LOG.error(e.getMessage(), e);  
}  
}  
private SearchResponse launchSearch(FilterBuilder filter, int size) throws IOException {

FilteredQueryBuilder fqb = new FilteredQueryBuilder(QueryBuilders.matchAllQuery(), filter);  
SearchRequestBuilder srb = client.prepareSearch("twitter").setTypes("tweet").setQuery(fqb);  
if(aggregation != null){

srb.addAggregation(aggregation);  
}  
srb.setFrom(0).setSize(size);  
SearchResponse response = srb.execute().actionGet();

```
   return response;

```

}

}

So the problem is this if i execute the block  
for (int i = 0; i \< queryExecutionCount; i++) {  
sr = launchSearch(filter, 2000);  
}

with "queryExecutionCount" set to 1 it works however if I set to any value greater than 1 it fails

On Friday, September 26, 2014 11:49:07 AM UTC+5:30, David Pilato wrote:  
How your Java code looks like?  
What was your curl query?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 26 sept. 2014 à 07:34, Vijay Tiwary [vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) a écrit :

I am having a instance of "TransportClient" which is singleton in my web application. In one of the flow I have to query elastic search twice one after the other. However, first call to elastic search cluster is working and the other one is failing with the following exception:

No valid missing index type id: 38  
org.elasticsearch.ElasticsearchIllegalArgumentException: No valid missing index type id: 38  
at org.elasticsearch.action.support.IndicesOptions.readIndicesOptions(IndicesOptions.java:111) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.action.search.SearchRequest.readFrom(SearchRequest.java:505) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:209) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:109) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.3.2.jar:na]  
at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.3.2.jar:na]  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0\_11]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0\_11]  
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0\_11]

## There is no problem with the query that I have checked with curl. What is problem here?

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## You received this message because you are subscribed to the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8d1c25cc-2562-4914-9789-70ec091b54f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8d1c25cc-2562-4914-9789-70ec091b54f3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.54259a63.4db127f8.5f84%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.54259a63.4db127f8.5f84%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Ivan](https://avatars.discourse-cdn.com/v4/letter/i/df788c/32.png) [@Ivan](https://discuss.elastic.co/u/Ivan)\
**Post date:** [September 26, 2014, 8:49pm UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974/8 "2014-09-26T20:49:45Z")

</div>

In general, newer client libraries should not be used with older clusters.  
Most of the version checking happens on the server side and the older code  
does not know about the newer client.

--  
Ivan

On Fri, Sep 26, 2014 at 9:54 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> I have no idea. Could be an issue.
> 
> Any chance you could create a small test project which reproduce it and  
> share it on github?
> 
> --  
> _David Pilato_ | Technical Advocate | _[elasticsearch.com](http://elasticsearch.com)  
> [http://elasticsearch.com](http://elasticsearch.com)_  
> [david.pilato@elasticsearch.com](mailto:david.pilato@elasticsearch.com)  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs  
> [http://twitter.com/scrutmydocs](http://twitter.com/scrutmydocs)  
> [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 26 septembre 2014 à 09:40:15, Vijay Tiwary ([vijaykr.tiwary@gmail.com](mailto:vijaykr.tiwary@gmail.com))  
> a écrit:
> 
> Hi David,
> 
> I have identified the problem. Actually the transport client that i was  
> creating was like this:
> 
> Settings settings =  
> ImmutableSettings.settingsBuilder().put("client.transport.sniff",  
> true).build();  
> client = new TransportClient(settings).addTransportAddress(new  
> InetSocketTransportAddress("localhost", 9300));
> 
> However if turn off the sniff portion then its working fine.
> 
> I am testing in a single node cluster so why does setting _sniff_  
> property to true is causing the problem?
> 
> On Friday, September 26, 2014 12:33:46 PM UTC+5:30, Vijay Tiwary wrote:
> 
> > I am using Elasticsearch 1.2.1 and java client for the same is 1.3.2
> > 
> > On Friday, September 26, 2014 12:24:24 PM UTC+5:30, David Pilato wrote:
> > 
> > > Just checking. Which version you elasticsearch cluster is?
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 26 sept. 2014 à 08:28, Vijay Tiwary [vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) a écrit :
> > > 
> > > Blow is the junit test class:
> > > 
> > > public class BenchMarkES {  
> > > private static final Logger LOG = LoggerFactory.getLogger(  
> > > BenchMarkES.class);  
> > > private static TransportClient client = null;  
> > > @Before  
> > > public void setUp() {  
> > > Settings settings = ImmutableSettings.settingsBuilder().build();  
> > > client = new TransportClient(settings).addTransportAddress(new  
> > > InetSocketTransportAddress("localhost", 9300));  
> > > }  
> > > @Test  
> > > public void doNormalQuery(){  
> > > try{  
> > > int queryExecutionCount = 5;  
> > > SearchResponse sr = null;  
> > > FilterBuilder filter = FilterBuilders.termFilter("  
> > > brand\_context\_id","5");  
> > > long start = System.currentTimeMillis();  
> > > for (int i = 0; i \< queryExecutionCount; i++) {  
> > > sr = launchSearch(filter, 2000);  
> > > }  
> > > long end = System.currentTimeMillis();  
> > > LOG.info("Time taken for the normal quelry "+(end - start)+" ms");  
> > > SearchHits sh = sr.getHits();  
> > > SearchHit searchHit = sh.getHits();  
> > > LOG.info("Hits :"+sh.getTotalHits()+", Docs fetched :"+searchHit.length);  
> > > /_for (SearchHit doc : searchHit) {  
> > > LOG.info("Document :"+doc.getSource().get("tweet\_id"));  
> > > }_/  
> > > }catch (Exception e) {  
> > > LOG.error(e.getMessage(), e);  
> > > }  
> > > }  
> > > private SearchResponse launchSearch(FilterBuilder filter, int size)  
> > > throws IOException {
> > > 
> > > FilteredQueryBuilder fqb = new FilteredQueryBuilder(QueryBuilders.matchAllQuery(),  
> > > filter);  
> > > SearchRequestBuilder srb = client.prepareSearch("twitter"  
> > > ).setTypes("tweet").setQuery(fqb);  
> > > if(aggregation != null){
> > > 
> > > srb.addAggregation(aggregation);  
> > > }  
> > > srb.setFrom(0).setSize(size);  
> > > SearchResponse response = srb.execute().actionGet();
> > > 
> > > ```
> > > return response;
> > > 
> > > ```
> > > 
> > > }
> > > 
> > > }
> > > 
> > > So the problem is this if i execute the block  
> > > \* for (int i = 0; i \< queryExecutionCount; i++) {\*  
> > > _sr = launchSearch(filter, 2000);_  
> > > _}_
> > > 
> > > with "_queryExecutionCount_" set to 1 it works however if I set to any  
> > > value greater than 1 it fails
> > > 
> > > On Friday, September 26, 2014 11:49:07 AM UTC+5:30, David Pilato wrote:
> > > 
> > > > How your Java code looks like?  
> > > > What was your curl query?
> > > > 
> > > > --  
> > > > David 😉  
> > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > 
> > > > Le 26 sept. 2014 à 07:34, Vijay Tiwary [vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) a écrit :
> > > > 
> > > > I am having a instance of "TransportClient" which is singleton in my  
> > > > web application. In one of the flow I have to query Elasticsearch twice  
> > > > one after the other. However, first call to Elasticsearch cluster is  
> > > > working and the other one is failing with the following exception:
> > > > 
> > > > No valid missing index type id: 38  
> > > > org.elasticsearch.ElasticsearchIllegalArgumentException: No valid  
> > > > missing index type id: 38  
> > > > at org.elasticsearch.action.support.IndicesOptions.readIndicesOptions(IndicesOptions.java:111)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.action.search.SearchRequest.readFrom(SearchRequest.java:505)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.transport.netty.MessageChannelHandler.  
> > > > handleRequest(MessageChannelHandler.java:209)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.transport.netty.MessageChannelHandler.  
> > > > messageReceived(MessageChannelHandler.java:109)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.  
> > > > handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> > > > sendUpstream(DefaultChannelPipeline.java:564)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$  
> > > > DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.Channels.  
> > > > fireMessageReceived(Channels.java:296) ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.  
> > > > unfoldAndFireMessageReceived(FrameDecoder.java:462)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.handler.codec.frame.  
> > > > FrameDecoder.callDecode(FrameDecoder.java:443)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.handler.codec.frame.  
> > > > FrameDecoder.messageReceived(FrameDecoder.java:303)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.  
> > > > handleUpstream(SimpleChannelUpstreamHandler.java:70)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> > > > sendUpstream(DefaultChannelPipeline.java:564)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$  
> > > > DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> > > > sendUpstream(DefaultChannelPipeline.java:564)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.  
> > > > sendUpstream(DefaultChannelPipeline.java:559)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.Channels.  
> > > > fireMessageReceived(Channels.java:268) ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.Channels.  
> > > > fireMessageReceived(Channels.java:255) ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.socket.nio.  
> > > > NioWorker.read(NioWorker.java:88) ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.socket.nio.  
> > > > AbstractNioWorker.process(AbstractNioWorker.java:108)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.socket.nio.  
> > > > AbstractNioSelector.run(AbstractNioSelector.java:318)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.socket.nio.  
> > > > AbstractNioWorker.run(AbstractNioWorker.java:89)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.channel.socket.nio.  
> > > > NioWorker.run(NioWorker.java:178) ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(  
> > > > ThreadRenamingRunnable.java:108) ~[elasticsearch-1.3.2.jar:na]  
> > > > at org.elasticsearch.common.netty.util.internal.  
> > > > DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)  
> > > > ~[elasticsearch-1.3.2.jar:na]  
> > > > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
> > > > ~[na:1.8.0\_11]  
> > > > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
> > > > ~[na:1.8.0\_11]  
> > > > at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0\_11]
> > > > 
> > > > ## There is no problem with the query that I have checked with curl. What is problem here?
> > > > 
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/8d1c25cc-2562-4914-9789-70ec091b54f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8d1c25cc-2562-4914-9789-70ec091b54f3%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/8d1c25cc-2562-4914-9789-70ec091b54f3%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8d1c25cc-2562-4914-9789-70ec091b54f3%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.54259a63.4db127f8.5f84%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.54259a63.4db127f8.5f84%40MacBook-Air-de-David.local)  
> [https://groups.google.com/d/msgid/elasticsearch/etPan.54259a63.4db127f8.5f84%40MacBook-Air-de-David.local?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/etPan.54259a63.4db127f8.5f84%40MacBook-Air-de-David.local?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCeYO2\_NmtyHbFmtN2Y9Uu-H5okL6sa%2Bq4uLuqOp\_2B%2Bw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCeYO2_NmtyHbFmtN2Y9Uu-H5okL6sa%2Bq4uLuqOp_2B%2Bw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 26, 2014, 8:53pm UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974/9 "2014-09-26T20:53:57Z")

</div>

Yeah. Still that's super strange it works for a single call.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 26 sept. 2014 à 22:49, Ivan Brusic [ivan@brusic.com](mailto:ivan@brusic.com) a écrit :

In general, newer client libraries should not be used with older clusters. Most of the version checking happens on the server side and the older code does not know about the newer client.

--  
Ivan

> On Fri, Sep 26, 2014 at 9:54 AM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:  
> I have no idea. Could be an issue.
> 
> Any chance you could create a small test project which reproduce it and share it on github?
> 
> --  
> David Pilato | Technical Advocate | [elasticsearch.com](http://elasticsearch.com)  
> [david.pilato@elasticsearch.com](mailto:david.pilato@elasticsearch.com)  
> @dadoonet | @elasticsearchfr | @scrutmydocs
> 
> > Le 26 septembre 2014 à 09:40:15, Vijay Tiwary ([vijaykr.tiwary@gmail.com](mailto:vijaykr.tiwary@gmail.com)) a écrit:
> > 
> > Hi David,
> > 
> > I have identified the problem. Actually the transport client that i was creating was like this:
> > 
> > Settings settings = ImmutableSettings.settingsBuilder().put("client.transport.sniff", true).build();  
> > client = new TransportClient(settings).addTransportAddress(new  
> > InetSocketTransportAddress("localhost", 9300));
> > 
> > However if turn off the sniff portion then its working fine.
> > 
> > I am testing in a single node cluster so why does setting sniff property to true is causing the problem?
> > 
> > > On Friday, September 26, 2014 12:33:46 PM UTC+5:30, Vijay Tiwary wrote:  
> > > I am using Elasticsearch 1.2.1 and java client for the same is 1.3.2
> > > 
> > > > On Friday, September 26, 2014 12:24:24 PM UTC+5:30, David Pilato wrote:  
> > > > Just checking. Which version you elasticsearch cluster is?
> > > > 
> > > > --  
> > > > David 😉  
> > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > 
> > > > Le 26 sept. 2014 à 08:28, Vijay Tiwary [vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) a écrit :
> > > > 
> > > > Blow is the junit test class:
> > > > 
> > > > public class BenchMarkES {  
> > > > private static final Logger LOG = LoggerFactory.getLogger(BenchMarkES.class);  
> > > > private static TransportClient client = null;  
> > > > @Before  
> > > > public void setUp() {  
> > > > Settings settings = ImmutableSettings.settingsBuilder().build();  
> > > > client = new TransportClient(settings).addTransportAddress(new  
> > > > InetSocketTransportAddress("localhost", 9300));  
> > > > }  
> > > > @Test  
> > > > public void doNormalQuery(){  
> > > > try{  
> > > > int queryExecutionCount = 5;  
> > > > SearchResponse sr = null;  
> > > > FilterBuilder filter = FilterBuilders.termFilter("brand\_context\_id","5");  
> > > > long start = System.currentTimeMillis();  
> > > > for (int i = 0; i \< queryExecutionCount; i++) {  
> > > > sr = launchSearch(filter, 2000);  
> > > > }  
> > > > long end = System.currentTimeMillis();  
> > > > LOG.info("Time taken for the normal quelry "+(end - start)+" ms");  
> > > > SearchHits sh = sr.getHits();  
> > > > SearchHit searchHit = sh.getHits();  
> > > > LOG.info("Hits :"+sh.getTotalHits()+", Docs fetched :"+searchHit.length);  
> > > > /_for (SearchHit doc : searchHit) {  
> > > > LOG.info("Document :"+doc.getSource().get("tweet\_id"));  
> > > > }_/  
> > > > }catch (Exception e) {  
> > > > LOG.error(e.getMessage(), e);  
> > > > }  
> > > > }  
> > > > private SearchResponse launchSearch(FilterBuilder filter, int size) throws IOException {
> > > > 
> > > > FilteredQueryBuilder fqb = new FilteredQueryBuilder(QueryBuilders.matchAllQuery(), filter);  
> > > > SearchRequestBuilder srb = client.prepareSearch("twitter").setTypes("tweet").setQuery(fqb);  
> > > > if(aggregation != null){
> > > > 
> > > > srb.addAggregation(aggregation);  
> > > > }  
> > > > srb.setFrom(0).setSize(size);  
> > > > SearchResponse response = srb.execute().actionGet();
> > > > 
> > > > ```
> > > > return response;
> > > > 
> > > > ```
> > > > 
> > > > }
> > > > 
> > > > }
> > > > 
> > > > So the problem is this if i execute the block  
> > > > for (int i = 0; i \< queryExecutionCount; i++) {  
> > > > sr = launchSearch(filter, 2000);  
> > > > }
> > > > 
> > > > with "queryExecutionCount" set to 1 it works however if I set to any value greater than 1 it fails
> > > > 
> > > > > On Friday, September 26, 2014 11:49:07 AM UTC+5:30, David Pilato wrote:  
> > > > > How your Java code looks like?  
> > > > > What was your curl query?
> > > > > 
> > > > > --  
> > > > > David 😉  
> > > > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > > > 
> > > > > Le 26 sept. 2014 à 07:34, Vijay Tiwary [vijaykr...@gmail.com](mailto:vijaykr...@gmail.com) a écrit :
> > > > > 
> > > > > I am having a instance of "TransportClient" which is singleton in my web application. In one of the flow I have to query Elasticsearch twice one after the other. However, first call to Elasticsearch cluster is working and the other one is failing with the following exception:
> > > > > 
> > > > > No valid missing index type id: 38  
> > > > > org.elasticsearch.ElasticsearchIllegalArgumentException: No valid missing index type id: 38  
> > > > > at org.elasticsearch.action.support.IndicesOptions.readIndicesOptions(IndicesOptions.java:111) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.action.search.SearchRequest.readFrom(SearchRequest.java:505) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest(MessageChannelHandler.java:209) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.transport.netty.MessageChannelHandler.messageReceived(MessageChannelHandler.java:109) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:318) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42) ~[elasticsearch-1.3.2.jar:na]  
> > > > > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0\_11]  
> > > > > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0\_11]  
> > > > > at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0\_11]
> > > > > 
> > > > > ## There is no problem with the query that I have checked with curl. What is problem here?
> > > > > 
> > > > > You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/46210f90-f49b-4bd6-a583-1ad6f13dd7c2%40googlegroups.com).  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).  
> > > > > --  
> > > > > You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7f127ee3-45c1-44a6-8a2a-62294f7aba37%40googlegroups.com).  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).  
> > > > > --  
> > > > > You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> > > > > To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8d1c25cc-2562-4914-9789-70ec091b54f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8d1c25cc-2562-4914-9789-70ec091b54f3%40googlegroups.com).  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.54259a63.4db127f8.5f84%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.54259a63.4db127f8.5f84%40MacBook-Air-de-David.local).
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCeYO2\_NmtyHbFmtN2Y9Uu-H5okL6sa%2Bq4uLuqOp\_2B%2Bw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQCeYO2_NmtyHbFmtN2Y9Uu-H5okL6sa%2Bq4uLuqOp_2B%2Bw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3A28A132-14FF-4087-B791-01DF70516D21%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/3A28A132-14FF-4087-B791-01DF70516D21%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:59am UTC](https://discuss.elastic.co/t/issue-with-elastic-search-transportclient-of-java-api/19974/10 "2017-07-06T00:59:40Z")

</div>


