简体   繁体   English

Java运行时异常:无法创建锁管理器

[英]Java Runtime Exception: Unable to create lock manager

Hello when I run a script as root on unix shell it works, for example: 你好,当我在Unix shell上以root用户身份运行脚本时,它可以工作,例如:

sh -x /opt/auto/wso2is/bin/wso2server.sh 

However when I run it as a non root user I get the following error: 但是,当我以非root用户身份运行它时,出现以下错误:

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.wso2.carbon.bootstrap.Bootstrap.loadClass(Bootstrap.java:63)
    at org.wso2.carbon.bootstrap.Bootstrap.main(Bootstrap.java:45)
Caused by: java.lang.RuntimeException: Unable to create lock manager.
    at org.wso2.carbon.server.CarbonLauncher.launch(CarbonLauncher.java:115)
    at org.wso2.carbon.server.Main.launchCarbon(Main.java:163)
    at org.wso2.carbon.server.Main.main(Main.java:95)
    ... 6 more

What is causing this? 是什么原因造成的?

I have the following environment variables declared: 我声明了以下环境变量:

JRE_HOME=/usr/java/jre1.7.0_51 

PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/kde3/bin:/usr/lib/java/jre/bin:/usr/local/bin

JAVA_BINDIR=/usr/java/jdk1.7.0_51/bin

JAVA_HOME=/usr/java/jdk1.7.0_51

JDK_HOME=/usr/java/jdk1.7.0_51 

JAVA_ROOT=/usr/java/jdk1.7.0_51

According to http://www-01.ibm.com/support/docview.wss?uid=swg21600112 , I don't have correct permissions for a folder but how am I meant to know which one? 根据http://www-01.ibm.com/support/docview.wss?uid=swg21600112 ,我没有文件夹的正确权限,但是我想知道哪个文件夹?

I found a workaround that might be able to give you a hint on what are the files have been changed on the permission due to previous startup using root user account. 我发现了一个变通办法,它可能会提示您由于先前使用root用户帐户启动而导致权限更改了哪些文件。

You may do a du -skh /opt/auto/ using a non-root user account. 您可以使用非root用户帐户执行du -skh /opt/auto/ You will get permission denied when it attempt to check on the files/folders that is belongs to the root user. 尝试检查属于根用户的文件/文件夹时,您将获得拒绝权限。 Then you should execute chown -R "<non-root-user>:<non-root-user> <file/folder> on those file/folder. 然后,应在这些文件/文件夹上执行chown -R "<non-root-user>:<non-root-user> <file/folder>

Once you have changed the ownership of the files/folder, please try to start it up again (by executing /opt/auto/wso2is/bin/wso2server.sh). 更改文件/文件夹的所有权后,请尝试再次启动它(通过执行/opt/auto/wso2is/bin/wso2server.sh)。 You should be able to get wso2carbon log printed. 您应该能够打印出wso2carbon日志。 Study the log again and make further amendment on the file/folders which still having permission error. 再次研究日志,并对仍然存在权限错误的文件/文件夹进行进一步的修改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM