Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-4959

HandleHttpRequest processor doesn't close/release incomplete message error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.0
    • 1.6.0
    • Core Framework
    • None
    • Linux, all versions of nifi-1.X

    Description

      I am doing some testing with the HandleHttpRequest processor. My specific test, involves sending an incomplete request and closing the connection from the sending system.  Initially, it throws the error I expect, but it keeps throwing the error over and over based on the request expiration configured in the StandardHttpContextMap controller service.
      The only way to stop the error message is to stop the processor. In my test, I saw one failed request throw an error six times before I stopped the processor.

      It doesn't seems to terminate the request on the NiFi side.

      Sample HTTP request

       

      POST/ HTTP/ 1.1

      Host: foo.com

      Content-Type: text/plain

      Content-Length: 130

      say=Hi&to-Mom

       

      I use the telnet command to connect to the system with the processor listening, post the message above , close the connection, and then the processor starts throws the following error indefinitely

      2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] o.a.n.p.standard.HandleHttpRequest HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process session due to org.apache.nifi.processor.exception.FlowFileAccessException: Failed to import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0] due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
      org.apache.nifi.processor.exception.FlowFileAccessException: Failed to import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0] due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
      at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2942)
      at org.apache.nifi.processors.standard.HandleHttpRequest.onTrigger(HandleHttpRequest.java:517)
      at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
      at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1123)
      at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
      at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
      at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128)
      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:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
      at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2935)
      ... 13 common frames omitted
      Caused by: org.eclipse.jetty.io.EofException: Early EOF
      at org.eclipse.jetty.server.HttpInput$3.getError(HttpInput.java:1104)
      at org.eclipse.jetty.server.HttpInput$3.noContent(HttpInput.java:1093)
      at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:307)
      at java.io.InputStream.read(InputStream.java:101)
      at org.apache.nifi.stream.io.StreamUtils.copy(StreamUtils.java:35)
      at org.apache.nifi.controller.repository.FileSystemRepository.importFrom(FileSystemRepository.java:734)
      at org.apache.nifi.controller

       

       

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dawynne Wynner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: