【问题标题】:A neo4j docker service is not starting upneo4j docker 服务未启动
【发布时间】:2018-01-03 15:09:35
【问题描述】:

以下是我的 neo4j docker 服务的 yaml 文件:

version: "2"
services:
  neo4j:
    image: neo4j:3.2.0
    network_mode: host
    restart: always
    environment:
      - NEO4J_AUTH=neo4j/neo4js
    env_file:
      - ./test-neo4j.env
    cap_add:
      - SYS_RESOURCE
    expose:
      - 7474
      - 7687
      - 1337
    ports:
      - "7474:7474"
      - "7687:7687"
      - "1337:1337"
    volumes:
      - ../docker-neo4j/test-conf:/conf
      - ../docker-neo4j/data:/data

我在 test-conf 目录中有默认的 neo4j.conf 文件。如果我不将 ../docker-neo4j/test-conf:/conf 行添加到我的卷中,该图就会启动并运行。如果我添加那条特定的线,那么图表就不会启动。我收到以下错误:

neo4j_1  | Error: Could not find or load main class org.neo4j.commandline.admin.AdminTool
neo4j_1  | Active database: graph.db
neo4j_1  | Directories in use:
neo4j_1  |   home:         /var/lib/neo4j
neo4j_1  |   config:       /var/lib/neo4j/conf
neo4j_1  |   logs:         /var/log/neo4j
neo4j_1  |   plugins:      /var/lib/neo4j/plugins
neo4j_1  |   import:       /var/lib/neo4j/import
neo4j_1  |   data:         /var/lib/neo4j/data
neo4j_1  |   certificates: /var/lib/neo4j/certificates
neo4j_1  |   run:          /var/run/neo4j
neo4j_1  | Starting Neo4j.
neo4j_1  | Error: Could not find or load main class org.neo4j.server.CommunityEntryPoint
dockerneo4jtest_neo4j_1 exited with code 1

我已经无法使用谷歌搜索了。我找不到合适的结果来解决这个 neo4j-docker 问题。有什么办法可以解决这个问题吗?

【问题讨论】:

    标签: docker neo4j


    【解决方案1】:

    我能够使用您发布的配置复制问题 here

    要解决它,只需在配置中注释或删除以下行:

    #dbms.directories.lib=/usr/share/neo4j/lib
    

    容器上不存在目录/usr/share/neo4j/lib。该参数的默认值为lib (link to docs)。您也可以将其设置为/var/lib/neo4j/lib

    希望这会有所帮助。

    【讨论】:

    • @Ramvignesh 从 ../docker-neo4j/test-conf 文件夹中发布您的 neo4j 配置,以便我可以在本地尝试。
    猜你喜欢
    • 2023-03-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-08-23
    • 1970-01-01
    • 2013-03-02
    相关资源
    最近更新 更多