Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi startup error

avatar
Expert Contributor

Hi All,

My NiFi instance on my local machine is not starting and I'm seeing the following error in nifi-app.log. Any ideas on what could be wrong; it was working fine before; I'm not sure if this caused any issue, but I remember copying the Hive nar file, nifi-hive-nar-1.1.0, into the lib folder the last time and it did startup with no issues; now, even if I remove that nar file, it does not start.

Any ideas on what's wrong and how to resolve this.

2017-02-27 13:31:53,763 ERROR [main] org.apache.nifi.NiFi Failure to launch NiFi due to java.util.ServiceConfigurationError: org.apache.nifi.controller.status.history.ComponentStatusRepository: Provider org.apache.nifi.controller.status.history.VolatileComponentStatusRepository could not be instantiated
java.util.ServiceConfigurationError: org.apache.nifi.controller.status.history.ComponentStatusRepository: Provider org.apache.nifi.controller.status.history.VolatileComponentStatusRepository could not be instantiated
	at java.util.ServiceLoader.fail(ServiceLoader.java:232) ~[na:1.8.0_112]
	at java.util.ServiceLoader.access$100(ServiceLoader.java:185) ~[na:1.8.0_112]
	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384) ~[na:1.8.0_112]
	at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[na:1.8.0_112]
	at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[na:1.8.0_112]
	at org.apache.nifi.nar.ExtensionManager.loadExtensions(ExtensionManager.java:116) ~[nifi-nar-utils-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2]
	at org.apache.nifi.nar.ExtensionManager.discoverExtensions(ExtensionManager.java:97) ~[nifi-nar-utils-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2]
	at org.apache.nifi.NiFi.<init>(NiFi.java:139) ~[nifi-runtime-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2]
	at org.apache.nifi.NiFi.main(NiFi.java:262) ~[nifi-runtime-1.1.0.2.1.1.0-2.jar:1.1.0.2.1.1.0-2]
Caused by: java.lang.NoClassDefFoundError: org/apache/nifi/util/RingBuffer$ForEachEvaluator
	at java.lang.Class.getDeclaredConstructors0(Native Method) ~[na:1.8.0_112]
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) ~[na:1.8.0_112]
	at java.lang.Class.getConstructor0(Class.java:3075) ~[na:1.8.0_112]
	at java.lang.Class.newInstance(Class.java:412) ~[na:1.8.0_112]
	at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380) ~[na:1.8.0_112]
	... 6 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.apache.nifi.util.RingBuffer$ForEachEvaluator
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_112]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_112]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_112]
	... 11 common frames omitted



1 ACCEPTED SOLUTION

avatar
Expert Contributor
@Raj B

Most likely, the nifi-hive-nar-1.1.0.nar file you placed in the lib directory was unpacked to the work directory, in which case, it will need to be removed. Removing the NAR from the lib directory is one step of the cleanup. You could try renaming the work directory to something else, and restarting NiFi, to see if that resolves your issue, provided the lib directory is clean, i.e. containing only the default libraries from the install. You'd have to do this on each node that runs NiFi. When NiFi restarts, it will unpack all the NARs to the work directory again.

If you're running NiFi in HDF, installed by Ambari, that working directory should be located at /var/lib/nifi/work by default.

View solution in original post

9 REPLIES 9

avatar
Master Guru

What version of NiFi and Java are you running with?

avatar
Expert Contributor

@Matt Burgess NiFi - 1.1.0.2 , Java -1.8

avatar
Expert Contributor
@Raj B

Most likely, the nifi-hive-nar-1.1.0.nar file you placed in the lib directory was unpacked to the work directory, in which case, it will need to be removed. Removing the NAR from the lib directory is one step of the cleanup. You could try renaming the work directory to something else, and restarting NiFi, to see if that resolves your issue, provided the lib directory is clean, i.e. containing only the default libraries from the install. You'd have to do this on each node that runs NiFi. When NiFi restarts, it will unpack all the NARs to the work directory again.

If you're running NiFi in HDF, installed by Ambari, that working directory should be located at /var/lib/nifi/work by default.

avatar
Expert Contributor

thanks @Jeff Storck, I removed the hive nar file from the working directory (in my local install it was at ./work/nar/extensions/) and ensured that it was not in the lib directory, but still I couldn't start NiFi. In the log I still the same error as before.

avatar
Expert Contributor

In your NiFi install, can you try renaming the work directory to something else, such as work-backup, and restart NiFi? Also, have you changed or replaced any of the other jars or nars in the lib dir?

avatar
Explorer

@Jeff Storck

Had the same issue and got the nifi running by just deleting my custom processor. I generate the nar using Maven in IntelliJ and then just move said nar to the lib directory. Downloaded the 1.3.0 sources yesterday and before that I wasn't having any issues with custom processors in 1.2.0, not sure what or where the work directory you're referring to is. I am running Arch and there is no nifi folder in /var/lib.

avatar
Expert Contributor
@Ian Neethling

Could you provide a bit more about how you've installed NiFi? Are you running HDF, or just NiFi by itself? Did you install from an RPM, or did you install from a tar/gzip?

avatar
Expert Contributor

Awesome, @Jeff Storck, that did the trick. Thank you.

avatar
New Contributor

Try adding this to pom.xml of nar folder of your project

<groupId>org.apache.nifi</groupId>

<artifactId>nifi-standard-nar</artifactId>

<version>1.3.0</version>

<type>nar</type>

,

Try adding <dependency> <groupId>org.apache.nifi</groupId> <artifactId>nifi-standard-nar</artifactId> <version>1.3.0</version> <type>nar</type> </dependency>

to pom.xml of nar folder of NiFi project