Seems to be not related to Neo4j and a known issue regarding Openjdk on FreeBSD: http://www.freebsd.org/cgi/query-pr.cgi?pr=186636
According to the ticket stream it should be fixed in the sources. So update OpenJDK to a version containing this fix.
Question
I'm currently trying to use Neo4j on my FreeBSD server.
As my default Java version is 1.6, I use this in neo4j
export JAVA_HOME=/usr/local/openjdk7
export PATH=$JAVA_HOME/bin:$PATH
But when I try to launch neo4j console I have these message:
./neo4j console
WARNING: Max 11095 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
Exception in thread "main" java.lang.InternalError: sun.net.PortConfig: unknown OS
at sun.net.PortConfig$1.run(PortConfig.java:59)
at sun.net.PortConfig$1.run(PortConfig.java:45)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.PortConfig.<clinit>(PortConfig.java:44)
at java.net.SocketPermission$1.run(SocketPermission.java:1217)
at java.net.SocketPermission$1.run(SocketPermission.java:1209)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.SocketPermission.initEphemeralPorts(SocketPermission.java:1208)
at java.net.SocketPermission.<clinit>(SocketPermission.java:235)
at sun.security.util.SecurityConstants.<clinit>(SecurityConstants.java:259)
at sun.security.provider.PolicyFile.getKnownInstance(PolicyFile.java:1023)
at sun.security.provider.PolicyFile.getInstance(PolicyFile.java:966)
at sun.security.provider.PolicyFile.addGrantEntry(PolicyFile.java:862)
at sun.security.provider.PolicyFile.init(PolicyFile.java:651)
at sun.security.provider.PolicyFile.access$400(PolicyFile.java:283)
at sun.security.provider.PolicyFile$3.run(PolicyFile.java:587)
at sun.security.provider.PolicyFile$3.run(PolicyFile.java:520)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.provider.PolicyFile.initPolicyFile(PolicyFile.java:519)
at sun.security.provider.PolicyFile.initPolicyFile(PolicyFile.java:505)
at sun.security.provider.PolicyFile.init(PolicyFile.java:464)
at sun.security.provider.PolicyFile.<init>(PolicyFile.java:322)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.security.Policy.getPolicyNoCheck(Policy.java:195)
at java.security.ProtectionDomain.implies(ProtectionDomain.java:272)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:350)
at java.security.AccessController.checkPermission(AccessController.java:559)
at ch.qos.logback.core.util.Loader$1.run(Loader.java:51)
at ch.qos.logback.core.util.Loader$1.run(Loader.java:48)
at java.security.AccessController.doPrivileged(Native Method)
at ch.qos.logback.core.util.Loader.<clinit>(Loader.java:47)
at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:34)
at ch.qos.logback.core.pattern.parser.Compiler.createConverter(Compiler.java:107)
at ch.qos.logback.core.pattern.parser.Compiler.compile(Compiler.java:64)
at ch.qos.logback.core.pattern.parser.Parser.compile(Parser.java:91)
at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:86)
at ch.qos.logback.classic.encoder.PatternLayoutEncoder.start(PatternLayoutEncoder.java:28)
at org.neo4j.server.logging.SimpleConsoleFormatter.<init>(SimpleConsoleFormatter.java:52)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.util.logging.LogManager.getFormatterProperty(LogManager.java:1341)
at java.util.logging.StreamHandler.configure(StreamHandler.java:76)
at java.util.logging.StreamHandler.<init>(StreamHandler.java:94)
at java.util.logging.ConsoleHandler.<init>(ConsoleHandler.java:88)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.util.logging.LogManager$4.run(LogManager.java:803)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:796)
at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:1368)
at java.util.logging.LogManager.access$1500(LogManager.java:148)
at java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:1451)
at java.util.logging.Logger.log(Logger.java:609)
at java.util.logging.Logger.doLog(Logger.java:631)
at java.util.logging.Logger.log(Logger.java:654)
at org.neo4j.server.logging.Logger.log(Logger.java:60)
at org.neo4j.server.logging.Logger.warn(Logger.java:86)
at org.neo4j.server.logging.JulAdapter.warn(JulAdapter.java:38)
at org.neo4j.kernel.info.JvmChecker.checkJvmCompatibilityAndIssueWarning(JvmChecker.java:47)
at org.neo4j.server.Bootstrapper.checkCompatibility(Bootstrapper.java:120)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:82)
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:50)./neo4j console
WARNING: Max 11095 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
Exception in thread "main" java.lang.InternalError: sun.net.PortConfig: unknown OS
at sun.net.PortConfig$1.run(PortConfig.java:59)
at sun.net.PortConfig$1.run(PortConfig.java:45)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.PortConfig.<clinit>(PortConfig.java:44)
at java.net.SocketPermission$1.run(SocketPermission.java:1217)
at java.net.SocketPermission$1.run(SocketPermission.java:1209)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.SocketPermission.initEphemeralPorts(SocketPermission.java:1208)
at java.net.SocketPermission.<clinit>(SocketPermission.java:235)
at sun.security.util.SecurityConstants.<clinit>(SecurityConstants.java:259)
at sun.security.provider.PolicyFile.getKnownInstance(PolicyFile.java:1023)
at sun.security.provider.PolicyFile.getInstance(PolicyFile.java:966)
at sun.security.provider.PolicyFile.addGrantEntry(PolicyFile.java:862)
at sun.security.provider.PolicyFile.init(PolicyFile.java:651)
at sun.security.provider.PolicyFile.access$400(PolicyFile.java:283)
at sun.security.provider.PolicyFile$3.run(PolicyFile.java:587)
at sun.security.provider.PolicyFile$3.run(PolicyFile.java:520)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.provider.PolicyFile.initPolicyFile(PolicyFile.java:519)
at sun.security.provider.PolicyFile.initPolicyFile(PolicyFile.java:505)
at sun.security.provider.PolicyFile.init(PolicyFile.java:464)
at sun.security.provider.PolicyFile.<init>(PolicyFile.java:322)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.security.Policy.getPolicyNoCheck(Policy.java:195)
at java.security.ProtectionDomain.implies(ProtectionDomain.java:272)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:350)
at java.security.AccessController.checkPermission(AccessController.java:559)
at ch.qos.logback.core.util.Loader$1.run(Loader.java:51)
at ch.qos.logback.core.util.Loader$1.run(Loader.java:48)
at java.security.AccessController.doPrivileged(Native Method)
at ch.qos.logback.core.util.Loader.<clinit>(Loader.java:47)
at ch.qos.logback.core.util.OptionHelper.instantiateByClassName(OptionHelper.java:34)
at ch.qos.logback.core.pattern.parser.Compiler.createConverter(Compiler.java:107)
at ch.qos.logback.core.pattern.parser.Compiler.compile(Compiler.java:64)
at ch.qos.logback.core.pattern.parser.Parser.compile(Parser.java:91)
at ch.qos.logback.core.pattern.PatternLayoutBase.start(PatternLayoutBase.java:86)
at ch.qos.logback.classic.encoder.PatternLayoutEncoder.start(PatternLayoutEncoder.java:28)
at org.neo4j.server.logging.SimpleConsoleFormatter.<init>(SimpleConsoleFormatter.java:52)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.util.logging.LogManager.getFormatterProperty(LogManager.java:1341)
at java.util.logging.StreamHandler.configure(StreamHandler.java:76)
at java.util.logging.StreamHandler.<init>(StreamHandler.java:94)
at java.util.logging.ConsoleHandler.<init>(ConsoleHandler.java:88)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374)
at java.util.logging.LogManager$4.run(LogManager.java:803)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:796)
at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:1368)
at java.util.logging.LogManager.access$1500(LogManager.java:148)
at java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:1451)
at java.util.logging.Logger.log(Logger.java:609)
at java.util.logging.Logger.doLog(Logger.java:631)
at java.util.logging.Logger.log(Logger.java:654)
at org.neo4j.server.logging.Logger.log(Logger.java:60)
at org.neo4j.server.logging.Logger.warn(Logger.java:86)
at org.neo4j.server.logging.JulAdapter.warn(JulAdapter.java:38)
at org.neo4j.kernel.info.JvmChecker.checkJvmCompatibilityAndIssueWarning(JvmChecker.java:47)
at org.neo4j.server.Bootstrapper.checkCompatibility(Bootstrapper.java:120)
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:82)
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:50)
Or this for ./neo4j:
./neo4j start
WARNING: Max 11095 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
WARNING! You are using an unsupported Java runtime.
* Please use Oracle(R) Java(TM) 7 to run Neo4j Server. Download "Java Platform (JDK) 7" from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
* Please see http://docs.neo4j.org/ for Neo4j Server installation instructions.
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
Starting Neo4j Server...Ambiguous output redirect.
cat: /usr/neo4j/data/neo4j-service.pid: No such file or directory
process []... waiting for server to be ready. Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
rm: /usr/neo4j/data/neo4j-service.pid: No such file or directory
What should I do?
Thanks a lot Sincerely A.H
Solution
Seems to be not related to Neo4j and a known issue regarding Openjdk on FreeBSD: http://www.freebsd.org/cgi/query-pr.cgi?pr=186636
According to the ticket stream it should be fixed in the sources. So update OpenJDK to a version containing this fix.