Actually my servers are running. I am trying to use the server's db. How can I do that in embedded highly available graph database ?? When i try to create a embedded highly available graph database giving the path name as server's db path, it is showing me this exception. How can i implement it ??? Wat am i missing here? Help me.
On Mon, Jan 20, 2014 at 7:00 PM, Peter Neubauer < [email protected]> wrote: > Can you please check that no other neo4j java process is currently running > on that machine, as it seems two database instances are trying to access > the files? > > /peter > > > G: neubauer.peter > S: peter.neubauer > P: +46 704 106975 > L: http://www.linkedin.com/in/neubauer > T: @peterneubauer > > Neo4j 2.0.0 - > (graphs)-[:FOR]->(everyone)<http://blog.neo4j.org/2013/12/neo4j-20-ga-graphs-for-everyone.html> > Do something useful - Teach your kids 1 hour code! <http://code.org/learn> > > > On Fri, Jan 17, 2014 at 1:14 PM, Kalidhakani J <[email protected]>wrote: > >> HI all, >> >> I created a cluster with three nodes. In every server I gave my database >> path as data/myGraph.db >> >> For creating HIghlyAvailableGraphDatabase, I used the following code, >> >> GraphDatabaseService graphDb = >> databaseFactory.newHighlyAvailableDatabaseBuilder("<SERVER_PATH>/data/myGraph.db") >> .loadPropertiesFromFile("neo4jProperties.properties") >> .newGraphDatabase(); >> >> where my properties file had the configurations as follows, >> >> ha.server_id=1 >> ha.initial_hosts=192.168.9.1:5001,192.168.9.2:5002,192.168.9.3:5003 >> >> I tried creating a node as follows, >> >> Transaction tx = graphDb.beginTx(); >> Node node1 =graphDb.createNode(); >> node1.setProperty("name", "kk"); >> node1.setProperty("college", "ceg"); >> graphDb.index().forNodes( "nodes" ).add( node1, "name", "kk" ); >> System.out.println("Node1 name :"+node1.getProperty("name")); >> tx.success(); >> tx.close(); >> >> But when i run the code I get the following exception, >> >> >> Exception in thread "main" java.lang.RuntimeException: Error starting >> org.neo4j.kernel.ha.HighlyAvailableGraphDatabase, >> /home/admin/neo4j-enterprise-2.0.0/data/kkGraph.db >> at >> org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:333) >> at >> org.neo4j.kernel.ha.HighlyAvailableGraphDatabase.<init>(HighlyAvailableGraphDatabase.java:139) >> at >> org.neo4j.graphdb.factory.HighlyAvailableGraphDatabaseFactory$1.newDatabase(HighlyAvailableGraphDatabaseFactory.java:47) >> at >> org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:198) >> at >> in.co.nmsworks.neo4j.examples.HighlyAvailableDbTest.main(HighlyAvailableDbTest.java:30) >> Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component >> 'org.neo4j.kernel.StoreLockerLifecycleAdapter@7fa9629b' was successfully >> initialized, but failed to start. Please see attached cause exception. >> at >> org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:504) >> at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:115) >> at >> org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:310) >> ... 4 more >> Caused by: org.neo4j.kernel.StoreLockException: Unable to obtain lock on >> store lock file: >> /home/admin/neo4j-enterprise-2.0.0/data/kkGraph.db/store_lock. Please >> ensure no other process is using this database, and that the directory is >> writable (required even for read-only access) >> at org.neo4j.kernel.StoreLocker.checkLock(StoreLocker.java:87) >> at >> org.neo4j.kernel.StoreLockerLifecycleAdapter.start(StoreLockerLifecycleAdapter.java:44) >> at >> org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:498) >> ... 6 more >> Caused by: java.io.IOException: Unable to lock >> sun.nio.ch.FileChannelImpl@64d11693 because another process already >> holds the lock. >> at >> org.neo4j.kernel.impl.nioneo.store.FileLock.getOsSpecificFileLock(FileLock.java:87) >> at >> org.neo4j.kernel.DefaultFileSystemAbstraction.tryLock(DefaultFileSystemAbstraction.java:89) >> at org.neo4j.kernel.StoreLocker.checkLock(StoreLocker.java:74) >> ... 8 more >> >> Help me. >> Thanks in advance. >> >> >> >> >> -- >> 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 [email protected]. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > -- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
