在Mac M1中通过docker compose启动neo4j服务器时出错

dsekswqp  于 2023-05-06  发布在  Docker
关注(0)|答案(1)|浏览(358)

我正在尝试使用Docker compose启动Neo4J服务器。下面是我的docker-composer.yml

version: '3.7'
services:
  neo4j:
    image: neo4j:4.4.0
    platform: linux/amd64
    restart: always
    hostname: neo4j
    container_name: neo4j
    ports:
      - 7474:7474
      - 7687:7687
    volumes:
      - ./neo4j/data:/data
    environment:
      - NEO4J_AUTH=neo4j/pleaseletmein
      - NEO4J_PLUGINS=["apoc", "graph-data-science"]
      - NEO4J_dbms_security_procedures_unrestricted=apoc.*,gds.*
      - NEO4J_server_memory_heap_initial__size=1G
      - NEO4J_server_memory_heap_max__size=2G
      - NEO4J_server_memory_pagecache_size=1G

当我尝试执行docker-compose up时,我得到以下错误:

neo4j      | Changed password for user 'neo4j'.
neo4j      | 2023-05-01 03:32:58.760+0000 WARN  Unrecognized setting. No declared setting with name: server.memory.pagecache.size
neo4j      | 2023-05-01 03:32:58.766+0000 WARN  Unrecognized setting. No declared setting with name: server.memory.heap.max_size
neo4j      | 2023-05-01 03:32:58.767+0000 WARN  Unrecognized setting. No declared setting with name: server.memory.heap.initial_size
neo4j      | 2023-05-01 03:32:58.768+0000 WARN  Unrecognized setting. No declared setting with name: PLUGINS
neo4j      | 2023-05-01 03:32:58.907+0000 INFO  Starting...
neo4j      | 2023-05-01 03:33:02.744+0000 INFO  This instance is ServerId{cea5043e} (cea5043e-759f-4bcf-a10a-f0859ba901b3)
neo4j      | 2023-05-01 03:33:11.901+0000 INFO  ======== Neo4j 4.4.0 ========
neo4j      | 2023-05-01 03:33:20.690+0000 ERROR Failed to start Neo4j on 0.0.0.0:7474.
neo4j      | java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
neo4j      |    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:228) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:181) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:142) [neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:95) [neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:34) [neo4j-4.4.0.jar:4.4.0]
neo4j      | Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.dbms.database.DefaultSystemGraphInitializer@4e0cc334' was successfully initialized, but failed to start. Please see the attached cause exception "The read version string length 99 is not proper.".
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:463) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:219) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    ... 5 more
neo4j      | Caused by: org.neo4j.graphdb.DatabaseShutdownException: This database is shutdown.
neo4j      |    at org.neo4j.kernel.availability.DatabaseAvailabilityGuard.assertDatabaseAvailable(DatabaseAvailabilityGuard.java:172) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginKernelTransaction(GraphDatabaseFacade.java:197) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransactionInternal(GraphDatabaseFacade.java:176) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:122) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:116) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:104) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTx(GraphDatabaseFacade.java:99) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.SystemGraphComponents.initializeSystemGraph(SystemGraphComponents.java:97) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.DefaultSystemGraphInitializer.initializeSystemGraph(DefaultSystemGraphInitializer.java:41) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.SystemGraphInitializer.start(SystemGraphInitializer.java:29) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:219) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    ... 5 more
neo4j      | Caused by: java.lang.IllegalArgumentException: The read version string length 99 is not proper.
neo4j      |    at org.neo4j.kernel.impl.store.MetaDataStore.versionLongToString(MetaDataStore.java:910) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForStore(RecordFormatSelector.java:159) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectNewestFormat(RecordFormatSelector.java:280) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.storemigration.RecordStoreVersionCheck.configuredVersion(RecordStoreVersionCheck.java:169) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.storemigration.RecordStoreVersionCheck.<init>(RecordStoreVersionCheck.java:56) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.internal.recordstorage.RecordStorageEngineFactory.versionCheck(RecordStorageEngineFactory.java:128) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.storemigration.DatabaseMigrator.migrate(DatabaseMigrator.java:90) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.database.Database.upgradeStore(Database.java:681) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.database.Database.start(Database.java:411) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:197) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:153) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:36) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.AbstractDatabaseManager.forEachDatabase(AbstractDatabaseManager.java:175) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.AbstractDatabaseManager.startAllDatabases(AbstractDatabaseManager.java:119) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.AbstractDatabaseManager.start(AbstractDatabaseManager.java:113) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:219) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    ... 5 more
neo4j      | 2023-05-01 03:33:20.695+0000 INFO  Neo4j Server shutdown initiated by request
neo4j      | 2023-05-01 03:33:20.698+0000 INFO  Stopped.
neo4j exited with code 1
neo4j      | Changed password for user 'neo4j'.
neo4j      | 2023-05-01 03:33:57.098+0000 WARN  Unrecognized setting. No declared setting with name: server.memory.pagecache.size
neo4j      | 2023-05-01 03:33:57.104+0000 WARN  Unrecognized setting. No declared setting with name: server.memory.heap.max_size
neo4j      | 2023-05-01 03:33:57.105+0000 WARN  Unrecognized setting. No declared setting with name: server.memory.heap.initial_size
neo4j      | 2023-05-01 03:33:57.105+0000 WARN  Unrecognized setting. No declared setting with name: PLUGINS
neo4j      | 2023-05-01 03:33:57.232+0000 INFO  Starting...
neo4j      | 2023-05-01 03:34:00.967+0000 INFO  This instance is ServerId{cea5043e} (cea5043e-759f-4bcf-a10a-f0859ba901b3)
neo4j      | 2023-05-01 03:34:09.689+0000 INFO  ======== Neo4j 4.4.0 ========
neo4j      | 2023-05-01 03:34:19.548+0000 ERROR Failed to start Neo4j on 0.0.0.0:7474.
neo4j      | java.lang.RuntimeException: Error starting Neo4j database server at /data/databases
neo4j      |    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:228) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:181) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.server.CommunityBootstrapper.createNeo(CommunityBootstrapper.java:36) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:142) [neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:95) [neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.server.CommunityEntryPoint.main(CommunityEntryPoint.java:34) [neo4j-4.4.0.jar:4.4.0]
neo4j      | Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'org.neo4j.dbms.database.DefaultSystemGraphInitializer@4e0cc334' was successfully initialized, but failed to start. Please see the attached cause exception "The read version string length 99 is not proper.".
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:463) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:219) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    ... 5 more
neo4j      | Caused by: org.neo4j.graphdb.DatabaseShutdownException: This database is shutdown.
neo4j      |    at org.neo4j.kernel.availability.DatabaseAvailabilityGuard.assertDatabaseAvailable(DatabaseAvailabilityGuard.java:172) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginKernelTransaction(GraphDatabaseFacade.java:197) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransactionInternal(GraphDatabaseFacade.java:176) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:122) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:116) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTransaction(GraphDatabaseFacade.java:104) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.factory.GraphDatabaseFacade.beginTx(GraphDatabaseFacade.java:99) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.SystemGraphComponents.initializeSystemGraph(SystemGraphComponents.java:97) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.DefaultSystemGraphInitializer.initializeSystemGraph(DefaultSystemGraphInitializer.java:41) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.SystemGraphInitializer.start(SystemGraphInitializer.java:29) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:219) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    ... 5 more
neo4j      | Caused by: java.lang.IllegalArgumentException: The read version string length 99 is not proper.
neo4j      |    at org.neo4j.kernel.impl.store.MetaDataStore.versionLongToString(MetaDataStore.java:910) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectForStore(RecordFormatSelector.java:159) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.store.format.RecordFormatSelector.selectNewestFormat(RecordFormatSelector.java:280) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.storemigration.RecordStoreVersionCheck.configuredVersion(RecordStoreVersionCheck.java:169) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.storemigration.RecordStoreVersionCheck.<init>(RecordStoreVersionCheck.java:56) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.internal.recordstorage.RecordStorageEngineFactory.versionCheck(RecordStorageEngineFactory.java:128) ~[neo4j-record-storage-engine-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.impl.storemigration.DatabaseMigrator.migrate(DatabaseMigrator.java:90) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.database.Database.upgradeStore(Database.java:681) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.database.Database.start(Database.java:411) ~[neo4j-kernel-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.AbstractDatabaseManager.startDatabase(AbstractDatabaseManager.java:197) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:153) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.DefaultDatabaseManager.startDatabase(DefaultDatabaseManager.java:36) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.AbstractDatabaseManager.forEachDatabase(AbstractDatabaseManager.java:175) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.AbstractDatabaseManager.startAllDatabases(AbstractDatabaseManager.java:119) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.dbms.database.AbstractDatabaseManager.start(AbstractDatabaseManager.java:113) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:442) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110) ~[neo4j-common-4.4.0.jar:4.4.0]
neo4j      |    at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:219) ~[neo4j-4.4.0.jar:4.4.0]
neo4j      |    ... 5 more
neo4j      | 2023-05-01 03:34:19.556+0000 INFO  Neo4j Server shutdown initiated by request
neo4j      | 2023-05-01 03:34:19.558+0000 INFO  Stopped.
neo4j exited with code 0

我厌倦了不同版本的Neo4j,如4.3.0或4.3.1,但同样的问题,我不知道如何使它运行。

mqkwyuun

mqkwyuun1#

您将Neo4j 5设置与Neo4j 4版本混合,Neo4j还为m1提供了手臂兼容的图像,因此无需指定平台。
这里是一个符合Neo4j 4的docker compose文件

version: '3.7'
services:
  neo4j:
    image: neo4j:4.4.19
    restart: always
    hostname: neo4j
    container_name: neo4j
    ports:
      - 7474:7474
      - 7687:7687
    volumes:
      - ./neo4j/data:/data
    environment:
      - NEO4J_AUTH=neo4j/pleaseletmein
      - NEO4JLABS_PLUGINS=["apoc", "graph-data-science"]
      - NEO4J_dbms_memory_heap_initial__size=1G
      - NEO4J_dbms_memory_heap_max__size=2G
      - NEO4J_dbms_memory_pagecache_size=1G

这里是Neo4j 5版本

version: '3'
services:
  neo4j:
    image: neo4j:5.7.0
    restart: always
    hostname: neo4j
    container_name: neo4j
    ports:
      - 7474:7474
      - 7687:7687
    environment:
      - NEO4J_AUTH=neo4j/pleaseletmein
      - NEO4J_PLUGINS=["apoc", "graph-data-science"]
      - NEO4J_server_memory_heap_initial__size=1G
      - NEO4J_server_memory_heap_max__size=2G
      - NEO4J_server_memory_pagecache_size=1G

相关问题