Debian 8.1 上 neo4j-service 的奇怪行为

Strange behavior of neo4j-service on Debian 8.1

由于这些说明,我已经在 Debian 8.1 上安装了 neo4j:http://debian.neo4j.org/

现在,如果我以 root 身份使用这样的 neo4j-service 启动 neo4j

service neo4j-service start

有时它会正常工作,但大多数时候,neo4j 服务会超时。但有趣的是 neo4j 确实启动了,我可以去浏览器做一些查询。但是 neo4j-service 告诉我它失败了:

root@ns***:~# service neo4j-service start
Job for neo4j-service.service failed. See 'systemctl status neo4j-service.service' and 'journalctl -xn' for details.
root@ns***:~# systemctl status neo4j-service.service
● neo4j-service.service - LSB: Neo4j Graph Database server
 Loaded: loaded (/etc/init.d/neo4j-service)
 Active: failed (Result: timeout) since Fri 2015-10-16 19:03:08 CEST; 6min ago
Process: 24556 ExecStop=/etc/init.d/neo4j-service stop (code=exited, status=0/SUCCESS)
Process: 29730 ExecStart=/etc/init.d/neo4j-service start (code=killed, signal=TERM)

Oct 16 18:58:08 ns***.ip-91-***-***.eu neo4j-service[29730]: WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Oct 16 18:58:08 ns***.ip-91-***-***.eu neo4j-service[29730]: Starting Neo4j Server...WARNING: not changing user
Oct 16 19:03:08 ns***.ip-91-***-***.eu systemd[1]: neo4j-service.service start operation timed out. Terminating.
Oct 16 19:03:08 ns***.ip-91-***-***.eu systemd[1]: Failed to start LSB: Neo4j Graph Database server.
Oct 16 19:03:08 ns***.ip-91-***-***.eu systemd[1]: Unit neo4j-service.service entered failed state.

有时它会告诉我服务已正确启动但无法停止。
大多数时候,我必须自己终止进程才能正确 "reset everything"。

你知道为什么会这样吗?
您是否知道 Debian 8.1 上的 neo4j 服务有任何问题?

这种 运行 Neo4j 的方法已弃用,您应该使用 neo4j 命令。

或者您可以编写自己的服务包装器,为此我建议您使用 http://supervisord.org/