Linux: Unable to create path for store dir (not permissions)

1,443 views
Skip to first unread message

Stacy Tyler Young

unread,
May 23, 2013, 9:57:39 PM5/23/13
to Neo4j
Having a bizarre issue with neo4j 1.9 + jdk 1.7 on ubuntu 12.04. 

Caused by: org.neo4j.kernel.StoreLockException: Unable to create path for store dir: "/usr/share/tomcat7/neo/db"
at org.neo4j.kernel.StoreLocker.checkLock(StoreLocker.java:75)
at org.neo4j.kernel.StoreLockerLifecycleAdapter.start(StoreLockerLifecycleAdapter.java:40)
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:491)
... 57 more
Caused by: java.io.IOException: Unable to create directory path ["/usr/share/tomcat7/neo/db"] for Neo4j store.
at org.neo4j.kernel.DefaultFileSystemAbstraction.mkdirs(DefaultFileSystemAbstraction.java:107)
at org.neo4j.kernel.StoreLocker.checkLock(StoreLocker.java:70)
... 59 more

Initially thought it was a permissions issue but even opening up the dir to the world has had no effect. (plus in the past the exception would indicate permissions issue) Server is using default apt-get install of tomcat7 with oracle jdk 1.7 installed. Tomcat user owns the dir ...and ulimit set appropriately in init.d start script. Also plenty of disk space. 

Any thoughts?

Stace


Stacy Tyler Young

unread,
May 23, 2013, 10:06:37 PM5/23/13
to Neo4j
p.s. forget to mention that I've verified tomcat is in fact using the proper jdk.

Server version: Apache Tomcat/7.0.26
Server built:   Apr 1 2013 08:32:04
Server number:  7.0.26.0
OS Name:        Linux
OS Version:     3.2.0-40-virtual
Architecture:   amd64
JVM Version:    1.7.0_21-b11
JVM Vendor:     Oracle Corporation

Michael Hunger

unread,
May 23, 2013, 10:11:34 PM5/23/13
to ne...@googlegroups.com
Stacy,

can you show the permissions of the dir and each of the dirs above it?

Michael

--
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.
 
 

Stacy Tyler Young

unread,
May 23, 2013, 10:29:09 PM5/23/13
to ne...@googlegroups.com

/usr/share/tomcat/neo (everything below is same i.e. chmod -R)
drwxrwxrwx   3 tomcat7 tomcat7 4096 May 23 17:53 neo

Parent dir and above:
drwxr-xr-x   5 root    root     4096 May 24 02:25 tomcat7

Stacy Tyler Young

unread,
May 23, 2013, 10:30:48 PM5/23/13
to ne...@googlegroups.com
drwxrwxrwx   3 tomcat7 tomcat7 4096 May 23 17:53 neo
drwxrwxrwx 2 tomcat7 tomcat7 4096 May 23 17:53 db

Stacy Tyler Young

unread,
May 23, 2013, 11:10:21 PM5/23/13
to ne...@googlegroups.com
Last note: the exact war deploys and starts fine on OS X with identical config (minor version of Oracle JDK slightly lower)

Michael Hunger

unread,
May 24, 2013, 12:56:47 AM5/24/13
to ne...@googlegroups.com
Does this directory exist?

/usr/share/tomcat/neo/db

What happens if you try to run manually with the same user as neo starts?

mkdir -p /usr/share/tomcat/neo/db

Sent from mobile device

Am 24.05.2013 um 05:10 schrieb Stacy Tyler Young <st...@actualcorp.com>:

>
> /usr/share/tomcat/neo

Stacy Tyler Young

unread,
May 24, 2013, 1:16:46 AM5/24/13
to ne...@googlegroups.com
Hi Michael, answers inline.

On Fri, May 24, 2013 at 12:56 AM, Michael Hunger <michael...@neopersistence.com> wrote:
Does this directory exist?

> Yes. Directories exist with the appropriate permissions. (Also tried removing to see if they would be created - with appropriate permissions to parent folder)
 
/usr/share/tomcat/neo/db

What happens if you try to run manually with the same user as neo starts?
 
mkdir -p /usr/share/tomcat/neo/db

> Directory is created without error. ( su -s /bin/sh tomcat7 ) 

Sent from mobile device

Am 24.05.2013 um 05:10 schrieb Stacy Tyler Young <st...@actualcorp.com>:

>
> /usr/share/tomcat/neo

Lasse Westh-Nielsen

unread,
May 24, 2013, 2:59:17 AM5/24/13
to Neo4j User
Stacy,

The code for this store locking business is really simple, and any problems we have had with it have been due to permissions or read-only mode. This has been in since 1.8.2, ~6 months.



That last method has get-or-create semantics, ie it first checks if the directory exists, and then proceeds to create it if needed, using the JDK library. Nothing complicated.

So I really have no idea why it doesn't work for you. Can I suggest you try a fresh download+install with vanilla permissions, running as the same user that installed it, in a sandbox directory? Just to check that it is reproducible.

BTW is this embedded or server?

 - Lasse

Stacy Tyler Young

unread,
May 24, 2013, 10:40:01 AM5/24/13
to ne...@googlegroups.com
It's embedded. I came to the same conclusion this morning after pulling my hair out.  I'm starting from scratch with fresh install and vanilla tomcat + manual install ...thx guys

Stacy Tyler Young

unread,
May 24, 2013, 1:38:11 PM5/24/13
to ne...@googlegroups.com
Rebuilt the environment and everything works. I'm suspecting either permission settings on the jdk were missed or something obscure. Anyhow, thanks for the help guys.
Reply all
Reply to author
Forward
0 new messages