[ 
https://issues.apache.org/jira/browse/NIFI-4376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160989#comment-16160989
 ] 

ASF GitHub Bot commented on NIFI-4376:
--------------------------------------

GitHub user ijokarumawak opened a pull request:

    https://github.com/apache/nifi/pull/2144

    NIFI-4376: Remove expired S2S request from internal queue.

    Before this fix, expired requests stay in the queue and blocks newly
    received requests to be offerred.
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ijokarumawak/nifi nifi-4376

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/2144.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2144
    
----
commit 7f4468b751210689546ec33ab2bb5504eb312a78
Author: Koji Kawamura <[email protected]>
Date:   2017-09-11T09:45:11Z

    NIFI-4376: Remove expired S2S request from internal queue.
    
    Before this fix, expired requests stay in the queue and blocks newly
    received requests to be offerred.

----


> Expired requests stay in StansdardRootGroupPort request queue and block new 
> request to be offered
> -------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-4376
>                 URL: https://issues.apache.org/jira/browse/NIFI-4376
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.0.1
>            Reporter: Koji Kawamura
>            Assignee: Koji Kawamura
>
> If the remote NiFi instance slows down for some reason, and S2S requests have 
> been timed out continuously, those timed out requests will remain in the 
> internal request queue at StandardRootGroupPort.
> Once number of queued requests becomes 1,000, newly received request can not 
> be offered to the queue, and RequestExpiredException is thrown. A S2S client 
> receives following error in this case:
> {code}
> 2017-09-11 16:32:38,137 ERROR [Timer-Driven Process Thread-4] 
> o.a.nifi.remote.StandardRemoteGroupPort 
> RemoteGroupPort[name=output,target=http://localhost:8080/nifi] failed to 
> communicate with http://localhost:8080/nifi due to java.io.IOException: 
> Unexpected response code: 500 errCode:Abort errMessage:<html>
> <head>
> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
> <title>Error 500 Server Error</title>
> </head>
> <body><h2>HTTP ERROR 500</h2>
> <p>Problem accessing 
> /nifi-api/data-transfer/output-ports/6fc7fa6d-015e-1000-27cb-d118b1b0fe13/transactions/73da9bcf-87ec-4594-8e45-a41965c1ed82/flow-files.
>  Reason:
> <pre>    Server Error</pre></p><h3>Caused by:</h3><pre>java.io.IOException: 
> Failed to process the request.
>         at 
> org.apache.nifi.web.api.DataTransferResource$1.write(DataTransferResource.java:676)
>         at 
> com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
> ...
> <h3>Caused 
> by:</h3><pre>org.apache.nifi.remote.exception.RequestExpiredException
>         at 
> org.apache.nifi.remote.StandardRootGroupPort.transferFlowFiles(StandardRootGroupPort.java:562)
>         at 
> org.apache.nifi.web.api.DataTransferResource$1.write(DataTransferResource.java:668)
> {code}
> Once a NiFi instance owning the root group port enters this state, it will 
> not be able to recover automatically as its client keeps retrying too often. 
> And the returned error message is not clear to understand what is happening.
> The remote NiFi instance should remove already expired requests from its 
> internal queue, so that newly received requests are processed correctly, and 
> return 'read timeout' error response if it can not be processed and expired.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to