【问题标题】:homebrew neo4j not starting自制neo4j没有启动
【发布时间】:2016-06-25 11:03:02
【问题描述】:

我通过自制软件安装了neo4j,但是当我想通过键入启动服务器时

$ neo4j start

我得到以下信息:

    Started neo4j (pid 8480). By default, it is available at http://localhost:7474/
    There may be a short delay until the server is ready.
    See /usr/local/Cellar/neo4j/3.0.3/libexec/logs/neo4j.log for current status.

下面添加了日志文件的内容(我为布局道歉)。[*1]

我正在使用neo4j 版本3.0.0-M02 和java 版本jdk1.8.0_20(信息包含在.bash_profile 中)。对于一个项目,我需要在我的 Mac(OS X 10.11.5)上运行 neo4j。我还尝试通过从neo4js webiste 下载.dmg 文件来安装它,但还是没有运气(我收到错误

    Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@52c870fe' was successfully initialized, but failed to start. Please see attached cause exception.

对此的任何帮助将不胜感激。

[*1] neo4j.log 文件的内容

2016-06-25 10:27:34.675+0000 INFO  Starting...
2016-06-25 10:27:35.146+0000 INFO  Bolt enabled on localhost:7687.
2016-06-25 10:27:35.449+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@17013b6f' was successfully initialized, but failed to start. Please see attached cause exception. Starting Neo4j failed: Component         'org.neo4j.server.database.LifecycleManagingDatabase@17013b6f' was successfully initialized, but failed to start. Please see attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@17013b6f' was successfully initialized, but failed to start. Please see attached cause exception.
            at         org.neo4j.server.exception.ServerStartupErrors.translateToServerStartupError(ServerStartupErrors.java:68)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:217)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:87)
    at org.neo4j.server.ServerBootstrapper.start(ServerBootstrapper.java:66)
    at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:28)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.server.database.LifecycleManagingDatabase@17013b6f' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:444)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:189)
    ... 3 more
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.impl.factory.CommunityFacadeFactory, /usr/local/Cellar/neo4j/3.0.3/libexec/data/databases/graph.db
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:144)
    at org.neo4j.kernel.impl.factory.CommunityFacadeFactory.newFacade(CommunityFacadeFactory.java:40)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:108)
    at org.neo4j.server.CommunityNeoServer.lambda$static$31(CommunityNeoServer.java:55)
    at org.neo4j.server.CommunityNeoServer$$Lambda$43/1286783232.newGraphDatabase(Unknown Source)
    at org.neo4j.server.database.LifecycleManagingDatabase.start(LifecycleManagingDatabase.java:89)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
    ... 5 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.lifecycle.Lifecycle$Delegate@4a0448ef' failed to initialize. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:416)
    at org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:62)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:98)
    at org.neo4j.kernel.NeoStoreDataSource.start(NeoStoreDataSource.java:503)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.kernel.impl.transaction.state.DataSourceManager.start(DataSourceManager.java:99)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:434)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:107)
    at org.neo4j.kernel.impl.factory.GraphDatabaseFacadeFactory.newFacade(GraphDatabaseFacadeFactory.java:140)
    ... 11 more
Caused by: java.lang.NoSuchMethodError: org.apache.lucene.analysis.core.WhitespaceAnalyzer: method <init>()V not found
    at org.neo4j.index.impl.lucene.legacy.LuceneDataSource.<clinit>(LuceneDataSource.java:105)
    at org.neo4j.index.impl.lucene.legacy.LuceneIndexImplementation.init(LuceneIndexImplementation.java:76)
    at org.neo4j.kernel.lifecycle.Lifecycles$1.init(Lifecycles.java:37)
    at org.neo4j.kernel.lifecycle.Lifecycle$Delegate.init(Lifecycle.java:63)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:406)
    ... 20 more

【问题讨论】:

  • 我相信你的服务器已经启动了。只需在浏览器中打开http://localhost:7474/ 页面即可。
  • 感谢您的回复,弗拉德。但是,不幸的是,我的服务器没有运行。在浏览器中打开http://localhost:7474/ 时,我看到的只是Safari can't connect to the server
  • 好的。错误信息很笼统。我将首先检查以下内容:neo4j 在设置数据库文件夹的位置是否具有写权限? 7474 端口是免费的吗?
  • 好的,我检查了:7474端口没有运行,每个人都有neo4j数据库文件夹的写权限。
  • 你不应该使用:3.0.0-M02 这是一个过时的里程碑。当前是 3.0.3

标签: java neo4j installation homebrew


【解决方案1】:

所以,Neo4j Page 表示运行 $NEO4J_HOME/bin/neo4j console。此外,我会以 root 身份运行它(使用 su 或 sudo)。请同时检查您的 neo4j 文件夹的写入权限,以及端口 7474 是否可以免费使用。

Neo4j 通常会提供安装脚本。我相信你的版本是bin/neo4j-shared.sh

【讨论】:

  • 弗拉德,再次感谢您的帮助,但到目前为止没有任何效果。我跑了$NEO4J_HOME/bin/neo4j console,但又没有运气。错误日志还是一样。
  • 很抱歉
  • 啊,是的,neo4j-shared.sh 在我的机器上什么也没做。
  • 有些东西在我的机器上似乎不太好,在另一台机器上试了一下,然后砰:一切正常。无论如何,谢谢你的帮助,弗拉德。
【解决方案2】:

堆栈跟踪很清楚,类路径与 Lucene 库发生冲突。 NoSuchMethodError 表明您安装了另一个 lucene 库,并且在类路径中可见。这会导致类加载器从库中加载与 Neo4J 需要的版本不同的版本。

Caused by: java.lang.NoSuchMethodError: org.apache.lucene.analysis.core.WhitespaceAnalyzer: method <init>()V not found
    at org.neo4j.index.impl.lucene.legacy.LuceneDataSource.<clinit>(LuceneDataSource.java:105)
    at org.neo4j.index.impl.lucene.legacy.LuceneIndexImplementation.init(LuceneIndexImplementation.java:76)
    at org.neo4j.kernel.lifecycle.Lifecycles$1.init(Lifecycles.java:37)
    at org.neo4j.kernel.lifecycle.Lifecycle$Delegate.init(Lifecycle.java:63)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:406)
    ... 20 more

需要检查的几件事:

  • 你也安装了 lucene 吗?
  • jdk 的 endorsed 文件夹中有 lucene 库吗?
  • 您有包含 lucene 库的 CLASSPATH 变量吗?
  • 您是否从 homebrew 安装了 1 个以上的 neo4j 版本? (也许这会留下旧的库)
  • 尝试修改 neo4j 接收到的 jvm args,并添加 -verbose:class 以查看加载该类的位置。

【讨论】:

  • 有些东西在我的机器上似乎不太好,在另一台机器上试了一下,然后砰:一切正常。无论如何,谢谢你的帮助,奥古斯托。
【解决方案3】:

我刚刚尝试在我的 Mac 上安装 neo4j 3.0.3,运行顺畅:

neo4j-javascript-driver mh$ brew upgrade neo4j

==> Upgrading 1 outdated package, with result:
neo4j 3.0.3
==> Upgrading neo4j
==> Downloading http://dist.neo4j.org/neo4j-community-3.0.3-unix.tar.gz
######################################################################## 100,0%
?  /usr/local/Cellar/neo4j/3.0.3: 91 files, 65.1M, built in 38 seconds
Ich:neo4j-javascript-driver mh$ export JAVA_HOME=`java_home -v 1.8`
Ich:neo4j-javascript-driver mh$ killall java
No matching processes belonging to you were found
Ich:neo4j-javascript-driver mh$ neo4j start
Starting Neo4j.
Started neo4j (pid 75890). By default, it is available at http://localhost:7474/
There may be a short delay until the server is ready.
See /usr/local/Cellar/neo4j/3.0.3/libexec/logs/neo4j.log for current status.
Ich:neo4j-javascript-driver mh$ less /usr/local/Cellar/neo4j/3.0.3/libexec/logs/neo4j.log
Ich:neo4j-javascript-driver mh$ less /usr/local/Cellar/neo4j/3.0.3/libexec/logs/debug.log 
Ich:neo4j-javascript-driver mh$ neo4j console
Neo4j is already running (pid 75890).
Ich:neo4j-javascript-driver mh$ neo4j stop
Stopping Neo4j.. stopped
Ich:neo4j-javascript-driver mh$ neo4j console
Starting Neo4j.
2016-06-25 16:25:16.926+0000 INFO  Starting...
2016-06-25 16:25:17.723+0000 INFO  Bolt enabled on localhost:7687.
2016-06-25 16:25:20.667+0000 INFO  Started.
2016-06-25 16:25:22.280+0000 INFO  Remote interface available at http://localhost:7474/

【讨论】:

    猜你喜欢
    • 2014-11-12
    • 2019-01-07
    • 2020-05-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多