It looks to be having trouble connecting to the ElasticSearch instance.
Are you hosted at AWS? Are you using https and have the appropriate SSL
Context setup? If your using AWS you need the SSL context and a
username/password for the ES instance. Is there any firewall rules
blocking anything? This is the line that is throwing the exception:
getResponse = sendRequestToElasticsearch(okHttpClient, url,
username, password, "PUT", requestBody);
and then the abstract http process is having trouble at line 166:
Response responseHttp = client.newCall(httpRequest).execute();
On Sun, Dec 4, 2016 at 12:50 PM, Arsalan Siddiqi <[email protected]>
wrote:
> I am reading a CSV file. converting it into JSON and splitting it based on
> records. I try to write these files into Elastic. I get the following
> error:
>
> 2016-12-04 19:42:18,008 ERROR [Timer-Driven Process Thread-10]
> o.a.n.p.e.PutElasticsearchHttp
> PutElasticsearchHttp[id=ca053faa-0158-1000-8397-413cc421f011]
> PutElasticsearchHttp[id=ca053faa-0158-1000-8397-413cc421f011] failed to
> process due to org.apache.nifi.processor.exception.ProcessException:
> java.net.SocketException: Connection reset by peer: socket write error;
> rolling back session: org.apache.nifi.processor.
> exception.ProcessException:
> java.net.SocketException: Connection reset by peer: socket write error
> 2016-12-04 19:42:18,017 ERROR [Timer-Driven Process Thread-10]
> o.a.n.p.e.PutElasticsearchHttp
> org.apache.nifi.processor.exception.ProcessException:
> java.net.SocketException: Connection reset by peer: socket write error at
> org.apache.nifi.processors.elasticsearch.PutElasticsearchHttp.onTrigger(
> PutElasticsearchHttp.java:315)
> ~[nifi-elasticsearch-processors-1.0.0.jar:1.0.0] at
> org.apache.nifi.processor.AbstractProcessor.onTrigger(
> AbstractProcessor.java:27)
> ~[nifi-api-1.0.0.jar:1.0.0] at
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(
> StandardProcessorNode.java:1064)
> [nifi-framework-core-1.0.0.jar:1.0.0] at
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(
> ContinuallyRunProcessorTask.java:136)
> [nifi-framework-core-1.0.0.jar:1.0.0] at
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(
> ContinuallyRunProcessorTask.java:47)
> [nifi-framework-core-1.0.0.jar:1.0.0] at
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(
> TimerDrivenSchedulingAgent.java:132)
> [nifi-framework-core-1.0.0.jar:1.0.0] at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> [na:1.8.0_101] at
> java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> [na:1.8.0_101] at
> java.util.concurrent.ScheduledThreadPoolExecutor$
> ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> [na:1.8.0_101] at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(
> ScheduledThreadPoolExecutor.java:294)
> [na:1.8.0_101] at
> java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1142)
> [na:1.8.0_101] at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:617)
> [na:1.8.0_101] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
> Caused by: java.net.SocketException: Connection reset by peer: socket write
> error at java.net.SocketOutputStream.socketWrite0(Native Method)
> ~[na:1.8.0_101] at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
> ~[na:1.8.0_101] at
> java.net.SocketOutputStream.write(SocketOutputStream.java:153)
> ~[na:1.8.0_101] at okio.Okio$1.write(Okio.java:80) ~[okio-1.8.0.jar:na] at
> okio.AsyncTimeout$1.write(AsyncTimeout.java:180) ~[okio-1.8.0.jar:na] at
> okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:171)
> ~[okio-1.8.0.jar:na] at
> okio.RealBufferedSink.write(RealBufferedSink.java:41) ~[okio-1.8.0.jar:na]
> at
> okhttp3.internal.http.Http1xStream$FixedLengthSink.
> write(Http1xStream.java:286)
> ~[okhttp-3.3.1.jar:na] at
> okio.RealBufferedSink.emitCompleteSegments(RealBufferedSink.java:171)
> ~[okio-1.8.0.jar:na] at
> okio.RealBufferedSink.write(RealBufferedSink.java:91) ~[okio-1.8.0.jar:na]
> at okhttp3.RequestBody$2.writeTo(RequestBody.java:96)
> ~[okhttp-3.3.1.jar:na]
> at
> okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.
> proceed(HttpEngine.java:756)
> ~[okhttp-3.3.1.jar:na] at
> okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:613)
> ~[okhttp-3.3.1.jar:na] at okhttp3.RealCall.getResponse(RealCall.java:244)
> ~[okhttp-3.3.1.jar:na] at
> okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201)
> ~[okhttp-3.3.1.jar:na] at
> okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
> ~[okhttp-3.3.1.jar:na] at okhttp3.RealCall.execute(RealCall.java:57)
> ~[okhttp-3.3.1.jar:na] at
> org.apache.nifi.processors.elasticsearch.AbstractElasticsearchHttpProce
> ssor.sendRequestToElasticsearch(AbstractElasticsearchHttpProce
> ssor.java:166)
> ~[nifi-elasticsearch-processors-1.0.0.jar:1.0.0] at
> org.apache.nifi.processors.elasticsearch.PutElasticsearchHttp.onTrigger(
> PutElasticsearchHttp.java:313)
> ~[nifi-elasticsearch-processors-1.0.0.jar:1.0.0] ... 12 common frames
> omitted
>
> Any help is highly appriciated
>
>
>
> --
> View this message in context: http://apache-nifi-developer-
> list.39713.n7.nabble.com/PutElasticSearchHttp-Connection-reset-by-peer-
> socket-write-error-tp14135.html
> Sent from the Apache NiFi Developer List mailing list archive at
> Nabble.com.
>
--
Ronnie Dove