Reputation: 151
[date time, 804] [Iot - Core] WARN - FileSystemPreferences Could not lock System prefs. Unix error code 0.
[date time, 805] [Iot - Core] WARN - FileSystemPreferences Couldn't Flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
Upvotes: 4
Views: 1844
Reputation: 43
It seems that the /etc/.java/.systemPrefs/ and /etc/.java/ directories do not exist on your system, which may be the cause of the error you are experiencing. These directories may not be created automatically and you may have to create them manually.
You can try creating the directories and then changing the permissions and owner. Here are the commands to do this:
sudo mkdir -p /etc/.java/.systemPrefs sudo mkdir -p /etc/.java sudo chown -R user:user /etc/.java/.systemPrefs sudo chown -R user:user /etc/.java sudo chmod -R 755 /etc/.java/.systemPrefs sudo chmod -R 755 /etc/.java
Upvotes: 0
Reputation: 7
I was getting the same message under the same interval, and this fixed it i guess you need full priveliege to write execute and open on that folder.
chmod 777 /etc/.java/.systemPrefs/
chmod 777 /etc/.java/
Upvotes: 0
Reputation: 2254
This is a JVM related issue. JVM needs write access to the /etc/.java/.systemPrefs directory, which it cannot access when run as a non-root user, see: http://bugs.java.com/view_bug.do?bug_id=4838770
Try changing ownership of the /etc/.java/.systemPrefs directory to the current user [eg. wso2:wso2] using
sudo chown -R wso2:wso2 /etc/.java/.systemPrefs
The file will still be writable by root (as root can write to any file), but if you need multiple users to be able to write to this file you might set up a file ACL as well using:
sudo setfacl -R -m u:wso2:rw /etc/.java/.systemPrefs
Copied from here
Upvotes: 5