Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error attaching an existing graph.db #42

Open
florinb opened this issue Oct 12, 2015 · 4 comments
Open

error attaching an existing graph.db #42

florinb opened this issue Oct 12, 2015 · 4 comments

Comments

@florinb
Copy link

florinb commented Oct 12, 2015

Hi,

I'm trying to attach an existing graph.db to the setup described in Readme.md and I'm getting a couple errors during the Neo4j server start:
[o.n.s.r.RrdFactory]: Unable to open rrd store, attempting to recreate it
java.io.Exception: Invalid argument
...
[o.n.s.r.RrdFactory]: current RRDB is invalid, renamed it to /opt/data/graph.db/rrd-invalid-14446192...
[o.n.s.r.RrdFactory]: Unable to create new rrd store
java.io.Exception: Invalid argument
...

After these errors the start-up procedure ends and the server is shutdown.

I am able to open the graph.db using the normal install of Neo4j on my machine. My setup is using the latest Docker image for mazerunner and I've built locally the Neo4j image in order to use the latest Neo4j community edition 2.2.5 with my graph.db. I am running all this in Windows 7.

I am new to the stack used for this sample and any pointers to what may cause this problem and how to get mazerunner working with my graph.db would be very helpful!

Thanks!

@mblaauw
Copy link

mblaauw commented Oct 13, 2015

I'm running into the exact same error and trying to find the cause. One thing i noticed that I did wrong was to pull kbastani/docker-neo4j:2.2.3 instead of the kbastani/docker-neo4j:2.2.1 (seem to not exist anymore). If this turns out to be the reason, ill post it here.

Below an output of the relevant part of the .log created into the new graph.db folder:

2015-10-13 13:20:08.990+0000 INFO [o.n.s.d.LifecycleManagingDatabase]: Successfully started database
2015-10-13 13:20:08.995+0000 INFO [o.n.k.i.DiagnosticsManager]: --- SERVER STARTED START ---
2015-10-13 13:20:09.139+0000 ERROR [o.n.s.r.RrdFactory]: Unable to create new rrd store
java.io.IOException: Invalid argument
at sun.nio.ch.FileChannelImpl.map0(Native Method) ~[na:1.8.0_66-internal]
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:925) ~[na:1.8.0_66-internal]
at org.rrd4j.core.RrdNioBackend.mapFile(RrdNioBackend.java:63) ~[rrd4j-2.2.jar:na]
at org.rrd4j.core.RrdNioBackend.setLength(RrdNioBackend.java:86) ~[rrd4j-2.2.jar:na]
at org.rrd4j.core.RrdDb.(RrdDb.java:148) ~[rrd4j-2.2.jar:na]
at org.rrd4j.core.RrdDb.(RrdDb.java:101) ~[rrd4j-2.2.jar:na]
at org.neo4j.server.rrd.RrdFactory.createRrdb(RrdFactory.java:200) [neo4j-server-2.2.3.jar:2.2.3]
at org.neo4j.server.rrd.RrdFactory.createRrdDbAndSampler(RrdFactory.java:95) [neo4j-server-2.2.3.jar:2.2.3]
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:216) [neo4j-server-2.2.3.jar:2.2.3]
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:117) [neo4j-server-2.2.3.jar:2.2.3]
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:69) [neo4j-server-2.2.3.jar:2.2.3]
2015-10-13 13:20:09.141+0000 INFO [o.n.s.CommunityNeoServer]: Successfully shutdown Neo4j Server.
2015-10-13 13:20:09.144+0000 INFO [o.n.k.EmbeddedGraphDatabase]: Shutdown started
2015-10-13 13:20:09.145+0000 INFO [o.n.k.EmbeddedGraphDatabase]: Database is now unavailable
2015-10-13 13:20:09.327+0000 INFO [o.n.k.NeoStoreDataSource]: NeoStore closed
2015-10-13 13:20:09.328+0000 INFO [o.n.k.i.DiagnosticsManager]: --- STOPPING diagnostics START ---
2015-10-13 13:20:09.329+0000 INFO [o.n.k.i.DiagnosticsManager]: --- STOPPING diagnostics END ---
2015-10-13 13:20:09.344+0000 INFO [o.n.s.d.LifecycleManagingDatabase]: Successfully stopped database
2015-10-13 13:20:09.346+0000 ERROR [o.n.s.CommunityBootstrapper]: Failed to start Neo Server on port [7474]
org.neo4j.server.ServerStartupException: Starting Neo4j Server failed: java.io.IOException: Invalid argument
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:258) ~[neo4j-server-2.2.3.jar:2.2.3]
at org.neo4j.server.Bootstrapper.start(Bootstrapper.java:117) [neo4j-server-2.2.3.jar:2.2.3]
at org.neo4j.server.Bootstrapper.main(Bootstrapper.java:69) [neo4j-server-2.2.3.jar:2.2.3]
Caused by: java.lang.RuntimeException: java.io.IOException: Invalid argument
at org.neo4j.server.rrd.RrdFactory.createRrdb(RrdFactory.java:205) ~[neo4j-server-2.2.3.jar:2.2.3]
at org.neo4j.server.rrd.RrdFactory.createRrdDbAndSampler(RrdFactory.java:95) ~[neo4j-server-2.2.3.jar:2.2.3]
at org.neo4j.server.AbstractNeoServer.start(AbstractNeoServer.java:216) ~[neo4j-server-2.2.3.jar:2.2.3]
... 2 common frames omitted
Caused by: java.io.IOException: Invalid argument
at sun.nio.ch.FileChannelImpl.map0(Native Method) ~[na:1.8.0_66-internal]
at sun.nio.ch.FileChannelImpl.map(FileChannelImpl.java:925) ~[na:1.8.0_66-internal]
at org.rrd4j.core.RrdNioBackend.mapFile(RrdNioBackend.java:63) ~[rrd4j-2.2.jar:na]
at org.rrd4j.core.RrdNioBackend.setLength(RrdNioBackend.java:86) ~[rrd4j-2.2.jar:na]
at org.rrd4j.core.RrdDb.(RrdDb.java:148) ~[rrd4j-2.2.jar:na]
at org.rrd4j.core.RrdDb.(RrdDb.java:101) ~[rrd4j-2.2.jar:na]
at org.neo4j.server.rrd.RrdFactory.createRrdb(RrdFactory.java:200) ~[neo4j-server-2.2.3.jar:2.2.3]
... 4 common frames omitted

@jexp
Copy link
Member

jexp commented Oct 13, 2015

There is an issue with memory mapping of the RRD on a mapped volume. For me as a workaround I configured the rrd directiory (in neo4j-server.properties) to point e.g. to /tmp.

Not sure if using the Neo4j docker image would work, don't have time today to test but you could give it a try.

http://hub.docker.com/r/neo4j/neo4j

I also just used the docker-compose file manually instead of using the compose image for mazerunner, because I wanted to pass in a /data location for the graph-database.

@florinb
Copy link
Author

florinb commented Oct 23, 2015

Thank you for the info! I'll have to learn more about that and try it.
As a solution I used an all new graph.db in the neo4j container and populated it using REST api via a custom app. This worked without any errors.

@dalanlan
Copy link

@florinb Would you mind if you could share your startup params of this? I guess I'm running into the exact error as yours.

docker run -P -v /Users/simei.he/Documents/graphDB/gracenote:/opt/data --name graceLight.db --link mazerunner:mazerunner --link hdfs:hdfs kbastani/docker-neo4j:2.2.1
stdin: is not a tty
Starting Neo4j Server console-mode...
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 -XX:-OmitStackTraceInFastThrow -XX:hashCode=5 -Dneo4j.ext.udc.source=debian
2016-05-23 05:04:16.811+0000 INFO  [API] Setting startup timeout to: 120000ms based on 120000
2016-05-23 05:04:18.895+0000 INFO  [API] Successfully started database
2016-05-23 05:04:19.013+0000 INFO  [API] current RRDB is invalid, renamed it to /opt/data/graph.db/rrd-invalid-1463979859004
2016-05-23 05:04:19.051+0000 INFO  [API] Successfully shutdown Neo4j Server.
2016-05-23 05:04:19.318+0000 INFO  [API] Successfully stopped database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants