Bulk request to ES isnt working - Certificate issue #228
Comments
Seems to be a connection problem. Can you curl your es cluster? How are you securing your cluster? |
Yes. curl works fine. Right now, in my localhost there is no security mechanism. |
I think this bulk posting issue is solved. Apparently I havent set my ES config properly. I had left with it the default config itself. But not sure how come the port no is 9300(See in the log below)
Also since my localhost is only a single node cluster, i changed my stagemonitor.properties accordingly=>
Found this after checking the ES logs:
|
I have another issue as mentioned earlier. Please look into this. #230 |
Try setting number of replicas to 0. As you only have 1 node you cant replicate your shards to other nodes. |
Hi, I am not able to send data to es5.x Following is my stagemonitor.properties While starting the application, I get the following logs and then no logs regarding stagemonitor,(no errors or warns).
When checked ES logs, found the following exception:
How do i provide Client Certificate SSL support here? |
We resolved the certificate issue. We made a proxy pass in apache. from some.domain.com to es.ip.address |
Closing this ticket |
Hi,
Whenever I start my application, Stagemonitor gets initialized properly, but then when it is supposed to send metrics, it fails.
Logs:
20 Dec 2016 02:12:15,034 WARN [stagemonitor-elasticsearch-reporter] HttpClient:105 - [] - [] - Error sending POST request to url http://localhost:9200/_bulk: Read timed out
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method) ~[?:1.8.0_71]
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116) ~[?:1.8.0_71]
at java.net.SocketInputStream.read(SocketInputStream.java:170) ~[?:1.8.0_71]
at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:1.8.0_71]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) ~[?:1.8.0_71]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286) ~[?:1.8.0_71]
at java.io.BufferedInputStream.read(BufferedInputStream.java:345) ~[?:1.8.0_71]
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:704) ~[?:1.8.0_71]
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:647) ~[?:1.8.0_71]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1536) ~[?:1.8.0_71]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441) ~[?:1.8.0_71]
at org.stagemonitor.core.util.HttpClient.send(HttpClient.java:96) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.metrics.metrics2.ElasticsearchReporter.reportMetrics(ElasticsearchReporter.java:73) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.metrics.metrics2.ScheduledMetrics2Reporter.report(ScheduledMetrics2Reporter.java:45) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.metrics.metrics2.ScheduledMetrics2Reporter$1.run(ScheduledMetrics2Reporter.java:101) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_71]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_71]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_71]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_71]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_71]
20 Dec 2016 02:12:15,036 WARN [stagemonitor-elasticsearch-reporter] HttpClient:106 - [] - [] - Error handling error response for POST request to url http://localhost:9200/_bulk: No content to map due to end-of-input
at [Source: UNKNOWN; line: 1, column: 0]
com.fasterxml.jackson.databind.JsonMappingException: No content to map due to end-of-input
at [Source: UNKNOWN; line: 1, column: 0]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270) ~[jackson-databind-2.8.4.jar:2.8.4]
at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3838) ~[jackson-databind-2.8.4.jar:2.8.4]
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3783) ~[jackson-databind-2.8.4.jar:2.8.4]
at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:2321) ~[jackson-databind-2.8.4.jar:2.8.4]
at org.stagemonitor.core.elasticsearch.ElasticsearchClient$BulkErrorReportingResponseHandler.handleResponse(ElasticsearchClient.java:344) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.elasticsearch.ElasticsearchClient$BulkErrorReportingResponseHandler.handleResponse(ElasticsearchClient.java:335) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.util.HttpClient.send(HttpClient.java:103) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.metrics.metrics2.ElasticsearchReporter.reportMetrics(ElasticsearchReporter.java:73) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.metrics.metrics2.ScheduledMetrics2Reporter.report(ScheduledMetrics2Reporter.java:45) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.metrics.metrics2.ScheduledMetrics2Reporter$1.run(ScheduledMetrics2Reporter.java:101) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_71]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_71]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_71]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_71]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_71]
20 Dec 2016 02:12:15,037 ERROR [stagemonitor-elasticsearch-reporter] ScheduledMetrics2Reporter:103 - [] - [] - RuntimeException thrown from #report. Exception was suppressed.
java.lang.NullPointerException
at org.stagemonitor.core.util.IOUtils.copy(IOUtils.java:24) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.util.IOUtils.readToBytes(IOUtils.java:84) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.util.HttpClient.send(HttpClient.java:108) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.metrics.metrics2.ElasticsearchReporter.reportMetrics(ElasticsearchReporter.java:73) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.metrics.metrics2.ScheduledMetrics2Reporter.report(ScheduledMetrics2Reporter.java:45) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at org.stagemonitor.core.metrics.metrics2.ScheduledMetrics2Reporter$1.run(ScheduledMetrics2Reporter.java:101) ~[stagemonitor-core-0.29.1.jar:0.29.1]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_71]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) ~[?:1.8.0_71]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) ~[?:1.8.0_71]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) ~[?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_71]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_71]
Also had another doubt: where do I give credentials for ES as needed for my production ES.
Please advice.
Thanks
The text was updated successfully, but these errors were encountered: