Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Another problem with "No locks available" on NFS

534381Mar 25 2008 — edited Mar 25 2008
Using JE 3.2.74, got this exception when I first tried it on our test server.

com.sleepycat.je.log.LogException: (JE 3.2.74) java.io.IOException: No locks available
at com.sleepycat.je.log.FileManager.lockEnvironment(FileManager.java:1424)
at com.sleepycat.je.log.FileManager.<init>(FileManager.java:231)
at com.sleepycat.je.dbi.EnvironmentImpl.<init>(EnvironmentImpl.java:302)
at com.sleepycat.je.dbi.DbEnvPool.getEnvironment(DbEnvPool.java:102)
at com.sleepycat.je.dbi.DbEnvPool.getEnvironment(DbEnvPool.java:54)
at com.sleepycat.je.Environment.<init>(Environment.java:103)

It's not necessarily a show stopper simply because our production won't be using NFS...however, it's a bit...inconvenient to not be able to use this on NFS. I really want to be able to test on this machine and NFS is all I've got available.

I did find this previous thread:
1465960

There was a request in there to do a test, which I did.

Test method:
public static void main(String[] args) {
try {
File f = new File(System.currentTimeMillis() + ".test");
f.createNewFile();
FileOutputStream fos = new FileOutputStream(f);
fos.getChannel().lock();
} catch (IOException e) {
e.printStackTrace();
}
}

Test result:
java.io.IOException: No locks available
at sun.nio.ch.FileChannelImpl.lock0(Native Method)
at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:845)
at java.nio.channels.FileChannel.lock(FileChannel.java:860)
at Test.main(Test.java:21)

Linux 2.4.21-15.0.4.ELhugemem #1 SMP Sat Jul 31 01:16:24 EDT 2004 i686 athlon i386 GNU/Linux

java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) Server VM (build 1.6.0_02-b05, mixed mode)

redacted df -T .
Filesystem Type
nfs:/export/home/c nfs

I tried using the je.log.useODSYNC property, but that didn't seem to do anything useful wrt being able to run this on NFS.

I can guarantee that my process is the only process accessing the je files (and at any rate my prod deployment won't be on NFS), so I'd really like for the system to be able to start up with me knowing it's not as rock solid as it could be. Any other suggestions?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 22 2008
Added on Mar 25 2008
6 comments
6,703 views