我在Mac OS X Sierra上使用Neo4j Community Edition 3.1.1.每当我尝试通过本地启动Neo4j时
neo4j start
Run Code Online (Sandbox Code Playgroud)
我得到以下内容:
Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingDatabase@a8ba98d' was successfully initialized, but failed to start.
Please see attached cause exception.
Run Code Online (Sandbox Code Playgroud)
在/usr/local/Cellar/neo4j/3.1.1/libexec/logs/neo4j.log的尾部有以下异常
Caused by: org.neo4j.helpers.PortBindException: Address localhost:7687 is already in use, cannot bind to it.
Run Code Online (Sandbox Code Playgroud)
我试过跑步
lsof -i -n -P | grep 7687
Run Code Online (Sandbox Code Playgroud)
但它又回来了.
请指教.
小智 0
注意:我会将其保留为评论,但没有所需的代表。
您的 lsof 可能会返回空值,因为某些 pid 仅对 root 可见。尝试:
sudo netstat -antlp
Run Code Online (Sandbox Code Playgroud)
这应该返回所有打开的端口,检查是否有与 7687 相对应的端口。
还可以尝试将 neo4j 作为服务运行。我相信它是Mac上的launchctl(我在Linux上使用systemctl)并检查错误是否仍然存在。
干杯