HI Kalidhakani
As i am new to Neo4j,
can you please suggest what properties you have set, while running server.
and you are using enterprise or community edition?
Please help.
Regards:
Arpit
On Friday, January 17, 2014 at 5:44:55 PM UTC+5:30, Kalidhakani J 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/d/optout.