Nexus Repository 2 makes use of the Java preference store. This is located in $USER_HOME/.java/.userPrefs
on Linux systems, and the preference store requires that this location supports file locks.
To fix this problem, either enable file locking on the volume which contains the home directory of the user running Nexus Repository 2 or override the preference store location to point to a volume that has file locking. To do the latter, edit $NEXUS_HOME/bin/jsw/conf/wrapper.conf.
Look for lines like this:
wrapper.java.additional.1=-XX:MaxPermSize=192m wrapper.java.additional.2=-Djava.net.preferIPv4Stack=true wrapper.java.additional.3=-Dcom.sun.jndi.ldap.connect.pool.protocol="plain ssl" wrapper.java.additional.3.stripquotes=TRUE
Add a new line below them like this:
wrapper.java.additional.4=-Djava.util.prefs.userRoot=<path-to-directory-location-where-prefs-should-be-stored>
Be sure to set the sequence number (shown here as "4") to the next unused sequence number in the wrapper.java.additional list.