You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by m-hogue <gi...@git.apache.org> on 2018/01/25 19:51:58 UTC
[GitHub] nifi pull request #2434: NIFI-4700: Moved all PostHTTP http clients, http re...
GitHub user m-hogue opened a pull request:
https://github.com/apache/nifi/pull/2434
NIFI-4700: Moved all PostHTTP http clients, http responses to try-with-resources
… to make sure they're closed
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:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [ ] 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.
- [ ] Has your PR been rebased against the latest commit within the target branch (typically master)?
- [ ] 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/m-hogue/nifi NIFI-4700
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/nifi/pull/2434.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 #2434
----
commit 44799ba670d06bbe1403373ce3fee6b8646a1a83
Author: m-hogue <ho...@...>
Date: 2018-01-25T19:51:00Z
NIFI-4700: Moved all http clients, http responses to try-with-resources to make sure they're closed
----
---
[GitHub] nifi pull request #2434: NIFI-4700: Moved all PostHTTP http clients, http re...
Posted by m-hogue <gi...@git.apache.org>.
Github user m-hogue closed the pull request at:
https://github.com/apache/nifi/pull/2434
---
[GitHub] nifi issue #2434: NIFI-4700: Moved all PostHTTP http clients, http responses...
Posted by mosermw <gi...@git.apache.org>.
Github user mosermw commented on the issue:
https://github.com/apache/nifi/pull/2434
Hi @m-hogue I got an error when trying to test PostHTTP sending to a ListenHTTP with this PR.
2018-02-02 22:15:43,007 ERROR [Timer-Driven Process Thread-7] o.a.nifi.processors.standard.PostHTTP PostHTTP[id=01611004-47b6-1aa6-0836-08b0dc270fae] Failed to Post StandardFlowFileRecord[uuid=ac9ba210-264f-43
b3-bfcf-34bc4c566932,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1517609573204-1, container=default, section=1], offset=364938, length=121646],offset=0,name=nifi-app.log.txt,size=121646]
to http://localhost:7777/contentListener: sent content and received status code 303:See Other but no Hold URI
2018-02-02 22:15:43,020 ERROR [Timer-Driven Process Thread-7] o.a.nifi.processors.standard.PostHTTP PostHTTP[id=01611004-47b6-1aa6-0836-08b0dc270fae] PostHTTP[id=01611004-47b6-1aa6-0836-08b0dc270fae] failed to
process due to java.lang.IllegalStateException: Connection pool shut down; rolling back session: {}
java.lang.IllegalStateException: Connection pool shut down
at org.apache.http.util.Asserts.check(Asserts.java:34)
at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:184)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.requestConnection(PoolingHttpClientConnectionManager.java:257)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:176)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.nifi.processors.standard.PostHTTP.onTrigger(PostHTTP.java:643)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122)
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:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
---