[Resolved] How to resolve NiFi server down due to java IllegalArgumentException: root can not be null | Kafka | Big Data

In this article, we will explain how to resolve the below error:




I am trying to deploy new JSON file in the NiFi directory after that I am getting below NiFi server down issue and we provided simple resolution for that.

Error: NiFi server down

ERROR [Timer-Driven Process Thread-9] o.a.nifi.processors.standard.SplitJson SplitJson[id= ] SplitJson[id= ] failed to process due to java.lang.IllegalArgumentException: root can not be null; rolling back session: {}
java.lang.IllegalArgumentException: root can not be null
at com.jayway.jsonpath.internal.Utils.notNull(Utils.java:213)
at com.jayway.jsonpath.internal.token.EvaluationContextImpl.<init>(EvaluationContextImpl.java:58)
at com.jayway.jsonpath.internal.CompiledPath.evaluate(CompiledPath.java:50)
at com.jayway.jsonpath.internal.CompiledPath.evaluate(CompiledPath.java:61)
at com.jayway.jsonpath.JsonPath.read(JsonPath.java:178)
at com.jayway.jsonpath.internal.JsonReader.read(JsonReader.java:146)
at org.apache.nifi.processors.standard.SplitJson.onTrigger(SplitJson.java:195)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1124)
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)
2020-12-21 06:00:20,849 ERROR [Timer-Driven Process Thread-9] o.a.nifi.processors.standard.SplitJson SplitJson[id= ] SplitJson[id= ] failed to process session due to java.lang.IllegalArgumentException: root can not be null: {}
java.lang.IllegalArgumentException: root can not be null
at com.jayway.jsonpath.internal.Utils.notNull(Utils.java:213)
at com.jayway.jsonpath.internal.token.EvaluationContextImpl.<init>(EvaluationContextImpl.java:58)
at com.jayway.jsonpath.internal.CompiledPath.evaluate(CompiledPath.java:50)
at com.jayway.jsonpath.internal.CompiledPath.evaluate(CompiledPath.java:61)
at com.jayway.jsonpath.JsonPath.read(JsonPath.java:178)
at com.jayway.jsonpath.internal.JsonReader.read(JsonReader.java:146)
at org.apache.nifi.processors.standard.SplitJson.onTrigger(SplitJson.java:195)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1124)
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)
nifi-app.log

Solution:

Here we provided simple resolution for this error.

Step 1: First, run the Apache NiFi server through with root user. Using below highlighted commands through CLI.

Step 2: Go to the below path (NiFi installed directory)

cd /etc/nifi/bin/

Note: Some of the nifi installation directories are different.

 cd /nifi/conf/

After that check the NiFi shell file is available  in the bin or conf directory.
Step 3: If NiFi shall file is available then run the below command:

./nifi.sh or sh nifi.sh

Resolution 2:





Step 1: Login Ambari web-ui with admin credentials .

Step 2: Then go to NiFi services after that start NiFi service.

Step 3: Wait for 5 mins, it will take some time. After that it will running fine from my end.

Summary: The above error is very common in Cloudera or Hortonworks cluster for NiFi server in the Big Data environment. Basically, Hadoop admin will resolve this error in the NiFi.



Exit mobile version