DB corruption in 1.6.M02: Inject start failed, xid: GlobalId[NEOKERNL|3068638255112182367|508], BranchId[ 52 49 52 49 52 49 ] already injected

81 views
Skip to first unread message

Hendy Irawan

unread,
Dec 26, 2011, 7:18:01 AM12/26/11
to ne...@googlegroups.com
For some reason I managed to corrupt my 1.6.M02 database and neo4j is unable to recover it.
DB size is 8.5 MB and if needed I can provide it to neo4j devs.

It seems I did an "semi-unclean" shutdown, meaning I shutdown my Ubuntu 11.10 64-bit OS cleanly, but I didn't do "neo4j stop" before shutting down. It seems the OS simply killed the neo4j server process.

ceefour@annafi:~/neo4j-community-1.6.M02/bin$ ./neo4j-shell -path /together/project/SatukanCinta/satukancinta-neo4j-db_dev_1.6/
Dec 26, 2011 7:12:00 PM org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog doInternalRecovery
INFO: Non clean shutdown detected on log [/together/project/SatukanCinta/satukancinta-neo4j-db_dev_1.6/nioneo_logical.log.1]. Recovery started ...
org.neo4j.graphdb.TransactionFailureException: Could not create data source [nioneodb], see nested exception for cause of error
        at org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:161)
        at org.neo4j.kernel.GraphDbInstance.start(GraphDbInstance.java:104)
        at org.neo4j.kernel.EmbeddedGraphDbImpl.<init>(EmbeddedGraphDbImpl.java:190)
        at org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:78)
        at org.neo4j.shell.kernel.GraphDatabaseShellServer.instantiateGraphDb(GraphDatabaseShellServer.java:85)
        at org.neo4j.shell.kernel.GraphDatabaseShellServer.<init>(GraphDatabaseShellServer.java:57)
        at org.neo4j.shell.StartClient.tryStartLocalServerAndClient(StartClient.java:286)
        at org.neo4j.shell.StartClient.startLocal(StartClient.java:219)
        at org.neo4j.shell.StartClient.start(StartClient.java:159)
        at org.neo4j.shell.StartClient.main(StartClient.java:108)
Caused by: java.lang.RuntimeException: Unexpected Exception
        at org.neo4j.helpers.Exceptions.launderedException(Exceptions.java:78)
        at org.neo4j.helpers.Exceptions.launderedException(Exceptions.java:48)
        at org.neo4j.helpers.Exceptions.launderedException(Exceptions.java:43)
        at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.<init>(NeoStoreXaDataSource.java:216)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at org.neo4j.kernel.impl.transaction.XaDataSourceManager.create(XaDataSourceManager.java:77)
        at org.neo4j.kernel.impl.transaction.TxModule.registerDataSource(TxModule.java:155)
        ... 9 more
Caused by: java.io.IOException: Inject start failed, xid: GlobalId[NEOKERNL|3068638255112182367|508], BranchId[ 52 49 52 49 52 49 ] already injected
        at org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.injectStart(XaResourceManager.java:118)
        at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.applyStartEntry(XaLogicalLog.java:486)
        at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.applyEntry(XaLogicalLog.java:445)
        at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.doInternalRecovery(XaLogicalLog.java:815)
        at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:241)
        at org.neo4j.kernel.impl.transaction.xaframework.XaLogicalLog.open(XaLogicalLog.java:187)
        at org.neo4j.kernel.impl.transaction.xaframework.XaContainer.openLogicalLog(XaContainer.java:120)
        at org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource.<init>(NeoStoreXaDataSource.java:177)
        ... 15 more
ERROR (-v for expanded information):
        Could not create data source [nioneodb], see nested exception for cause of error

 -host      Domain name or IP of host to connect to (default: localhost)
 -port      Port of host to connect to (default: 1337)
 -name      RMI name, i.e. rmi://<host>:<port>/<name> (default: shell)
 -pid       Process ID to connect to
 -c         Command line to execute. After executing it the shell exits
 -readonly  Connect in readonly mode
 -path      Points to a neo4j db path so that a local server can be started there
 -config    Points to a config file when starting a local server

Example arguments for remote:
        -port 1337
        -host 192.168.1.234 -port 1337 -name shell
        -host localhost -readonly
        ...or no arguments for default values
Example arguments for local:
        -path /path/to/db
        -path /path/to/db -config /path/to/neo4j.config
        -path /path/to/db -readonly

Hendy Irawan

unread,
Dec 26, 2011, 7:22:45 AM12/26/11
to Neo4j
Btw this is my Java:

ceefour@annafi:~/neo4j-community-1.6.M02/bin$ java -version
java version "1.7.0_147-icedtea"
OpenJDK Runtime Environment (IcedTea7 2.0)
(7~b147-2.0-0ubuntu0.11.10.1)
OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode)

Peter Neubauer

unread,
Dec 26, 2011, 7:58:01 AM12/26/11
to ne...@googlegroups.com

Hendy,
Putting the DB on dropbox to take a look would be splendid.

Cheers

/peter

Sent from a device with crappy keyboard and autocorrect

Hendy Irawan

unread,
Dec 26, 2011, 12:35:31 PM12/26/11
to ne...@googlegroups.com
Thank you Peter.

I've sent it to you privately via Box.com.

Thank you.

Hendy

Peter Neubauer

unread,
Dec 27, 2011, 3:46:34 AM12/27/11
to ne...@googlegroups.com
Thanks Hendy!

We took a look at this. Actually, this is a know bug that can put
1.6.M02 into a problematic state. Nothing approaching corruption, but
we will write a better recovery routine around this. Thanks for
pointing it out, will be fixed in master before GA.

Cheers,

/peter neubauer

Google:neubauer.peter
Skype:peter.neubauer
Phone: +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      @peterneubauer

brew install neo4j && neo4j start
heroku addons:add neo4j

Hendy Irawan

unread,
Dec 27, 2011, 5:02:21 AM12/27/11
to ne...@googlegroups.com
Thank you Peter !

Glad to know this :-)

Hendy

war...@gmail.com

unread,
Feb 8, 2013, 6:27:00 AM2/8/13
to ne...@googlegroups.com
Hello,

I run into the same problem with the 1.8.1 version of neo4j.
--> Inject start failed, xid: GlobalId[NEOKERNL|-945728666927739029|1], BranchId[ 52 49 52 49 52 49 ] already injected

I was able to execute your tool from http://pastebin.com/KuSTcaGM which restore the database, but I think the db should have run it by itself...

Mattias Persson

unread,
Feb 10, 2013, 3:48:10 PM2/10/13
to Neo4j Development
This bug has been fixed, and it will be included in 1.9


2013/2/8 <war...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Mattias Persson, [mat...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
Reply all
Reply to author
Forward
0 new messages