Created 10-15-2023 11:06 AM
Nifi Error : failed to import data from buffer | unable to create content claim due to Java io EOFException.
Please help to resolve this nifi UI issue .
Created 10-16-2023 04:28 AM
@AhmedParvez Welcome to the Cloudera Community!
To help you get the best possible solution, I have tagged our NiFi experts @SAMSAL @cotopaul who may be able to assist you further.
Please keep us updated on your post, and we hope you find a satisfactory solution to your query.
Regards,
Diana Torres,Created 10-16-2023 06:39 AM
@AhmedParvez,
If you need assistance with a problem, please make sure that you write everything in the post. Right now, you post does not contain any information regarding what you are trying to do 🙂 What is the input of that InvokeHTTP Processor and what are you trying to call and how? What is the answer you expect?
So basically the only possible answer you can get from how you described your post is:
You have a problem in your processor. Take a look into what you are doing and correct your mistake, as this will solve your problem.
Created 10-16-2023 11:02 AM
I have attached screenshots of the error if this can help. I am getting this error in invoke http processor where i am sending any api request though request successful getting following error message as - Processing failed : flow file [filename :xxx] : failed to import data from buffer (responsebodysource ()).due to org.apache.nifi.processor.exception.flowfileexception : unable to create contentclaim due to java.io.EOFException
Created 10-17-2023 12:39 AM
As you know, EOF is an exception in Java that occurs when an end of file or end of stream is reached unexpectedly during input. In your case, if you receive this error, most likely you are sending the API call somehow wrong and you need to have a look at it.
In addition to this, check the nifi-app.log file to see the entire stack trace of the error message, as the bulletin board might not show you the entire error message 🙂
Besides that, are you certain that you have open connectivity between your NiFi Instance and the API Endpoint you are trying to call?
Created 10-17-2023 11:16 PM
Thanks for the answer. following is the complete stack trace log.
2023-10-10 14:01:01,542 INFO [main] o.e.jetty.server.handler.ContextHandler Started o.e.j.w.WebAppContext@15e0fe05{nifi-api,/nifi-api,file:///opt/exgw/nifi-1.17.0/work/jetty/nifi-web-api-1.17.0.war/webapp/,AVAILABLE}{./work/nar/extensions/nifi-server-nar-1.17.0.nar-unpacked/NAR-INF/bundled-dependencies/nifi-web-api-1.17.0.war}
2023-10-10 14:01:01,703 ERROR [Timer-Driven Process Thread-1] o.a.nifi.processors.standard.InvokeHTTP InvokeHTTP[id=22ec0a77-b91f-3a2a-e19b-dab6e46e0717] Request Processing failed: StandardFlowFileRecord[uuid=893fd559-fd28-475b-b2d1-e94fbf566d86,claim=,offset=0,name=893fd559-fd28-475b-b2d1-e94fbf566d86,size=0]
org.apache.nifi.processor.exception.FlowFileAccessException: Failed to import data from buffer(ResponseBodySource(okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource@1de64fd6)).inputStream() for StandardFlowFileRecord[uuid=f4327acc-d1ea-4450-a5ad-89723bfafec6,claim=,offset=0,name=893fd559-fd28-475b-b2d1-e94fbf566d86,size=0] due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.io.EOFException
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3580)
at org.apache.nifi.processors.standard.InvokeHTTP.onTrigger(InvokeHTTP.java:1008)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1356)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:246)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:102)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.io.EOFException
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3573)
... 13 common frames omitted
Caused by: java.io.EOFException: null
at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
at okio.RealBufferedSource.readHexadecimalUnsignedLong(RealBufferedSource.kt:381)
at okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.readChunkSize(Http1ExchangeCodec.kt:429)
at okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.read(Http1ExchangeCodec.kt:408)
at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:276)
at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
at java.io.InputStream.read(InputStream.java:101)
at org.apache.nifi.controller.repository.io.TaskTerminationInputStream.read(TaskTerminationInputStream.java:62)
at org.apache.nifi.stream.io.StreamUtils.copy(StreamUtils.java:35)
at org.apache.nifi.controller.repository.FileSystemRepository.importFrom(FileSystemRepository.java:837)
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3570)
... 13 common frames omitted
Created 10-27-2023 03:12 AM
Thanks for the answer. following is the complete stack trace log.
2023-10-10 14:01:01,542 INFO [main] o.e.jetty.server.handler.ContextHandler Started o.e.j.w.WebAppContext@15e0fe05{nifi-api,/nifi-api,file:///opt/exgw/nifi-1.17.0/work/jetty/nifi-web-api-1.17.0.war/webapp/,AVAILABLE}{./work/nar/extensions/nifi-server-nar-1.17.0.nar-unpacked/NAR-INF/bundled-dependencies/nifi-web-api-1.17.0.war}
2023-10-10 14:01:01,703 ERROR [Timer-Driven Process Thread-1] o.a.nifi.processors.standard.InvokeHTTP InvokeHTTP[id=22ec0a77-b91f-3a2a-e19b-dab6e46e0717] Request Processing failed: StandardFlowFileRecord[uuid=893fd559-fd28-475b-b2d1-e94fbf566d86,claim=,offset=0,name=893fd559-fd28-475b-b2d1-e94fbf566d86,size=0]
org.apache.nifi.processor.exception.FlowFileAccessException: Failed to import data from buffer(ResponseBodySource(okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource@1de64fd6)).inputStream() for StandardFlowFileRecord[uuid=f4327acc-d1ea-4450-a5ad-89723bfafec6,claim=,offset=0,name=893fd559-fd28-475b-b2d1-e94fbf566d86,size=0] due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.io.EOFException
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3580)
at org.apache.nifi.processors.standard.InvokeHTTP.onTrigger(InvokeHTTP.java:1008)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1356)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:246)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:102)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.io.EOFException
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3573)
... 13 common frames omitted
Caused by: java.io.EOFException: null
at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
at okio.RealBufferedSource.readHexadecimalUnsignedLong(RealBufferedSource.kt:381)
at okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.readChunkSize(Http1ExchangeCodec.kt:429)
at okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.read(Http1ExchangeCodec.kt:408)
at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:276)
at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
at java.io.InputStream.read(InputStream.java:101)
at org.apache.nifi.controller.repository.io.TaskTerminationInputStream.read(TaskTerminationInputStream.java:62)
at org.apache.nifi.stream.io.StreamUtils.copy(StreamUtils.java:35)
at org.apache.nifi.controller.repository.FileSystemRepository.importFrom(FileSystemRepository.java:837)
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3570)
... 13 common frames omitted
Created 10-22-2023 07:07 AM
Created 10-22-2023 11:11 PM
@AhmedParvez, have a look on what I told you in the previous post. EOF means that most likely you are sending the API call somehow wrong and you need to have a look at it. Try making that same exact API call from Postman or from Python (or actually anything you know how to use) and see if you encounter the same problem. Unfortunately this is not a NiFi Problem but a configuration problem and as you are very reluctant in providing all the details, nobody will be able to help you with your request 😞
Set your processor on debug and see what you can get extra from there as well. Maybe it will provide you with the necessary info to find your error.