我正在尝试配置一个 docker-compose.yml (我知道版本和服务没有说明,它们是文件的一部分)文件来运行 neo4j 实例。我正在使用 docker swarm 并部署一个堆栈,即使用以下命令:
码头工人群初始化
docker stack deploy -c docker-compose.yml neo
note_db:
image: neo4j:latest
environment:
- NEO4J_AUTH=<username>/<password>
- NEO4J_dbms_mode=CORE
- NEO4J_ACCEPT_LICENSE_AGREEMENT=yes
- NEO4J_dbms_connector_http_listen__address=:7474
- NEO4J_dbms_connector_https_listen__address=:6477
- NEO4J_dbms_connector_bolt_listen__address=:7687
ports:
- "7474:7474"
- "6477:6477"
- "7687:7687"
volumes:
- type: bind
source: ~/neo4j/data
target: /data
- type: bind
source: ~/neo4j/logs
target: /logs
deploy:
replicas: 1
resources:
limits:
cpus: "0.1"
memory: 120M
restart_policy:
condition: on-failure
我省略了用户名和密码。我目前只尝试启动一个实例,因为我仍在测试。我删除了 NEO4J_AUTH 和 NEO4J_AUTH=none,结果相同。
日志提供以下内容:
org.neo4j.commandline.admin.CommandFailed: initial password was not set because live Neo4j-users were detected., at org.neo4j.commandline.admin.security.SetInitialPasswordCommand.setPasswor (SetInitialPasswordCommand.java:83)
command failed: initial password was not set because live Neo4j-users were detected.,
Starting Neo4j.,
2018-09-17 16:12:39.396+0000 INFO ======== Neo4j 3.4.7 ========,
2018-09-17 16:12:41.990+0000 INFO Starting...,
2018-09-17 16:12:43.792+0000 ERROR Failed to start Neo4j: Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@70b0b186' was successfully initialized, but failed to start. Please see the attached cause exception "/logs/debug.log (Permission denied)".
在 debug.log 文件中,我发现的唯一内容是:(
[o.n.b.s.a.BasicAuthentication] Failed authentication attempt for 'neo4j'
没有其他故障、错误或警告)。
显然,我有某种身份验证问题,但我不确定错误在哪里以及如何解决它。我已尝试NEO4J_AUTH=none
完全删除 ENV,但它仍然无法正常工作。
有人在此问题上发布了一些内容,但他们没有收到任何回复。我希望我的可以。