刚新建Weblogic域,使用./startWebLogic.sh启动,报以下错误
<Nov 6, 2021 12:23:54 AM CST> <Critical> <Security> <BEA-090403> <Authentication for user denied> <Nov 6, 2021 12:23:54 AM CST> <Critical> <WebLogicServer> <BEA-000386> <Server subsystem failed. Reason: weblogic.security.SecurityInitializationException: Authentication for user denied weblogic.security.SecurityInitializationException: Authentication for user denied at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.doBootAuthorization(CommonSecurityServiceManagerDelegateImpl.java:966) at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.initialize(CommonSecurityServiceManagerDelegateImpl.java:1054) at weblogic.security.service.SecurityServiceManager.initialize(SecurityServiceManager.java:873) at weblogic.security.SecurityService.start(SecurityService.java:141) at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64) Truncated. see log file for complete stacktrace Caused By: javax.security.auth.login.FailedLoginException: [Security:090304]Authentication Failed: User javax.security.auth.login.LoginException: [Security:090301]Password Not Supplied at weblogic.security.providers.authentication.LDAPAtnLoginModuleImpl.login(LDAPAtnLoginModuleImpl.java:261) at com.bea.common.security.internal.service.LoginModuleWrapper$1.run(LoginModuleWrapper.java:110) at java.security.AccessController.doPrivileged(Native Method) at com.bea.common.security.internal.service.LoginModuleWrapper.login(LoginModuleWrapper.java:106) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Truncated. see log file for complete stacktrace > <Nov 6, 2021 12:23:54 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED> <Nov 6, 2021 12:23:54 AM CST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down> <Nov 6, 2021 12:23:54 AM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
解决方案有两个:
(一)配置bin/startWebLogic.sh
添加以下内容
WLS_USER="weblogic" export WLS_USER WLS_PW="weblogic11g" export WLS_PW
(二)配置boot.properties(推荐)
文件路径为域目录下servers/AdminServer/security/boot.properties,其中security需要手动创建。
使用这种方法的好处是,weblogic账密在weblogic启动后会自动加密
[weblogic@localhost TESTDomain]$ cat servers/AdminServer/security/boot.properties #Sat Nov 06 00:27:02 CST 2021 password={AES}8ulsmo8OodtKBaw58TflIUCKd1P12LkSmcbsidrSIJc\= username={AES}TnveVGFFsoBVosuDp3OdZwAxtmsEM/64Z2/0KhPhEZU\= [weblogic@localhost ETSDomain]$
现在新建的域应该就能正常启动了。