I installed NiFi on my OSX machine using
brew install nifi
This worked fine, but when I run the command
nifi run
I checked the nifi-app log and this is what pops out:
2017-10-27 00:24:26,211 WARN [main] org.apache.nifi.bootstrap.Command
Launched Apache NiFi but could not determined the Process ID
I tried nifi startas well but get the following as status:
2017-10-27 00:26:48,081 INFO [main] org.apache.nifi.bootstrap.Command
Apache NiFi is currently running, listening to Bootstrap on port
50289, PID=unknown
Not sure if I have to edit something, but I'm concerned by PID is unknown.
EDIT:
When running
2017-10-27 11:14:13,809 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.standard.ParseCEF could not be instantiated
java.util.ServiceConfigurationError:
org.apache.nifi.processor.Processor: Provider
org.apache.nifi.processors.standard.ParseCEF could not be instantiated
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:581)
at java.base/java.util.ServiceLoader.access$100(ServiceLoader.java:390)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:799)
at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:721)
at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1389)
at org.apache.nifi.nar.ExtensionManager.loadExtensions(ExtensionManager.java:142)
at org.apache.nifi.nar.ExtensionManager.discoverExtensions(ExtensionManager.java:117)
at org.apache.nifi.web.server.JettyServer.start(JettyServer.java:702)
at org.apache.nifi.NiFi.<init>(NiFi.java:160)
at org.apache.nifi.NiFi.main(NiFi.java:268)
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at org.apache.bval.jsr.ConfigurationImpl.parseValidationXml(ConfigurationImpl.java:357)
at org.apache.bval.jsr.ConfigurationImpl.createBootstrapConfiguration(ConfigurationImpl.java:349)
at org.apache.bval.jsr.ConfigurationImpl.prepare(ConfigurationImpl.java:340)
at org.apache.bval.jsr.ConfigurationImpl.__privileged_doBuildValidatorFactory(ConfigurationImpl.java:329)
at org.apache.bval.jsr.ConfigurationImpl.doBuildValidatorFactory(ConfigurationImpl.java)
at org.apache.bval.jsr.ConfigurationImpl.buildValidatorFactory(ConfigurationImpl.java:324)
at org.apache.nifi.processors.standard.ParseCEF.<init>(ParseCEF.java:179)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:777)
... 7 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:563)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 19 common frames omitted
I was using JDK 9. Turns out as of today, this doesn't work. I downgraded to JDK 8 and voila! Thanks y'all
No need to download to JDK 8, but you do need it installed.
Picking which JDK to Run
I have an app (nifi) which does not work on JDK 9, so I want to switch the JDK Version.
List Possible Versions
This is the command
/usr/libexec/java_home -V
And the correctponing output
Matching Java Virtual Machines (2):
9.0.1, x86_64: "Java SE 9.0.1" /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
1.8.0_151, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
Set your Java-Home
For picking just a major Version you can do this
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
Run App (nifi)
I now just need to select this Java, export it. And run the startup script...
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
tim#T-Mac-mini bin $ java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)
tim#TMac-mini bin $ ./nifi.sh run
It now works.
Related
I am working through the openlayers custom build tutorial and I am getting the following error
info ol Parsing dependencies
info ol Compiling 345 sources
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn java ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit
(internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
Exit 1
when I run:
node tasks/build.js build/ol-custom.json build/ol-custom.js
Googling the error gives a solution where it could be another node instance running in the background (there isnt)
also the tutorial says closure-util should be in:
node_modules/openlayers/node_modules
but it is actually in:
node_modules/closure-util
Any idea why this is happening?
It turns out java wasn't set up properly on my path and so it couldn't build. Remember to check your environment with java -version.
On Ubuntu you can install install java 11 (working with this version):
sudo apt install openjdk-11-jre-headless
It should return:
openjdk version "11.0.8" 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1, mixed mode, sharing)
Then you can run again:
node tasks/build.js build/ol-custom.json build/ol-custom.js
When I am trying to create a new Grails project getting the following error:
Grails: 3.0.9
Jdk: 1.8
Command terminated with an exception: java.lang.Exception (see details for partial output)
Command: C:\Program Files\Java\jdk1.8.0_65\bin\javaw.exe (11-Nov-2015 11:43:39 am)
---- System.out ----
---- System.err ----
Error: Could not find or load main class org.codehaus.groovy.grails.cli.support.GrailsStarter
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
------System.out:-----------
------System.err:-----------
Error: Could not find or load main class org.codehaus.groovy.grails.cli.support.GrailsStarter
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Please help me to get the solution for this.
Thanks
It seems you are running the project (or create) as a Java project instead of Grails project, cause it is trying to execute de Main java class
I've just used homebrew to successfully install the latest neo4j (Community Edition 2.1.4) on my MacBook Pro - however, I've been unable to get the server to start.
My question seems similar to this though that question remains unresolved (and the suggestions haven't worked for me).
Just quickly: I have previously successfully installed and booted the trial of the Enterprise Edition (over a year ago) and I've since removed it. Pure speculation but I'm guessing that my issues could be related to this.
When I run neo4j start
I get
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Dneo4j.ext.udc.source=homebrew -Djava.awt.headless=true
Starting Neo4j Server...WARNING: not changing user
process [1368]... waiting for server to be ready.. Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
Then I inspect with neo4j console and get
WARNING: Max 256 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Starting Neo4j Server console-mode...
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -Dneo4j.ext.udc.source=homebrew -Djava.awt.headless=true
log4j:ERROR Could not read configuration file from URL [file:conf/log4j.properties].
java.io.FileNotFoundException: conf/log4j.properties (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileInputStream.<init>(FileInputStream.java:101)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at java.net.URL.openStream(URL.java:1037)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:459)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:471)
at org.apache.log4j.LogManager.<clinit>(LogManager.java:125)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:243)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685)
at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:121)
at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:154)
at org.apache.commons.configuration.PropertiesConfiguration.<init>(PropertiesConfiguration.java:252)
at org.neo4j.server.configuration.PropertyFileConfigurator.loadPropertiesConfig(PropertyFileConfigurator.java:147)
at org.neo4j.server.configuration.PropertyFileConfigurator.<init>(PropertyFileConfigurator.java:67)
at org.neo4j.server.Bootstrapper.createConfigurator(Bootstrapper.java:220)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:98)
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:62)
log4j:ERROR Ignoring configuration file [file:conf/log4j.properties].
Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:133)
at org.apache.commons.configuration.ConfigurationUtils.locate(ConfigurationUtils.java:447)
at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:213)
at org.apache.commons.configuration.AbstractFileConfiguration.load(AbstractFileConfiguration.java:197)
at org.apache.commons.configuration.AbstractFileConfiguration.<init>(AbstractFileConfiguration.java:162)
at org.apache.commons.configuration.PropertiesConfiguration.<init>(PropertiesConfiguration.java:252)
at org.neo4j.server.configuration.PropertyFileConfigurator.loadPropertiesConfig(PropertyFileConfigurator.java:147)
at org.neo4j.server.configuration.PropertyFileConfigurator.<init>(PropertyFileConfigurator.java:67)
at org.neo4j.server.Bootstrapper.createConfigurator(Bootstrapper.java:220)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:98)
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:62)
It seems conf/log4j.properties isn't created at all. I've then copied the contents of that file from my brothers successful installation which seems to remedy the first error though the second error persists with the same result when I try to start the server again.
I've also tried to install via direct download and get the same result.
Other details:
>> java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)
>> sw_vers
ProductName: Mac OS X
ProductVersion: 10.9.4
BuildVersion: 13E28
I'm aware of the Max open files warning though don't believe that to be the issue.
Help would be much appreciated. Thanks in advance.
I've had some success – or, at least, I've got neo4j working now on my machine.
Following the suggestion in this google thread I removed slf4j-api-1.5.8.jar and slf4j-log4j12-1.5.8.jar from /Library/Java/Extensions and the server now boots.
I have no idea if this will have unexpected negative consequences but it definitely seems to solve my problem. Moving on.
I have tried everything possible to solve this error, I was able to run in Windows x86 but I can't compile anything in my MacOSX x64.
I have installed OpenCV using Xcode and port -v opencv +python27 option all the linkpaths are correct. One thing that i have found different is inside the code
public static final String genericIncludepath = "/opt/local/include/";
public static final String genericLinkpath = "/opt/local/lib/:/opt/local/lib64/:/usr/local/lib/:/usr/local/lib64/";
The genericLinkpath for MacOSX does not contains lib64.
What steps will reproduce the problem?
1. Try to run HoughLines or any sample
What is the expected output? What do you see instead?
Exception in thread "main" java.lang.UnsatisfiedLinkError: /private/var/folders/qr/j3rwh4h15fncfqgff8__qvcw0000gn/T/libjniopencv_core2612287037709553365.dylib: Library not loaded: lib/libopencv_core.2.4.dylib Referenced from: /private/var/folders/qr/j3rwh4h15fncfqgff8__qvcw0000gn/T/libjniopencv_core2612287037709553365.dylib Reason: image not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1827)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
at java.lang.Runtime.load0(Runtime.java:770)
at java.lang.System.load(System.java:1020)
at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:403)
at com.googlecode.javacpp.Loader.load(Loader.java:342)
at com.googlecode.javacpp.Loader.load(Loader.java:316)
at com.googlecode.javacv.cpp.opencv_core.(opencv_core.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.googlecode.javacpp.Loader.load(Loader.java:335)
at com.googlecode.javacv.cpp.opencv_imgproc.(opencv_imgproc.java:96)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.googlecode.javacpp.Loader.load(Loader.java:335)
at com.googlecode.javacv.cpp.opencv_highgui.(opencv_highgui.java:91)
at com.javacv.HoughLines.main(HoughLines.java:32)
What version of the product are you using? On what operating system?
MacOS X 10.7.4
$ java -version
java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-11M3646)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)
JAVACV -- javacv-bin-20120512
echo $PATH
/opt/local/include:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
$ ls | grep opencv
opencv_createsamples
opencv_haartraining
opencv_performance
opencv_traincascade
$ ls | grep opencv
libopencv_calib3d.2.4.0.dylib
libopencv_calib3d.2.4.dylib
libopencv_calib3d.dylib
libopencv_contrib.2.4.0.dylib
libopencv_contrib.2.4.dylib
libopencv_contrib.dylib
libopencv_core.2.4.0.dylib
libopencv_core.2.4.dylib
libopencv_core.dylib
libopencv_features2d.2.4.0.dylib
libopencv_features2d.2.4.dylib
libopencv_features2d.dylib
libopencv_flann.2.4.0.dylib
libopencv_flann.2.4.dylib
libopencv_flann.dylib
libopencv_gpu.2.4.0.dylib
libopencv_gpu.2.4.dylib
libopencv_gpu.dylib
libopencv_highgui.2.4.0.dylib
libopencv_highgui.2.4.dylib
libopencv_highgui.dylib
libopencv_imgproc.2.4.0.dylib
libopencv_imgproc.2.4.dylib
libopencv_imgproc.dylib
libopencv_legacy.2.4.0.dylib
libopencv_legacy.2.4.dylib
libopencv_legacy.dylib
libopencv_ml.2.4.0.dylib
libopencv_ml.2.4.dylib
libopencv_ml.dylib
libopencv_nonfree.2.4.0.dylib
libopencv_nonfree.2.4.dylib
libopencv_nonfree.dylib
libopencv_objdetect.2.4.0.dylib
libopencv_objdetect.2.4.dylib
libopencv_objdetect.dylib
libopencv_photo.2.4.0.dylib
libopencv_photo.2.4.dylib
libopencv_photo.dylib
libopencv_stitching.2.4.0.dylib
libopencv_stitching.2.4.dylib
libopencv_stitching.dylib
libopencv_ts.2.4.0.dylib
libopencv_ts.2.4.dylib
libopencv_ts.dylib
libopencv_video.2.4.0.dylib
libopencv_video.2.4.dylib
libopencv_video.dylib
libopencv_videostab.2.4.0.dylib
libopencv_videostab.2.4.dylib
libopencv_videostab.dylib
System.out.println(System.getProperty("os.arch")); x86_64
System.out.println(System.getProperty("sun.arch.data.model")); 64
I am getting the exception while running a jar file from CentOS 5.7 x86_64 command prompt. Where as it is working on CentOS 6.2 x86_64. The jar file is loading an xml file of openCV and it is producing the error like I have copied here.
Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/libjniopencv_core3672406464017531068.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /opt/lampp/htdocs/k_project_1/innefu/OpenCV-2.3.0/build/lib/libopencv_core.so.2.3)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1646)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)
at com.googlecode.javacpp.Loader.load(Loader.java:352)
at com.googlecode.javacpp.Loader.load(Loader.java:285)
at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:129)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at com.googlecode.javacpp.Loader.load(Loader.java:305)
at com.googlecode.javacv.cpp.opencv_imgproc.<clinit>(opencv_imgproc.java:96)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at com.googlecode.javacpp.Loader.load(Loader.java:305)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java:91)
at com.innefu.faceDetect.ImgFaceDetectNew.main(ImgFaceDetectNew.java:68)
While I have configured Opencv-2.0.0 on CentOS 5.7 machine but it is producing the same error. I have also export the path of lib and bin folder of OpenCV.
OpenCv 2.3.0 is producing error while trying to configure. So, I have copied the configured OpenCV-2.3.0 from CentOS 6.2 to the CentOS 5.7. But in both the situation error is same. Please provide suggestions.
Thanks