无法启动neo4j - conf / log4j.properties

时间:2014-09-23 05:03:32

标签: neo4j

我刚用自制软件在我的MacBook Pro上成功安装了最新的neo4j(Community Edition 2.1.4) - 但是,我一直无法让服务器启动。

我的问题似乎与this类似,但这个问题仍然没有得到解决(这些建议对我没用)。

很快:我之前已经成功安装并启动了Enterprise Edition的试用版(一年多以前),之后我就删除了它。纯粹的猜测,但我猜我的问题可能与此有关。

当我运行neo4j start

我得到了

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.

然后我用neo4j console检查并获得

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)

似乎根本没有创建conf/log4j.properties。我已经从兄弟成功安装中复制了该文件的内容,这似乎可以解决第一个错误,但是当我尝试再次启动服务器时,第二个错误仍然存​​在相同的结果。

我也尝试通过直接下载安装并获得相同的结果。

其他细节:

>> 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

我知道Max打开文件警告,但不相信这是问题。

非常感谢帮助。提前谢谢。

1 个答案:

答案 0 :(得分:0)

我取得了一些成功 - 或者至少,我现在已经在我的机器上运行了neo4j。

根据this google thread中的建议,我从/ Library / Java / Extensions中删除了slf4j-api-1.5.8.jar和slf4j-log4j12-1.5.8.jar,服务器现在启动了。

我不知道这是否会产生意想不到的负面影响,但它似乎肯定能解决我的问题。继续前进。