Yes.
On Wed, Jun 25, 2014 at 5:26 PM, Cédric Hourcade <[email protected]> wrote: > Hello, > > Does it work out of JEST, with a simple curl? > > Cédric Hourcade > [email protected] > > > On Wed, Jun 25, 2014 at 1:43 PM, anuj maheshwari > <[email protected]> wrote: > > Any one having inputs on this? > > > > > > On Wednesday, 25 June 2014 13:53:29 UTC+5:30, anuj maheshwari wrote: > >> > >> Hi, > >> > >> I am evaluating Log Stash and Elastic Search for one of our > requirement. I > >> have to query data from Elastic Search in a Java Application. I am > trying to > >> use JEST to make a HTTP/REST call to ES. When I am trying to add a > simple > >> index in ES using Jest Client, I am getting > >> "java.net.SocketTimeoutException: Read timed out" exception at the time > of > >> client execute statement. > >> > >> HttpClientConfig clientConfig = new > >> HttpClientConfig.Builder("http://My_Host:9200 > ").readTimeout(20000).multiThreaded(true).build(); > >> JestClientFactory factory = new JestClientFactory(); > >> factory.setHttpClientConfig(clientConfig); > >> > >> JestHttpClient jestClient = (JestHttpClient) > factory.getObject(); > >> > >> jestClient.execute(new CreateIndex.Builder("myIndex").build()); > // > >> Here I am getting Socket Read Timeout Exception. > >> > >> > >> > >> Below is the full error stack trace - > >> > >> > >> Exception in thread "main" java.net.SocketTimeoutException: Read timed > out > >> at java.net.SocketInputStream.socketRead0(Native Method) > >> at java.net.SocketInputStream.read(SocketInputStream.java:150) > >> at java.net.SocketInputStream.read(SocketInputStream.java:121) > >> at > >> > org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:136) > >> at > >> > org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:152) > >> at > >> > org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:270) > >> at > >> > org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140) > >> at > >> > org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57) > >> at > >> > org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260) > >> at > >> > org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:161) > >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > >> at > >> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > >> at > >> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > >> at java.lang.reflect.Method.invoke(Method.java:601) > >> at org.apache.http.impl.conn.CPoolProxy.invoke(CPoolProxy.java:138) > >> at com.sun.proxy.$Proxy0.receiveResponseHeader(Unknown Source) > >> at > >> > org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271) > >> at > >> > org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123) > >> at > >> > org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:254) > >> at > >> > org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) > >> at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86) > >> at > >> > org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) > >> at > >> > org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186) > >> at > >> > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) > >> at > >> > org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) > >> at > io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:59) > >> at webservice.ESClient.main(ESClient.java:50) > >> Process exited with exit code 1. > >> > > -- > > 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/df69cde1-f433-45f3-a69f-b15e700e1b69%40googlegroups.com > . > > > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "elasticsearch" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/elasticsearch/gsweC_svK38/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/CAJQxjPOjKR3hsFp046h8o4o%3DBO4n%3Dwi%3DhDBd4z%2BhEfk_VODUiA%40mail.gmail.com > . > For more options, visit 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CACtah4q2kutdumRhsQfkno%2B80Wi5Eci8%2BGsrs46roKfFiTDqQg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
