0

尝试启动 neo4j 服务并收到类似消息

警告:检测到最大打开文件的限制为 1024,而建议的最小值为 40000。警告:服务器操作可能会出现问题。有关解除此限制的信息,请参阅 Neo4j 手册。正在启动 Neo4j 服务器...警告:不更改用户进程 [17348]...等待服务器准备好...不好。Neo4j Server 可能无法启动,请检查日志。

日志说:

Opened [/home/ub/graph_db/neo4j-community-1.7.M01/data/graph.db/nioneo_logical.log.1] clean empty log, version=224, lastTxId=654769
2013-03-14 11:26:28.111+0000: TM opening log: /home/ub/graph_db/neo4j-community-1.7.M01/data/graph.db/tm_tx_log.1
2013-03-14 11:26:28.159+0000: Failed to load index provider lucene Target file[lucene.log.v318] already exists
org.neo4j.graphdb.NotFoundException: Target file[lucene.log.v318] already exists
    at org.neo4j.kernel.impl.util.FileUtils.renameFile(FileUtils.java:165)
    at org.neo4j.kernel.DefaultFileSystemAbstraction.renameFile(DefaultFileSystemAbstraction.java:78)
    at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.renameLogFileToRightVersion(XaLogicalLog.java:700)
    at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.renameIfExists(XaLogicalLog.java:219)
    at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:171)
    at org.neo4j.kernel.impl.transaction.xaframework.XaContainer.openLogicalLog(XaContainer.java:64)
    at org.neo4j.index.impl.lucene.LuceneDataSource.<init>(LuceneDataSource.java:229)
    at org.neo4j.index.lucene.LuceneIndexProvider.load(LuceneIndexProvider.java:71)
    at org.neo4j.kernel.AbstractGraphDatabase$DefaultKernelExtensionLoader.loadIndexImplementations(AbstractGraphDatabase.java:986)
    at org.neo4j.kernel.AbstractGraphDatabase$DefaultKernelExtensionLoader.init(AbstractGraphDatabase.java:958)
    at org.neo4j.kernel.LifeSupport$LifecycleInstance.init(LifeSupport.java:362)
    at org.neo4j.kernel.LifeSupport.init(LifeSupport.java:76)
    at org.neo4j.kernel.LifeSupport.start(LifeSupport.java:110)
    at org.neo4j.kernel.AbstractGraphDatabase.run(AbstractGraphDatabase.java:178)
    at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:69)
    at org.neo4j.server.NeoServerBootstrapper$1.createDatabase(NeoServerBootstrapper.java:65)
    at org.neo4j.server.database.Database.createDatabase(Database.java:80)
    at org.neo4j.server.database.Database.<init>(Database.java:63)
    at org.neo4j.server.NeoServerWithEmbeddedWebServer.startDatabase(NeoServerWithEmbeddedWebServer.java:186)
    at org.neo4j.server.NeoServerWithEmbeddedWebServer.start(NeoServerWithEmbeddedWebServer.java:97)
    at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:87)
    at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:52)
2013-03-14 11:26:28.160+0000: TM shutting down
2013-03-14 11:26:28.382+0000: Closed log /home/biju/graph_db/neo4j-community-1.7.M01/data/graph.db/nioneo_logical.log
2013-03-14 11:26:28.945+0000: NeoStore closed
2013-03-14 11:26:28.946+0000: --- SHUTDOWN diagnostics START ---
2013-03-14 11:26:28.947+0000: --- SHUTDOWN diagnostics END ---

当我在我的机器上安装 ElasticSearch 时,这种情况就开始发生了。启动 Elastic 搜索“JAVA_HOME 问题”时存在一个问题,该问题已排序。

4

2 回答 2

1

我第一次在我的 Linux 笔记本电脑上安装 Neo4j 时遇到了这样一个问题,我解决了将这几行放在/etc/security/limits.conf文件末尾的问题:

user               hard    nofile          100000
user               soft    nofile          40000

其中user是启动 Neo4j 的用户的登录名。1000040000有点随意,对我来说没问题,如果你仍然得到错误尝试增加它们。

于 2013-03-14T14:29:56.580 回答
0

如果你有一个有这个问题的数据库,升级不会让它消失。1.8.2 将防止这种情况发生。我看到你正在运行社区,所以保留旧日志并不是那么必要。尝试删除现有的 lucene.log.v318 文件,或者至少将其移开,看看下次启动会发生什么。

于 2013-03-14T13:57:51.907 回答