磁盘已满后neo4j无法启动

时间:2014-09-26 16:13:14

标签: java neo4j

我的debian服务器上的/ var磁盘已满,而neo4j已按预期停止。我释放了磁盘上的空间,但是neo4j服务器没有开始在日志中抛出下面给出的错误。我没有在我可能杀死的服务器上运行任何java或neo4j进程。

过去6个月我的neo4j设置稳定,大约有1000个节点。我是java方面的新手,所以如果我错过任何基本的东西,请告诉我。

命令行输出:service neo4j-service restart

  

重新启动Neo4j图形数据库:neo4jWARNING:最多1024个打开的文件   允许的,建议至少40 000。请参阅Neo4j手册。警告!   您正在使用不受支持的Java运行时。   *请使用Oracle(R)Java(TM)7来运行Neo4j Server。下载" Java平台(JDK)7"来自:
  http://www.oracle.com/technetwork/java/javase/downloads/index.html   *有关Neo4j服务器的安装说明,请参阅http://docs.neo4j.org/。使用其他JVM参数:-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启动Neo4j服务器...警告:不更改用户进程[4733] ...等待   服务器准备好.....在120秒内无法启动。 Neo4j的   服务器可能无法启动,请检查日志。失败!

日志文件:

Sep 26, 2014 3:31:38 PM org.neo4j.server.logging.Logger log
SEVERE: Failed to start Neo Server on port [7474]
Sep 26, 2014 3:33:00 PM org.neo4j.server.logging.Logger log
WARNING: You are using an unsupported Java runtime. Please use Oracle(R) Java(TM) Runtime Environment 7.
Sep 26, 2014 3:33:00 PM org.neo4j.server.logging.Logger log
INFO: Setting startup timeout to: 120000ms based on -1
Sep 26, 2014 3:33:03 PM org.neo4j.server.logging.Logger log
SEVERE: 
org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /var/lib/neo4j/data/graph.db
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:218)
    at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:87)
    at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:50)
Caused by: java.lang.RuntimeException: Error starting org.neo4j.kernel.EmbeddedGraphDatabase, /var/lib/neo4j/data/graph.db
    at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:330)
    at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:63)
    at org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:92)
    at org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:198)
    at org.neo4j.kernel.impl.recovery.StoreRecoverer.recover(StoreRecoverer.java:115)
    at org.neo4j.server.preflight.PerformRecoveryIfNecessary.run(PerformRecoveryIfNecessary.java:59)
    at org.neo4j.server.preflight.PreFlightTasks.run(PreFlightTasks.java:70)
    at org.neo4j.server.AbstractNeoServer.runPreflightTasks(AbstractNeoServer.java:333)
    at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:152)
    ... 2 more
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.kernel.impl.transaction.TxManager@61615142' was successfully initialized, but failed to start. Please see attached cause exception.
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:509)
    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115)
    at org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:307)
    ... 10 more
Caused by: org.neo4j.graphdb.TransactionFailureException: Unable to start TM
    at org.neo4j.kernel.impl.transaction.TxManager.openLog(TxManager.java:824)
    at org.neo4j.kernel.impl.transaction.TxManager.start(TxManager.java:198)
    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:503)
    ... 12 more
Caused by: java.io.IOException: Branch[����] found for [GlobalId[NENEOK|5930761323375553953|5569093129887285248|13248], BranchId[ ]] but no record list found in map
    at org.neo4j.kernel.impl.transaction.TxLog.readBranchAddRecordInto(TxLog.java:520)
    at org.neo4j.kernel.impl.transaction.TxLog.getDanglingRecords(TxLog.java:440)
    at org.neo4j.kernel.impl.transaction.TxLog.recreateActiveTransactionState(TxLog.java:133)
    at org.neo4j.kernel.impl.transaction.TxLog.<init>(TxLog.java:128)
    at org.neo4j.kernel.impl.transaction.TxManager.openLog(TxManager.java:796)
    ... 14 more

Sep 26, 2014 3:33:03 PM org.neo4j.server.logging.Logger log
SEVERE: Failed to start Neo Server on port [7474]

我正在使用openjdk 1.7运行时环境,我认为我应该升级,但我不明白错误的原因是什么,因为之前一切正常。谢谢你的帮助!

1 个答案:

答案 0 :(得分:1)

除非你100%确定自己在做什么,否则你永远不应该手动修改graph.db目录中的任何内容。

要防止数据存储目录持续增长,请检查keep_logical_logsneo4j.properties的设置,请参阅http://docs.neo4j.org/chunked/stable/configuration-logical-logs.html

除非您需要用于联机备份或群集同步的逻辑日志,否则您可能会保存删除nioneo_logical.log.v*文件。确保先备份!

同时检查您的设置是否有打开文件限制http://docs.neo4j.org/chunked/stable/linux-performance-guide.html#_setting_the_number_of_open_files

过去版本的Neo4j有一个错误,可能会在磁盘空间不足时损坏您的数据存储区。如果发生这种情况,您需要在二进制级别上手动修复它(这需要很多Neo4j内部知识)或者在光盘用完之前恢复以前的备份。