This has been biting a few users lately, not sure when it changed
exactly, but the Hive NAR uses a version of Snappy that tries to
extract the native Snappy library into a location pointed to by the
"java.io.tmpdir" variable, which IIRC is /tmp/<something>. The /tmp
directory sometimes has a noexec restriction on it, and/or the OS user
running NiFi does not have permissions to read/write/execute that
directory. I haven't tried this workaround but I believe it has worked
for other folks: Add a line under your other "java.args.X" lines in
bootstrap.conf such as:

java.arg.snappy=-Dorg.xerial.snappy.tempdir=/path/to/nifi/lib/

Where the directory is the full path to NiFi's lib/ directory. This
will cause the native Snappy library to be extracted there, but since
the Snappy Java class is the only one attempting to load the library,
it shouldn't cause any issues by being there.

Have other folks run into this? I wonder if we should just add this
argument to bootstrap.conf to avoid any potential issues, but of
course we'd want to make sure that it doesn't introduce any issues
either.

Regards,
Matt
On Thu, Jul 26, 2018 at 2:49 PM geoff.craig <[email protected]> wrote:
>
> Here is the error:
>
> 2018-07-26 18:48:49,013 ERROR [main] org.apache.nifi.NiFi Failure to launch
> NiFi due to java.util.ServiceConfigurationError:
> org.apache.nifi.processor.Processor: Provider
> org.apache.nifi.processors.hive.PutHiveStreaming could not be instantiated
> java.util.ServiceConfigurationError: org.apache.nifi.processor.Processor:
> Provider org.apache.nifi.processors.hive.PutHiveStreaming could not be
> instantiated
>         at java.util.ServiceLoader.fail(ServiceLoader.java:232)
>         at java.util.ServiceLoader.access$100(ServiceLoader.java:185)
>         at
> java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:384)
>         at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
>         at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
>         at
> org.apache.nifi.nar.ExtensionManager.loadExtensions(ExtensionManager.java:148)
>         at
> org.apache.nifi.nar.ExtensionManager.discoverExtensions(ExtensionManager.java:123)
>         at
> org.apache.nifi.web.server.JettyServer.start(JettyServer.java:832)
>         at org.apache.nifi.NiFi.<init>(NiFi.java:157)
>         at org.apache.nifi.NiFi.<init>(NiFi.java:71)
>         at org.apache.nifi.NiFi.main(NiFi.java:292)
> Caused by: org.xerial.snappy.SnappyError: [FAILED_TO_LOAD_NATIVE_LIBRARY]
> null
>         at org.xerial.snappy.SnappyLoader.load(SnappyLoader.java:239)
>         at org.xerial.snappy.Snappy.<clinit>(Snappy.java:48)
>         at
> org.apache.nifi.processors.hive.PutHiveStreaming.<clinit>(PutHiveStreaming.java:152)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>         at java.lang.Class.newInstance(Class.java:442)
>         at
> java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:380)
>         ... 8 common frames omitted
>
>
>
>
> --
> Sent from: http://apache-nifi-users-list.2361937.n4.nabble.com/

Reply via email to