gpt4 book ai didi

linux - neo4j 服务器在 arch linux 上启动时出错

转载 作者:IT王子 更新时间:2023-10-29 00:35:07 25 4
gpt4 key购买 nike

我有一个 arch linux 设置并通过 arch 用户存储库安装了 neo4j (yaourt -S neo4j),我能够正常运行 web 控制台 (sudo neo4j console 看似正常的输出和完整的功能),但是在尝试启动服务器时(sudo neo4j start),我遇到以下错误消息:

/usr/share/neo4j/bin/utils: line 345: [: -lt: unary operator expected
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=/etc/neo4j/neo4j-server.properties -Djava.util.logging.config.file=/etc/neo4j/logging.properties -Dlog4j.configuration=file:/etc/neo4j/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...cat: /run/neo4j/neo4j-service.pid: No such file or directory
process []... waiting for server to be ready. Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
rm: cannot remove ‘/run/neo4j/neo4j-service.pid’: No such file or directory

在打印错误消息之前没有延迟,所以它似乎不是超时。我对 neo4j 很陌生(我使用 Web 控制台阅读了相当多的用户手册,但没有开发或服务器配置经验),所以我不确定还有什么可能是相关的。我试着查看 utils 脚本,错误似乎是它尝试 su neo4j 的地方,但它似乎也在继续尝试启动服务器。我还尝试更改它的启动端口,如 this question ,但没有变化。我能找到的唯一日志只是一遍又一遍(带有适当的时间戳):

Oct 15, 2014 1:33:49 AM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate
INFO: Initiating Jersey application, version 'Jersey: 1.9 09/02/2011 11:17 AM'

如有任何帮助,我们将不胜感激!

编辑:它失败的第 345 行是此代码段的结尾:

if [ $UID == 0 ] ; then
OPEN_FILES=`su $NEO4J_USER -c "ulimit -n"`
else
OPEN_FILES=`ulimit -n`
fi
if [ $OPEN_FILES -lt 40000 ]; then

通过一些回显调试,似乎 su $NEO4J_USER 失败了,可能是因为 $NEO4J_USER 被设置为 neo4j,我的系统上不存在一个用户。我尝试在其中一个配置文件中将其设置为 root,但显然无法正常工作。 Arch 对我来说是一种持续的学习体验,但我以前不必添加新用户就可以让软件正常工作。

最佳答案

这里有趣的一行是:

/usr/share/neo4j/bin/utils: line 345: [: -lt: unary operator expected

我假设这是由 neo4j 用户的错误默认 shell 引起的。当前为 neo4j 系统用户设置的默认值是什么?尝试将其切换为 bash。启动脚本应该可以很好地与 bash 配合使用。

关于linux - neo4j 服务器在 arch linux 上启动时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26373129/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com