Weblogic由于“身份验证被拒绝”而无法启动。

huangapple go评论63阅读模式
英文:

Weblogic doesn't start because of "Authentication denied"

问题

我不得不更改数据源配置以解决运行时错误(未指定连接字符串)。

错误信息:

无法部署 EJB:wps.jar 中的 MailService:
所选择的 EJB 'MailService(应用程序:my-application,EJB组件:wps.jar)' 的运行作为安全主体 'portaladmin' 在当前安全域中不是有效的用户主体。请为 EJB 指定一个有效的用户主体。

正如我在这里所读到的,我尝试停止托管服务器并清理这些文件夹。重新启动托管服务器,无论是使用脚本还是图形界面,都开始抛出以下错误:

weblogic.security.SecurityInitializationException:身份验证被拒绝:引导身份验证无效;引导身份文件(boot.properties)中的用户名和/或密码无效。自创建引导身份文件以来,引导身份可能已更改。请编辑并更新引导身份文件,使用正确的用户名和密码值。第一次使用更新后的引导身份文件启动服务器时,这些新值将被加密。

我开始寻找解决方案,每个人都说我需要删除 servers/MyServer/data/ldap 文件夹和 servers/MyServer/security/boot.properties 文件。但都没有用。甚至管理服务器也因相同的原因无法启动。与此不同,NodeManager 运行良好。

我已经尝试重置用户名和密码,如下所示:

cd $DOMAIN_HOME/bin
. ./setDomainEnv.sh
cd ../security
java weblogic.security.utils.AdminAccount 用户名 密码 .

尝试手动运行服务器并提示用户名和密码,但异常仍然存在。

还尝试回滚我之前所做的设置,尽管它与 WebLogic 用户无关... 但没有效果。

重要注意事项:

  • 我真的希望避免重新安装环境。
  • 我不能重启服务器。
  • 我需要那些 boot.properties,否则我无法在后台启动 WebLogic 进程。

非常感谢任何帮助。

英文:

I had to change a Data Source configuration to solve a Runtime error (connection string wasn't specified).

The error:

Unable to deploy EJB: MailService from wps.jar:
The run-as security principal, 'portaladmin', chosen for the EJB 'MailService(Application: my-application, EJBComponent: wps.jar)' is not a valid user principal in the current security realm. Please specify a valid user principal for the EJB to use.

As I've read here, I tried stopping the Managed server and cleaning those folders. On restarting the Managed, both using the script and the GUI, it started throwing me this error:

weblogic.security.SecurityInitializationException: Authentication denied: Boot identity not valid; The user name and/or password from the boot identity file (boot.properties) is not valid. The boot identity may have been changed since the boot identity file was created. Please edit and update the boot identity file with the proper values of username and password. The first time the updated boot identity file is used to start the server, these new values are encrypted

I started browsing for a solution, and everyone says I need to delete both the servers/MyServer/data/ldap folder and the servers/MyServer/security/boot.properties. None of this works. Also, even the AdminServer is not starting for the same reason. The NodeManager, instead, runs smoothly.

I already tried resetting the username and password, like so:

cd $DOMAIN_HOME/bin
. ./setDomainEnv.sh
cd ../security
java weblogic.security.utils.AdminAccount user password .

Tried running the server manually prompting user and password, but the exception persists.

Also tried rolling back the setting I made previously, even though it has nothing to do with WebLogic users.. but nothing.

Important notes:

  • I really would like to avoid freshly reinstalling the environment.<br>
  • I cannot reboot the server.
  • I need those boot.properties, either I'm not able to launch WebLogic processes in the background.

Any help is highly appreciated.

答案1

得分: 1

已解决。

看起来 WebLogic 在启动时尝试连接到每个数据源。在关闭托管之前,我确实修改了一个数据源,但是我错误地编写了连接字符串(尽管我是从另一个 WebLogic 服务器复制的):

实际上,我写错了的是:

jdbc:oracle:thin:@127.0.0.1:1521:XEPDB

而我实际应该写的是:

jdbc:oracle:thin:@127.0.0.1:1521/XEPDB

这导致 WebLogic 无法正确启动。

$DOMAIN_NAME/config/jdbc/my_datasource.xml 中修复了连接字符串,然后运行正常。

英文:

Solved.

Looks like WebLogic tries to connect to every DataSource on startup.
I did modify a DataSource before shutting down the Managed, but I wrote the connection string wrongly (even though I copied it from another WebLogic server):

Indeed, what I did write was:

jdbc:oracle:thin:@127.0.0.1:1521:XEPDB

What I had to write, instead, was:

jdbc:oracle:thin:@127.0.0.1:1521/XEPDB

This prevented WebLogic to start correctly.

Fixed the connection string in $DOMAIN_NAME/config/jdbc/my_datasource.xml and ran smoothly.

huangapple
  • 本文由 发表于 2023年7月17日 23:23:28
  • 转载请务必保留本文链接:https://go.coder-hub.com/76705957.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定