Skip to content

NIFI-4700: Moved all PostHTTP http clients, http responses to try-with-resources#2434

Closed
m-hogue wants to merge 1 commit intoapache:masterfrom
m-hogue:NIFI-4700
Closed

NIFI-4700: Moved all PostHTTP http clients, http responses to try-with-resources#2434
m-hogue wants to merge 1 commit intoapache:masterfrom
m-hogue:NIFI-4700

Conversation

@m-hogue
Copy link
Copy Markdown
Member

@m-hogue m-hogue commented Jan 25, 2018

… 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?
  • 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.

@mosermw
Copy link
Copy Markdown
Member

mosermw commented Feb 2, 2018

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)

@m-hogue m-hogue closed this Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants