If you turn off your sniff settings to false it will work.

On Wednesday, January 8, 2014 2:11:10 AM UTC+5:30, Search User wrote:
>
> I have a web application in which I create a Transport Client using Spring 
> (singleton) and inject it into my service. When I receive a request in my 
> controller, controller calls the service and service uses the transport 
> client to execute the query and return the results. When I deploy this 
> application in tomcat, I have the client created but when I execute the 
> query, client hangs. 
>
> If I create the client for every request (in my service) and run the 
> query, everything is fine. Can some one help me understand this behavior?
>
> Following is my code to create the Client object.
>
> Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name"
> , "mysearchcluster").put("client.transport.sniff", true).build();
> Client client = new TransportClient(settings).addTransportAddress(new 
> InetSocketTransportAddress("10.150.200.101", 9300));
>
>
>
> Thanks
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/f48f2929-f9e9-4576-823b-42563004fe10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to