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

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

GitHub user joshanderton opened a pull request:

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

    NIFI-4655: Fixed NPE in the InvokeHTTP processor 

    NIFI-4655: Fixed NPE in the InvokeHTTP processor caused when an 
SSLContextService was assigned without keystore properties.  
    
    - Added check for keystore properties and only initialized keystore when 
necessary. 
    - Added TestInvokeHttpTwoWaySSL test class to test with two-way SSL
    - Modified TestInvokeHttpSSL to test with one-way SSL
    
    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:
    - [x] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
    - [x] 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/joshanderton/nifi NIFI-4655

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

    https://github.com/apache/nifi/pull/2347.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 #2347
    
----
commit dfdf37e5e3f23e6837c5ac5f46fb303be4389cd0
Author: Josh Anderton <[email protected]>
Date:   2017-12-18T02:01:34Z

    NIFI-4655: Fixed NPE in the InvokeHTTP processor caused when an 
SSLContextService was assigned without keystore properties
    
    - Added check for keystore properties and only initialized keystore when 
necessary. 
    - Added TestInvokeHttpTwoWaySSL test class to test with two-way SSL
    - Modified TestInvokeHttpSSL to test with one-way SSL

----


> NPE when starting InvokeHTTP in secure cluster.
> -----------------------------------------------
>
>                 Key: NIFI-4655
>                 URL: https://issues.apache.org/jira/browse/NIFI-4655
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.4.0
>         Environment: Running NiFi 1.4.0 on a small 3 node cluster (Ubuntu 
> 14.04.5 LTS), configured to use the OIDC for Auth.  I setup the ssl/tls using 
> the nifi-toolkit for the cluster config.
>            Reporter: dan young
>         Attachments: invoke-http-1-config.png, invoke-http-2-config.png
>
>
> We're trying to migrate from a unsecure NiFi 1.3.0 cluster (everything 
> working in the NiFi 1.3 cluster) to a secure 1.4.0 cluster.  When we try to 
> start the configured InvokeHTTP processor,  we're seeing the following in the 
> logs:
> 2017-12-04 18:18:49,701 ERROR [StandardProcessScheduler Thread-7] 
> org.apache.nifi.engine.FlowEngine A flow controller task execution stopped 
> abnormally
> java.util.concurrent.ExecutionException: 
> java.lang.reflect.InvocationTargetException
>       at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>       at java.util.concurrent.FutureTask.get(FutureTask.java:192)
>       at org.apache.nifi.engine.FlowEngine.afterExecute(FlowEngine.java:100)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1157)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>       at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.reflect.InvocationTargetException: null
>       at sun.reflect.GeneratedMethodAccessor1028.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:70)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:47)
>       at 
> org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1306)
>       at 
> org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1302)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>       ... 2 common frames omitted
> Caused by: java.lang.NullPointerException: null
> 2017-12-04 18:18:49,702 ERROR [StandardProcessScheduler Thread-8] 
> o.a.nifi.processors.standard.InvokeHTTP 
> InvokeHTTP[id=ae055c76-88b8-3c86-bd1e-06ca4dcb43d5] 
> InvokeHTTP[id=ae055c76-88b8-3c86-bd1e-06ca4dcb43d5] failed to invoke 
> @OnScheduled method due to java.lang.RuntimeException: Failed while executing 
> one of processor's OnScheduled task.; processor will not be scheduled to run 
> for 30 seconds: java.lang.RuntimeException: Failed while executing one of 
> processor's OnScheduled task.
> java.lang.RuntimeException: Failed while executing one of processor's 
> OnScheduled task.
>       at 
> org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1483)
>       at 
> org.apache.nifi.controller.StandardProcessorNode.access$000(StandardProcessorNode.java:103)
>       at 
> org.apache.nifi.controller.StandardProcessorNode$1.run(StandardProcessorNode.java:1302)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>       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)
> Caused by: java.util.concurrent.ExecutionException: 
> java.lang.reflect.InvocationTargetException
>       at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>       at java.util.concurrent.FutureTask.get(FutureTask.java:206)
>       at 
> org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1466)
>       ... 9 common frames omitted
> Caused by: java.lang.reflect.InvocationTargetException: null
>       at sun.reflect.GeneratedMethodAccessor1028.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:70)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:47)
>       at 
> org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1306)
>       at 
> org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1302)
>       ... 6 common frames omitted
> Caused by: java.lang.NullPointerException: null
> 2017-12-04 18:18:49,702 ERROR [StandardProcessScheduler Thread-8] 
> o.a.n.controller.StandardProcessorNode Failed to invoke @OnScheduled method 
> due to java.lang.RuntimeException: Failed while executing one of processor's 
> OnScheduled task.
> java.lang.RuntimeException: Failed while executing one of processor's 
> OnScheduled task.
>       at 
> org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1483)
>       at 
> org.apache.nifi.controller.StandardProcessorNode.access$000(StandardProcessorNode.java:103)
>       at 
> org.apache.nifi.controller.StandardProcessorNode$1.run(StandardProcessorNode.java:1302)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>       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)
> Caused by: java.util.concurrent.ExecutionException: 
> java.lang.reflect.InvocationTargetException
>       at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>       at java.util.concurrent.FutureTask.get(FutureTask.java:206)
>       at 
> org.apache.nifi.controller.StandardProcessorNode.invokeTaskAsCancelableFuture(StandardProcessorNode.java:1466)
>       ... 9 common frames omitted
> Caused by: java.lang.reflect.InvocationTargetException: null
>       at sun.reflect.GeneratedMethodAccessor1028.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:137)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:125)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:70)
>       at 
> org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:47)
>       at 
> org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1306)
>       at 
> org.apache.nifi.controller.StandardProcessorNode$1$1.call(StandardProcessorNode.java:1302)
>       ... 6 common frames omitted
> Caused by: java.lang.NullPointerException: null



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

Reply via email to