You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Joseph Witt (JIRA)" <ji...@apache.org> on 2017/12/06 15:45:00 UTC

[jira] [Commented] (NIFI-4655) NPE when starting InvokeHTTP in secure cluster.

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

Joseph Witt commented on NIFI-4655:
-----------------------------------

From [~josh.anderton@gmail.com]

Hi Dan/Joe,

I have encountered the same issue and after a bit of digging it appears as if during the update to OkHttp3 a bug was introduced in the setSslFactoryMethod.  The issue is that the method attempts to prepare a keystore even if properties for the keystore are not defined in the SSLContextFactory.  The exception is being thrown around line 571 of InvokeHTTP as a keystore is attempted to be initialized without a keystore type.  

The good news is that there appears to be an easy workaround (not fully tested yet) which is to define a keystore in your SSLContextFactory, you can even use the same properties already defined for your truststore and I believe your processor will start working.  

Please let me know if I have misdiagnosed or if there are issues with the workaround.

Thanks,
Josh


> 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)