WSO2 Governance Registry lock error

一笑奈何 提交于 2019-12-01 23:30:58

问题


After installation of WSO2 Governance Registry and starting it I get the following errors in wso2carbon.log:

TID: [0] [Greg] [2014-01-08 10:39:08,625]  WARN {java.util.prefs.FileSystemPreferences} -  Could not lock System prefs.Unix error code 0. {java.util.prefs.FileSystemPreferences}
TID: [0] [Greg] [2014-01-08 10:39:08,625]  WARN {java.util.prefs.FileSystemPreferences} -  Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock. {java.util.prefs.FileSystemPreferences}

These errors get repeated every 30s. Unfortunately the log does not specify which file it's trying to lock.

I tried finding all files on the filesystem with exclusive locks on them using find /opt/wso2 -type f -exec lsof {} \; | grep W but I couldn't find any. Also I tried grepping through the WSO2 GR source code, but no where I could find a reference to this error. There is a bug reported on the WSO2 Jira (https://wso2.org/jira/browse/REGISTRY-1863), but that wasn't helpful either.

Can anyone point me in the right direction or give any clues as to where to get more information?


回答1:


We found that this is a bug in the Java installation manual. It seems the 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

I solved this problem by changing ownership of the /etc/.java/.systemPrefs directory to 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



回答2:


Or see the following link:

https://groups.google.com/forum/#!topic/xnat_discussion/uOd-YyuBhCQ

and set up the files with root user just once...



来源:https://stackoverflow.com/questions/21000145/wso2-governance-registry-lock-error

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!