I’ve been running gradle 2.10 happily for a couple of months, working on a Oracle Linux 6u5 VM administered by IT. Last night everything was working fine and I was doing “gradle build” etc. as myself (my user is not root). This morning, I can’t even run “gradle --version” as it comes up with the error below. However I am able to run as root user by doing “sudo gradle --version”.
I am assuming some administrative change has been made that affects my user, but I would like some pointers as I have no idea what to look for.
$ gradle --version
Exception is:
net.rubygrapefruit.platform.NativeException: Failed to load native library ‘libnative-platform.so’ for Linux amd64.
at net.rubygrapefruit.platform.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:49)
…
Caused by: java.io.IOException: No locks available
at sun.nio.ch.FileDispatcherImpl.lock0(Native Method)
…
The original problem - no locks available - was finally resolved by dropping the .gradle directory and letting gradle recreate it. I wonder if the “No locks available” message was related to there being too many locks taken out within .gradle and not released? It does look more like it was a gradle problem than an NFS issue (NFS v3).
Edit: This was a short-lived “final” resolution as the problem resurfaced. Support have since discovered some major problems with the filer that my home directory is stored on. Looks to be a file system issue as you originally suggested.
Updated my last post with an edit - the problem resurfaced and on further investigation support found there is an underlying issue with the filer. Thanks for your replies on this.