Support Questions
Find answers, ask questions, and share your expertise

GetFile failed to start : java.lang.IndexOutOfBoundsException:

Explorer

Attached is the java stack. I am getting this error in the nifi.log whenever i am starting GetFile processor which is first processort in my list.

 

 2020-04-07 01:17:01,371 ERROR [Timer-Driven Process Thread-5] o.a.nifi.processors.standard.InvokeHTTP InvokeHTTP[id=51048885-0171-1000-9a41-00f55a11ae71] Failed to properly initialize Processor. If still scheduled to run, NiFi will attempt to initialize and run the Processor again after the 'Administrative Yield Duration' has elapsed. Failure is due to java.lang.IndexOutOfBoundsException: Index: 0, Size: 0: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:657)
at java.util.ArrayList.get(ArrayList.java:433)
at org.apache.nifi.processors.standard.InvokeHTTP.setUpClient(InvokeHTTP.java:665)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
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:142)
at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:130)
at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotations(ReflectionUtils.java:75)
at org.apache.nifi.util.ReflectionUtils.invokeMethodsWithAnnotation(ReflectionUtils.java:52)
at org.apache.nifi.controller.StandardProcessorNode.lambda$initiateStart$4(StandardProcessorNode.java:1532)
at org.apache.nifi.engine.FlowEngine$3.call(FlowEngine.java:123)
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)

 

 

Please share solution if any and also the reason for the error. 

 

Thanks

Rups.

1 ACCEPTED SOLUTION

Accepted Solutions

Moderator

@Rups can you please check if you provided all the required parameters from [1], especially check for the "SSL Context Service" parameter.

 

[1] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.5.0/org.ap...


Ferenc Erdelyi, Technical Solutions Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

View solution in original post

5 REPLIES 5

Moderator

Hello @Rups ,

 

thank you for asking this question about NiFi InvokeHTTP.setUpClient throwing IndexOutOfBoundsException.

 

Can you please specify your exact NiFi version, so I can look up the source code.

If the source code of your NiFi version is the same as the code I found, the exception was coming from this line:

https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-proce...

 

My first interpretation is that the issue might be related to SSL. Is SSL fully enabled and configured in your environment, please?

Thank you:
Ferenc


Ferenc Erdelyi, Technical Solutions Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

Moderator

@Rups can you please check if you provided all the required parameters from [1], especially check for the "SSL Context Service" parameter.

 

[1] https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.5.0/org.ap...


Ferenc Erdelyi, Technical Solutions Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

View solution in original post

Explorer

Hi Ferenc, 

 

I am using nifi-1.11.4. The SSL is working for other team members running on the same version.

I am importing the flow from Nifi registry over HTTP. All flows are using parameter context. 

 

Yes, your guess might be correct as without SSL , the processor comes up perfectly.

 

Please let me know what specific information you need regarding SSL. I will get from the platform team. 

 

I do not want to face this situation when flow are deployed on production. 

 

Thanks

Rups.

 

Moderator

Hello @Rups ,

 

thank you for marking my earlier post as a solution about suggesting setting "SSL Context Service" parameter to resolve the issue. It is motivating to know when a suggestion actually helps. 🙂

 

Do I understand correctly that your workflow is operating now as expected?

 

Thanks again:
Ferenc


Ferenc Erdelyi, Technical Solutions Manager

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

Learn more about the Cloudera Community:

Explorer

Yup working now 🙂  Now i am stuck up in PutMongo to update the existing document in collection. Please see my question and help me . need a push here 🙂