gpt4 book ai didi

ubuntu - neo4j 1.6.M02 数据库似乎已损坏;我该如何恢复它?

转载 作者:行者123 更新时间:2023-12-04 19:04:24 25 4
gpt4 key购买 nike

我在 ubuntu 机器上有一个 neo4j 实例,该实例在服务启动时关闭。
结果,现在服务拒绝启动:

Starting Neo4j Server... process [3807]... waiting for server to be ready.. BAD.
Neo4j Server may have failed to start, please check the logs.

和日志...
Feb 16, 2012 4:44:51 PM org.neo4j.server.logging.Logger log
INFO: Store files missing, or not in suitable state for upgrade. Leaving this problem for main server process to resolve.
Feb 16, 2012 4:44:51 PM org.neo4j.server.logging.Logger log
INFO: Starting Neo Server on port [7474] with [20] threads available
Feb 16, 2012 4:44:51 PM org.mortbay.log.Slf4jLog info
INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
Feb 16, 2012 4:44:51 PM org.neo4j.server.logging.Logger log
INFO: Using database at /home/dan/personal/neo4j-community-1.6.M02/data/graph.db
Feb 16, 2012 4:44:52 PM org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery
INFO: Non clean shutdown detected on log [/home/dan/personal/neo4j-community-1.6.M02/data/graph.db/nioneo_logical.log.1]. Recovery started ...

任何想法怎么能
  • 恢复数据库?
  • 如果机器再次出现故障,防止这种情况再次发生吗?

  • 谢谢

    更新:
    尝试运行 sudo ./bin/neo4j-shell -path data/graph.db/这是输出
    Feb 16, 2012 3:57:16 PM org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery
    INFO: Non clean shutdown detected on log [/home/dan/personal/neo4j-community-1.6.M02/data/graph.db/nioneo_logical.log.1]. Recovery started ...
    org.neo4j.graphdb.TransactionFailureException: Could not create data source [nioneodb], see nested exception for cause of error
    at org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:161)
    at org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:104)
    at org.neo4j.kernel.EmbeddedGraphDbImpl.<init>(EmbeddedGraphDbImpl.java:190)
    at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:78)
    at org.neo4j.shell.kernel.GraphDatabaseShellServer.instantiateGraphDb(GraphDatabaseShellServer.java:85)
    at org.neo4j.shell.kernel.GraphDatabaseShellServer.<init>(GraphDatabaseShellServer.java:57)
    at org.neo4j.shell.StartClient.tryStartLocalServerAndClient(StartClient.java:286)
    at org.neo4j.shell.StartClient.startLocal(StartClient.java:219)
    at org.neo4j.shell.StartClient.start(StartClient.java:159)
    at org.neo4j.shell.StartClient.main(StartClient.java:108)
    Caused by: java.lang.RuntimeException: Unexpected Exception
    at org.neo4j.helpers.Exceptions.launderedException(Exceptions.java:78)
    at org.neo4j.helpers.Exceptions.launderedException(Exceptions.java:48)
    at org.neo4j.helpers.Exceptions.launderedException(Exceptions.java:43)
    at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.<init>(NeoStoreXaDataSource.java:216)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.neo4j.kernel.impl.transaction.XaDataSourceManager.create(XaDataSourceManager.java:77)
    at org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:155)
    ... 9 more
    Caused by: java.io.IOException: Inject start failed, xid: GlobalId[NEOKERNL|3992629294259512899|39], BranchId[ 52 49 52 49 52 49 ] already injected
    at org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.injectStart(XaResourceManager.java:118)
    at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.applyStartEntry(XaLogicalLog.java:486)
    at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.applyEntry(XaLogicalLog.java:445)
    at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.doInternalRecovery(XaLogicalLog.java:815)
    at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:241)
    at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:187)
    at org.neo4j.kernel.impl.transaction.xaframework.XaContainer.openLogicalLog(XaContainer.java:120)
    at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.<init>(NeoStoreXaDataSource.java:177)
    ... 15 more
    ERROR (-v for expanded information):
    Could not create data source [nioneodb], see nested exception for cause of error

    -host Domain name or IP of host to connect to (default: localhost)
    -port Port of host to connect to (default: 1337)
    -name RMI name, i.e. rmi://<host>:<port>/<name> (default: shell)
    -pid Process ID to connect to
    -c Command line to execute. After executing it the shell exits
    -readonly Connect in readonly mode
    -path Points to a neo4j db path so that a local server can be started there
    -config Points to a config file when starting a local server

    Example arguments for remote:
    -port 1337
    -host 192.168.1.234 -port 1337 -name shell
    -host localhost -readonly
    ...or no arguments for default values
    Example arguments for local:
    -path /path/to/db
    -path /path/to/db -config /path/to/neo4j.config
    -path /path/to/db -readonly

    最佳答案

    好的,不幸的是,您正在运行 1.6.M02,它有这个已知问题,可以使您的数据库处于这种状态。 1.6没有这个问题。在 neo4j 邮件列表中有另一个数据库有这个问题,所以我创建了这个工具:http://pastebin.com/KuSTcaGM修复这样一个损坏的日志。你会觉得编译和运行它很舒服吗?否则,我可以将一个捆绑的 jar 和一个脚本放在一起,例如:

    $ ./fix-double-start-record-issue my/db

    并以某种方式发送给您。

    关于ubuntu - neo4j 1.6.M02 数据库似乎已损坏;我该如何恢复它?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9311701/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com