Neo4j的服务器无法在Ubuntu虚拟机
问题描述:
我只想用Neo4j的服务器在Ubuntu的虚拟机开始,我已经安装了Oracle的Java象下面这样:Neo4j的服务器无法在Ubuntu虚拟机
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
,然后当我尝试启动的Neo4j服务器,它的主要错误是这样的:
WARNING: Max 1024 open files allowed, minimum of 40 000 recommended. See the Neo4j manual.
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...WARNING: not changing user process [3337]... waiting for server to be ready.................... Failed to start within 120 seconds.
Neo4j Server may have failed to start, please check the logs.
和日志是:
2013-12-13 11:40:41.736+0000 INFO [API] Setting startup timeout to: 120000ms based on -1
Detected incorrectly shut down database, performing recovery..
2013-12-13 11:40:55.719+0000 INFO [API] Successfully started database
2013-12-13 11:40:56.279+0000 DEBUG [API] Unable to open rrd store, attempting to recreate it
2013-12-13 11:40:56.287+0000 DEBUG [API] current RRDB is invalid, renamed it to /vagrant/neo4j-community-2.0.0/data/rrd-invalid-1386934856281
2013-12-13 11:40:56.377+0000 DEBUG [API] Unable to create new rrd store
2013-12-13 11:40:56.447+0000 DEBUG [API] org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: java.io.IOException: Invalid argument
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:209) ~[neo4j-server-2.0.0.jar:2.0.0]
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:87) [neo4j-server-2.0.0.jar:2.0.0]
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:50) [neo4j-server-2.0.0.jar:2.0.0]
Caused by: java.lang.RuntimeException: java.io.IOException: Invalid argument
at org.neo4j.server.rrd.RrdFactory.createRrdb(RrdFactory.java:177) ~[neo4j-server-2.0.0.jar:2.0.0]
at org.neo4j.server.rrd.RrdFactory.recreateArchive(RrdFactory.java:235) ~[neo4j-server-2.0.0.jar:2.0.0]
at org.neo4j.server.rrd.RrdFactory.createRrdb(RrdFactory.java:156) ~[neo4j-server-2.0.0.jar:2.0.0]
at org.neo4j.server.rrd.RrdFactory.createRrdDbAndSampler(RrdFactory.java:84) ~[neo4j-server-2.0.0.jar:2.0.0]
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:161) ~[neo4j-server-2.0.0.jar:2.0.0]
... 2 common frames omitted
Caused by: java.io.IOException: Invalid argument
at sun.nio.ch.FileChannelImpl.map0(Native Method) ~[na:1.7.0_45]
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:874) ~[na:1.7.0_45]
at org.rrd4j.core.RrdNioBackend.mapFile(RrdNioBackend.java:64) ~[rrd4j-2.0.7.jar:na]
at org.rrd4j.core.RrdNioBackend.setLength(RrdNioBackend.java:87) ~[rrd4j-2.0.7.jar:na]
at org.rrd4j.core.RrdDb.<init>(RrdDb.java:148) ~[rrd4j-2.0.7.jar:na]
at org.rrd4j.core.RrdDb.<init>(RrdDb.java:101) ~[rrd4j-2.0.7.jar:na]
at org.neo4j.server.rrd.RrdFactory.createRrdb(RrdFactory.java:172) ~[neo4j-server-2.0.0.jar:2.0.0]
... 6 common frames omitted
2013-12-13 11:40:56.453+0000 DEBUG [API] Failed to start Neo Server on port [7474]
可能有人给一个专家dvice有关这个问题吗?
我已经更改了限制,按照mannual help中的说明操作,现在运行命令“ulimit -n”它将显示40960,但是当我启动neo4j服务时,它也会出现警告“允许最大1024个打开文件,最小推荐40,000“,如果需要其他操作?
答
Neo4j需要比大多数Linux发行版规定的最大限制更多的打开文件。你应该增加限制添加以下行/etc/security/limits.conf
文件:
neo4j soft nofile 40000
neo4j hard nofile 40000
你也可以看看this link了解更多详情。
请给我看你的配置,其中包含关于rrd的字符串。 – Evgenii
@Eugeny抱歉,不知道你的意思是哪个配置,它是Neo4j中的配置文件? neo4j-server.properties? – Cherish
是的,'neo4j-server.properties' – Evgenii