WARNING: Could not lock System prefs.Unix error code 0.

Document ID : KB000008708
Last Modified Date : 14/02/2018
Show Technical Document Details
Issue:

While trying to install the Release Automation Agent on AIX it returns the following error messages:

Nov, 16, 2017 2:56:18 PM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode

WARNING: Could not lock System prefs.Unix error code 0.

Nov, 16, 2017 2:56:18 PM java.util.prefs.FileSystemPreferences syncWorld

WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.

 

The terminal would still give its normal prompts for the installer with these types of messages periodically showing up. 

Environment:
Release Automation Agent 6.3
Cause:

The cause is related to a files in a directory (a $HOME/.java/.userPrefs) that seem to be conflicting with files that are trying to be used during the installation. 

Resolution:

These steps were used to successfully install the agent without these messages appearing:

  1. mkdir -p $HOME/.java2/.systemPrefs
  2. mkdir -p $HOME/.java2/.userPrefs 
  3. chmod -R 755 ~/.java2
  4. export JAVA_OPTS="-Djava.util.prefs.systemRoot=$HOME/.java2 -Djava.util.prefs.userRoot=$HOME/.java2/.userPrefs"
  5. export _JAVA_OPTS="-Djava.util.prefs.systemRoot=$HOME/.java2 -Djava.util.prefs.userRoot=$HOME/.java2/.userPrefs"
  6. export INSTALL4J_ADD_VM_PARAMS="-Djava.util.prefs.systemRoot=$HOME/.java2 -Djava.util.prefs.userRoot=$HOME/.java2/.userPrefs"
  7. ./nolio_agent_aix_6_3_0_b9622.sh

Note: $HOME was used exactly as is in steps 1 and 2. In steps 4-6 we replaced $HOME with the absolute directory path that $HOME evaluates to. Ex: /home/myusername