无法在存储库关闭的情况下进行认证

如果一个或多个配置的存储库关闭,将无法向 WebSphere Application Server 进行认证或停止 WebSphere Application Server。

问题

可能发生了以下异常或类似异常,这表示无法建立与后端存储库的连接:

CWWIM4520E The 'javax.naming.CommunicationException:                      
Extdomain1.altext.ibm.com:389 [Root exception is java.net.ConnectException: Connection refused: connect]' 
naming exception occurred during processing.  
at  com.ibm.ws.wim.adapter.ldap.LdapConnection.reCreateDirContext(LdapConnection.java:613)  
at com.ibm.ws.wim.adapter.ldap.LdapConnection.search(LdapConnection.java:2419)

解决方案

确保后端存储库正在运行,并且能够连接到该存储库。如果配置了多个存储库,那么所有配置的存储库都应已启动并在正常运行。

如果问题依然存在,那么原因在于 virtual member manager 的安全性功能。如果一个或多个配置的存储库关闭,那么您将无法登录(即便以管理员身份)或停止 WebSphere Application Server,而与存储您的特定标识的存储库无关。Virtual member manager 在认证前总是会检查所有存储库。

要禁用此安全性功能,请使用 createIdMgrRealmupdateIdMgrRealm wsadmin 命令将 –allowOperationIfReposDown 参数设置为 trueallowOperationIfReposDown 参数的缺省值是 false。禁用此安全性功能后,即便其中一个配置的存储库关闭,virtual member manager 也仍可以使用其他活动存储库。只要您的登录用户标识和密码位于处于活动状态的存储库中,您就可以成功登录。

如果将 allowOperationIfReposDown 参数的值设置为 true,会有以下预期行为:

启动 WebSphere Application Server
服务器正在启动时,无法应用 allowOperationIfReposDown 参数。使用脱机存储库的服务器是否可以成功启动完全取决于存储库类型。LDAP 存储库不需要启动 LDAP 服务器就可成功启动该服务器。根据上下文池设置,LDAP 存储库甚至可能无法在第一次请求读取用户的概要文件之前,尝试与 LDAP 服务器进行通信。在服务器启动期间,WebSphere Application Server 会查找管理员的概要文件。如果 LDAP 服务器处于脱机状态,那么可能会遇到延迟。如果存储库处于脱机状态,那么其他存储库类型(包括定制)可能会使服务器启动失败。此行为完全取决于存储库类型。
登录到 WebSphere Application Server
登录到 WebSphere Application Server 时,会应用 allowOperationIfReposDown 参数。WebSphere Application Server 成功启动后,即便一个或多个存储库转为关闭,但只要您的用户标识位于其中一个活动存储库中,您就可以登录并执行任何操作,包括停止服务器。
停止 WebSphere Application Server
当要使用 wasadmin -userid -password 关闭服务器时,会应用 allowOperationIfReposDown 参数。有关登录期间的行为,请参阅上一个子标题“登录到 WebSphere Application Server”。

有关 allowOperationIfReposDown 参数以及 createIdMgrRealmupdateIdMgrRealm wsadmin 命令的更多信息,请参阅 WebSphere Application Server 信息中心中的 AdminTask 对象的 IdMgrRealmConfig 命令组。(如果使用的是 WebSphere Application Server V6.1,那么要禁用此安全性功能,请首先应用 PK78677 补丁或安装 WebSphere Application Server FP 6.1.0.23 或更高版本,然后再相应更改配置。)



使用条款 | 反馈