More NFS file locking and Connections

So I posted a blog NFS file locking and it’s affect on Connections not long ago so when I came across a similar problem with my lab deployment of Connections 3.0.1 on CentOS I thought it would be easy to sort out…..

I was seeing the following exception in the systemOut.log:

[7/9/12 22:27:51:172 BST] 00000022 SystemOut     O java.lang.reflect.InvocationTargetException
[7/9/12 22:27:51:173 BST] 00000022 SystemOut     O      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[7/9/12 22:27:51:173 BST] 00000022 SystemOut     O      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
[7/9/12 22:27:51:174 BST] 00000022 SystemOut     O      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
[7/9/12 22:27:51:174 BST] 00000022 SystemOut     O      at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
[7/9/12 22:27:51:175 BST] 00000022 SystemOut     O      at com.ibm.ws.objectManager.utils.Utils.getImpl(Utils.java:44)
[7/9/12 22:27:51:175 BST] 00000022 SystemOut     O      at com.ibm.ws.objectManager.utils.FileLock.getFileLock(FileLock.java:41)
[7/9/12 22:27:51:176 BST] 00000022 SystemOut     O      at com.ibm.ws.objectManager.ObjectManagerState.<init>(ObjectManagerState.java:408)
[7/9/12 22:27:51:176 BST] 00000022 SystemOut     O      at com.ibm.ws.objectManager.ObjectManager.createObjectManagerState(ObjectManager.java:293)
[7/9/12 22:27:51:176 BST] 00000022 SystemOut     O      at com.ibm.ws.objectManager.ObjectManager.initialise(ObjectManager.java:237)
[7/9/12 22:27:51:177 BST] 00000022 SystemOut     O      at com.ibm.ws.objectManager.ObjectManager.<init>(ObjectManager.java:197)
[7/9/12 22:27:51:177 BST] 00000022 SystemOut     O      at com.ibm.ws.sib.msgstore.persistence.objectManager.PersistentMessageStoreImpl.start(PersistentMessageStoreImpl.java:354)
[7/9/12 22:27:51:178 BST] 00000022 SystemOut     O      at com.ibm.ws.sib.msgstore.impl.MessageStoreImpl.start(MessageStoreImpl.java:1518)
[7/9/12 22:27:51:178 BST] 00000022 SystemOut     O      at com.ibm.ws.sib.admin.impl.JsMessagingEngineImpl.start(JsMessagingEngineImpl.java:609)
[7/9/12 22:27:51:178 BST] 00000022 SystemOut     O      at com.ibm.ws.sib.admin.impl.HAManagerMessagingEngineImpl.activate(HAManagerMessagingEngineImpl.java:995)
[7/9/12 22:27:51:179 BST] 00000022 SystemOut     O      at com.ibm.ws.sib.admin.impl.JsActivationThread.run(JsActivationThread.java:92)
[7/9/12 22:27:51:179 BST] 00000022 SystemOut     O Caused by: java.io.IOException: No locks available
[7/9/12 22:27:51:180 BST] 00000022 SystemOut     O      at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:914)
[7/9/12 22:27:51:180 BST] 00000022 SystemOut     O      at java.nio.channels.FileChannel.tryLock(FileChannel.java:973)
[7/9/12 22:27:51:181 BST] 00000022 SystemOut     O      at com.ibm.ws.objectManager.utils.FileLockImpl.<init>(FileLockImpl.java:58)
[7/9/12 22:27:51:181 BST] 00000022 SystemOut     O      … 15 more

I tried the steps in my previous blog to no avail. I also edited /etc/fstab on the client appending “lock” as follows.

xxx.xxx.x.xx:/opt/IBM/LotusConnections/shared /opt/IBM/LotusConnections/data/shared nfs rw,lock,hard,intr 0 0

I re-read some CentOS documentation picking up on the following:

“nfslock also has to be started for both the NFS client and server to function properly. To start NFS locking as root type: /sbin/service nfslock start. If NFS is set to start at boot, please ensure that nfslock also starts by running chkconfig –list nfslock. If nfslock is not set to on, this implies that you will need to manually run the /sbin/service nfslock start each time the computer starts. To set nfslock to automatically start on boot, type the following command in a terminal chkconfig nfslock on. ”

After enabling nfslock on the two clients and the server as well as setting it to start at boot I was up and running again. Odd thing was that this was running fine up until a prolonged shut down of my servers.

Advertisements