Closed MistAssassin closed 6 years ago
If I'm right about what's going on, the reason for the empty body is that there are no records to bulk index. "Processed 0 CDR records". (This is more common than one might expect for any given CDR *csv file). This condition ought to be detected by the flushing mechanism and it should not try to send an empty bulk index request in this situation, but it looks like the CDR processor doesn't have that code yet. We have a bug report to track this and a fix should be available in our upcoming release.
In the short term, if the exception is preventing additional (non-empty) files from being processed, you should be able to safely move the file manually from /data/bwcdr/new/ to /data/bwcdr/archive/.
Pulled a csv that I confirmed had CDRs in them. And the processor loaded everything properly. I imagine that what you said was accurate. Thank you.
I am in the process of setting up the cdrprocessor, and am running into a 400 error. Running a tcpdump, it appears that the payload is not being attached. Any assistance would be appreciated.
2018-02-08_11:01:34.625 [main] INFO c.b.elasticcdrimporter.AppProperties - Property STARTPATH resolved to </etc/bw/bwcdrprocessor/bwcdrprocessor_1003> 2018-02-08_11:01:34.631 [main] INFO c.b.elasticcdrimporter.AppProperties - Property ELASTICHOST resolved to <10.128.4.72> 2018-02-08_11:01:34.632 [main] INFO c.b.elasticcdrimporter.AppProperties - Property ELASTICPORT resolved to <9200> 2018-02-08_11:01:34.632 [main] INFO c.b.elasticcdrimporter.AppProperties - Property ELASTICPORT resolved to <9200> 2018-02-08_11:01:34.632 [main] INFO c.b.elasticcdrimporter.AppProperties - Property ELASTICCLUSTER resolved to
2018-02-08_11:01:34.632 [main] INFO c.b.elasticcdrimporter.AppProperties - Property ESAUTHUSER resolved to
2018-02-08_11:01:34.632 [main] INFO c.b.elasticcdrimporter.AppProperties - Property ESAUTHPASS resolved to
2018-02-08_11:01:35.202 [main] INFO c.b.e.ElasticInterface - Connection successful to ES
2018-02-08_11:01:35.207 [main] INFO c.b.e.ElasticImporter - Processing a single file -> /data/bwcdr/new/BW-CDR-20180208110000-2-00145E17A9FC-056365.csv
2018-02-08_11:01:35.207 [main] INFO c.b.e.ElasticImporter - Processing => /data/bwcdr/new/BW-CDR-20180208110000-2-00145E17A9FC-056365.csv
2018-02-08_11:01:35.211 [main] INFO c.b.elasticcdrimporter.CSVLoader - Processed 0 CDR records
2018-02-08_11:01:35.319 [I/O dispatcher 1] INFO c.b.e.ElasticInterface - onFailure: duration 105 Exception
org.elasticsearch.client.ResponseException: POST http://10.128.4.72:9200/_bulk: HTTP/1.1 400 Bad Request
{"error":{"root_cause":[{"type":"parse_exception","reason":"request body is required"}],"type":"parse_exception","reason":"request body is required"},"status":400}
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:311)
at org.elasticsearch.client.RestClient$1.completed(RestClient.java:300)
at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:119)
at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.responseCompleted(DefaultClientExchangeHandlerImpl.java:177)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.processResponse(HttpAsyncRequestExecutor.java:436)
at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.inputReady(HttpAsyncRequestExecutor.java:326)
at org.apache.http.impl.nio.DefaultNHttpClientConnection.consumeInput(DefaultNHttpClientConnection.java:265)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:81)
at org.apache.http.impl.nio.client.InternalIODispatch.onInputReady(InternalIODispatch.java:39)
at org.apache.http.impl.nio.reactor.AbstractIODispatch.inputReady(AbstractIODispatch.java:114)
at org.apache.http.impl.nio.reactor.BaseIOReactor.readable(BaseIOReactor.java:162)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:337)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:315)
at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:276)
at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:588)
at java.lang.Thread.run(Thread.java:748)