weblogic启动失败案例(root启动引起的权限问题)

时间:2021-05-17 15:51:27

weblogic的一个domain启动失败,在日志中有如下信息提示:

***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://[hostname]:[port]/console    *
***************************************************
<Mar 15, 2012 5:26:13 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R26.3.0-32_CR283061-63465-1.4.2_10-20060620-1808-linux-ia32 from BEA Systems, Inc.>
<Mar 15, 2012 5:26:13 PM CST> <Info> <Configuration Management> <BEA-150016> <This server is being started as the administration server.>
<Mar 15, 2012 5:26:13 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 8.1 SP6  Wed Jun 21 08:18:55 PDT 2006 781680
WebLogic XMLX Module 8.1 SP6  Wed Jun 21 08:18:55 PDT 2006 781680 >
<Mar 15, 2012 5:26:13 PM CST> <Notice> <Management> <BEA-140005> <Loading domain configuration from configuration repository at /app/bea/user_projects/domains/snwssb_glpt/./config.xml.>
<Mar 15, 2012 5:26:15 PM CST> <Notice> <Log Management> <BEA-170019> <The server log file /app/bea/user_projects/domains/snwssb_glpt/sn_wssb_glpt/sn_wssb_glpt.log is opened. All server side log events will be written to this file.>
Error creating logFile: ./sn_wssb_glpt/ldap/log/EmbeddedLDAP.log (Permission denied)
<Mar 15, 2012 5:26:15 PM CST> <Error> <EmbeddedLDAP> <000000> <Error opening the Transaction Log: ./sn_wssb_glpt/ldap/ldapfiles/EmbeddedLDAP.tran (Permission denied)>
<Mar 15, 2012 5:26:15 PM CST> <Error> <EmbeddedLDAP> <000000> <Error Instantiating 'dc=snwssb_glpt': null>
<Mar 15, 2012 5:26:15 PM CST> <Critical> <EmbeddedLDAP> <BEA-171522> <An error occurred while initializing the Embedded LDAP Server. The exception thown is java.lang.ClassCastException: com.octetstring.vde.backend.BackendRoot. This may indicate a problem with the data files for the Embedded LDAP Server. If the problem is with the data files and it can not be corrected, backups of previous versions of the data files exist in ./sn_wssb_glpt/ldap/backup.>
<Mar 15, 2012 5:26:15 PM CST> <Critical> <WebLogicServer> <BEA-000364> <Server failed during initialization. Exception:weblogic.server.ServiceFailureException: Error initializing Embedded LDAP Server - with nested exception:
[java.lang.ClassCastException: com.octetstring.vde.backend.BackendRoot]
java.lang.ClassCastException: com.octetstring.vde.backend.BackendRoot
 at weblogic.ldap.EmbeddedLDAP.initialize(EmbeddedLDAP.java:273)
 at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:815)
 at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:669)
 at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:343)
 at weblogic.Server.main(Server.java:32)
--------------- nested within: ------------------
weblogic.server.ServiceFailureException: Error initializing Embedded LDAP Server - with nested exception:
[java.lang.ClassCastException: com.octetstring.vde.backend.BackendRoot]
 at weblogic.ldap.EmbeddedLDAP.initialize(EmbeddedLDAP.java:283)
 at weblogic.t3.srvr.T3Srvr.initializeHere(T3Srvr.java:815)
 at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:669)
 at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:343)
 at weblogic.Server.main(Server.java:32)
>
<Mar 15, 2012 5:26:15 PM CST> <Emergency> <WebLogicServer> <BEA-000342> <Unable to initialize the server: weblogic.server.ServiceFailureException: Error initializing Embedded LDAP Server - with nested exception:
[java.lang.ClassCastException: com.octetstring.vde.backend.BackendRoot]>
***************************************************************************
The WebLogic Server did not start up properly.
Exception raised: 'weblogic.server.ServiceFailureException: Error initializing Embedded LDAP Server - with nested exception:
[java.lang.ClassCastException: com.octetstring.vde.backend.BackendRoot]'
Reason: weblogic.server.ServiceFailureException: Error initializing Embedded LDAP Server - with nested exception:
[java.lang.ClassCastException: com.octetstring.vde.backend.BackendRoot]
***************************************************************************

在用root用户启动weblogic的时候会在所在域里产生root权限的文件,或者用root权限的文件覆盖了部分原来存在的weblogic用户所属文件,当再次切换到weblogic用户后,启动的时候就会出现权限问题,所以报告上面的错误。这个错误就是因为EmbeddedLDAP.tran文件的权限变成了root的。

解决方法:

用root用户登录,将EmbeddedLDAP.log赋权给weblogic用户。但是还有一系列的log文件需要赋权。索性把domains下的所有应用全部赋权。

[root@mnhj02 ~]# chown -R weblogic:weblogic domains_dir

前一个weblogic是用户,后一个weblogic是用户所属组,domains_dir是文件所在的路径。