首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在“日志包含前缀为2的条目”上升级Neo4j数据失败

在“日志包含前缀为2的条目”上升级Neo4j数据失败
EN

Stack Overflow用户
提问于 2022-09-10 17:29:58
回答 1查看 103关注 0票数 0

我正在通过AWS上的Docker卷在Neo4j v3.5.11CE上运行一个数据库。我想升级到4.4.9,所以我创建了一个tar ./graph.db,并将其带回到我的开发框中。我提取到/var/lib/新4j/data/数据库。我将它挂载到一个neo4j v3.5.11容器中,它很好地启动。我可以通过localhost:7474看到所有的数据。

接下来,我尝试通过以下方式安装到neo4j v4.4.0:

代码语言:javascript
复制
docker run -d -p 7474:7474 -p 7687:7687 -v /var/lib/neo4j/data:/var/lib/neo4j/data -v /var/lib/neo4j/plugins:/plugins -v /var/lib/neo4j/logs:/var/log/neo4j -e NEO4J_AUTH=none -e NEO4J_dbms_allow__upgrade=true --name neo4j  neo4j:4.0.0

Neo4j失败:"Transaction logs contains entries with prefix 2, and the highest supported prefix is 1. This indicates that the log files originates from a newer version of neo4j."这很奇怪,因为它已经从3.5.5升级到3.5.11了--从来没有被更新过的版本碰过。

代码语言:javascript
复制
docker logs neo4j-apoc
    Fetching versions.json for Plugin 'apoc' from https://neo4j-contrib.github.io/neo4j-apoc-procedures/versions.json
    Installing Plugin 'apoc' from https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/4.0.0.7/apoc-4.0.0.7-all.jar to /plugins/apoc.jar 
    Applying default values for plugin apoc to neo4j.conf
    Skipping dbms.security.procedures.unrestricted for plugin apoc because it is already set
    Directories in use:
      home:         /var/lib/neo4j
      config:       /var/lib/neo4j/conf
      logs:         /logs
      plugins:      /plugins
      import:       /var/lib/neo4j/import
      data:         /var/lib/neo4j/data
      certificates: /var/lib/neo4j/certificates
      run:          /var/lib/neo4j/run
    Starting Neo4j.
    2022-09-10 14:18:32.888+0000 WARN  Unrecognized setting. No declared setting with name: apoc.export.file.enabled
    2022-09-10 14:18:32.892+0000 WARN  Unrecognized setting. No declared setting with name: apoc.import.file.enabled
    2022-09-10 14:18:32.893+0000 WARN  Unrecognized setting. No declared setting with name: apoc.import.file.use_neo4j_config
    2022-09-10 14:18:32.921+0000 INFO  ======== Neo4j 4.0.0 ========
    2022-09-10 14:18:32.934+0000 INFO  Starting...
    2022-09-10 14:18:48.713+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@123d7057' was successfully initialized, but failed to start. Please see the attached cause exception "Transaction logs contains entries with prefix 2, and the highest supported prefix is 1. This indicates that the log files originates from a newer version of neo4j.". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@123d7057' was successfully initialized, but failed to start. Please see the attached cause exception "Transaction logs contains entries with prefix 2, and the highest supported prefix is 1. This indicates that the log files originates from a newer version of neo4j.".

我试了几件事:

1.)删除事务日志:sudo rm graph.db/neostore.transaction.db.*会抛出相同的事务日志错误,即使目录中没有事务日志;

2.)尝试数据库恢复,方法是将其添加到run命令:-e NEO4J_unsupported_dbms_tx__log_fail__on__corrupted__log__files=false --这与"Unknown store version 'SF4.3.0'"一起失败

代码语言:javascript
复制
2022-09-10 15:39:48.458+0000 INFO  Starting...
2022-09-10 15:40:34.529+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@2a39aa2b' was successfully initialized, but failed to start. Please see the attached cause exception "Unknown store version 'SF4.3.0'". Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@2a39aa2b' was successfully initialized, but failed to start. Please see the attached cause exception "Unknown store version 'SF4.3.0'".
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabaseService@2a39aa2b' was successfully initialized, but failed to start. Please see the attached cause exception "Unknown store version 'SF4.3.0'".

任何想法都值得赞赏!谢谢!

EN

回答 1

Stack Overflow用户

发布于 2022-09-10 18:48:36

删除事务日志从来不是一个好主意。您要做的是添加一个环境变量:

代码语言:javascript
复制
dbms.allow_upgrade=true

然后,它应该按照docs声明的那样工作,您可以更新最新的3.5到4.0.0 Neo4j版本。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73673884

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档