WSO2 Governance Registry锁定错误 [英] WSO2 Governance Registry lock error
问题描述
安装WSO2 Governance Registry并启动后,我在 wso2carbon.log
中收到以下错误:
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}
这些错误每30秒重复一次。不幸的是,日志没有指定它试图锁定的文件。
These errors get repeated every 30s. Unfortunately the log does not specify which file it's trying to lock.
我尝试使用查找/ opt / wso2 -type f -exec lsof {} \查找文件系统上的所有文件,并使用独占锁定; | grep W
但我找不到任何东西。此外,我尝试了解WSO2 GR源代码,但没有找到对此错误的引用。 WSO2 Jira报告了一个错误( https://wso2.org/jira/browse/REGISTRY -1863 ),但这也没有帮助。
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?
推荐答案
我们发现这是Java安装手册中的一个错误。似乎JVM需要对 /etc/.java/.systemPrefs
目录的写访问权限,当以非root用户身份运行时,它无法访问该目录,请参阅: http://bugs.java.com/view_bug.do?bug_id=4838770
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
我通过将 /etc/.java/.systemPrefs
目录的所有权更改为来解决了这个问题wso2:wso2
使用
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
该文件仍可由root写入(因为root可以写入任何文件),但如果你需要多个用户才能写入此文件,您可以使用以下方式设置文件ACL:
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
这篇关于WSO2 Governance Registry锁定错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!