我有一个小型数据库,一天前还运行良好,但是现在,当我尝试启动它时,控制台声称它已成功打开,但 Web 服务器却挂起了。
lsof -i | grep 7474
指出 neo4j 正在监听端口,并且“close_wait”,据我所知,这意味着服务器端将其关闭。
我收到的唯一新错误是缺少 logback.groovy 以及 logback-test.xml,这非常奇怪,因为我在 neo4j 配置文件中将日志记录设置为 false。这是我启动 neo4j 时的输出:
Starting Neo4j Server...19:31:30,507 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
19:31:30,507 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
19:31:30,508 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/usr/local/Cellar/neo4j/community-1.8.1-unix/libexec/system/lib/neo4j-server-1.8.1.jar!/logback.xml]
19:31:30,536 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@33d6f122 - URL [jar:file:/usr/local/Cellar/neo4j/community-1.8.1-unix/libexec/system/lib/neo4j-server-1.8.1.jar!/logback.xml] is not of type file
19:31:30,632 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
19:31:30,646 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
19:31:30,650 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
19:31:30,670 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
19:31:30,737 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
19:31:30,737 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
19:31:30,740 |-ERROR in ch.qos.logback.core.joran.action.IncludeAction - Could not find resource corresponding to [custom-logback.xml]
19:31:30,742 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@647109c4 - Registering current configuration as safe fallback point
WARNING: not changing user
process [2350]... waiting for server to be ready...... OK.
Go to http://localhost:7475/webadmin/ for administration interface.
我认为这是路径的问题,因此我将 NEO4J_HOME 附加到 neo4j 文件,如下所示:https://groups.google.com/forum/#!msg/neo4j/NMVHoflUrHo/warnQUInGCgJ(Bhargava 的解决方案)。
尽管如此,问题仍然存在。有什么想法吗?我不知道日志文件有什么用处,也不知道为什么需要它们。
有人吗?真的,即使是指向解释的指针也可能有用。
答案1
这是由于您的系统的打开文件句柄限制。
使用 launchctl 设置两个 maxfiles 并使用 ulimit 设置 ulimit -n 以便能够正确启动 neo4j。
否则,症状就是这个过程将像您所描述的那样超时。