管理和管理控制台故障诊断
- 应用程序服务器(如 server1)进程
- WebSphere Application Server Network Deployment 产品中的 Deployment Manager 进程
此进程必须在运行以便使用管理控制台。wsadmin 命令行实用程序具有一个本地方式,可使用它执行某些管理功能(即使服务器进程不在运行)。
控制台视图中的服务器状态和消息不是最新的
- 在管理控制台面板的“服务器”视图的状态列中,服务器的状态未刷新。
- 管理控制台中的服务器消息未更新。
- 因为大量端口被创建并且处于 TIME_WAIT 状态,所以系统资源减少。
该问题是由于 SOAP 连接器不支持连接池造成的。如果应用程序服务器有多个进行中的操作在使用 SOAP 连接器,那么应用程序服务器会迅速打开并关闭多个端口。由于底层 TCP/IP 协议的特性,这些端口将在一段时间内保持处于 TIME_WAIT 状态,然后操作系统才能对它们进行回收。WebSphere Application Server 打开的端口数可以超过操作系统实施的端口数限制。在此情况下,通过 SOAP 连接器继续打开端口将会失败,直到操作系统回收端口。
- 提高操作系统对端口数的限制。
- 对于 Rational® Application Developer、wsadmin 实用程序或使用 Java™ 管理扩展 (JMX) 连接器的 Java 应用程序,切换到远程方法调用 (RMI) 连接器。
- 通过 Rational Application Developer 或管理控制台执行新操作前,请等待直到少数或没有端口处于 TIME_WAIT 状态。
基于角色的授权失败
SECJ0305I:
在对资源服务器和模块服务器调用方法 getNodeName 时,针对以下的基于角色的授权检查失败:securityname server.domain.name:3890/user.id,
accessId user:server.domain.name:3890/uid=user.id,ou=xxxx,dc=yyy,dc=zzz。
如果不能对应用程序的调用者指定其中一个管理角色,那么应用程序可以调用者的名义使用其中一个角色进行登录。例如: try
{
// Create a LoginContext to authenticate a user ID and password.
javax.security.auth.login.LoginContext
lc = new javax.security.auth.login.LoginContext(“WSLogin”,
new com.ibm.websphere.security.auth.callback.WSCallbackHandlerImpl(“adminuser”,
“adminpassword”));
// perform the login
lc.login();
// Get the authenticated subject.
javax.security.auth.Subject adminSubject = lc.getSubject();
// Define the action that will take place using the authenticated Subject
// You can define this action anywhere in the code, the action
// is reference in the WSSubject.doAs that follows.
java.security.PrivilegedAction adminAction = new java.security.PrivilegedAction()
{
public Object run()
{
try
{
// Get the WebSphere AdminService.
AdminService adminservice = AdminServiceFactory.getAdminService();
// Get the WebSphere Admin Local Server MBean instance.
ObjectName objectname = adminservice.getLocalServer();
// Get the Node name.
String nodeName = (String)adminservice.getAttribute(objectname, “nodeName”);
// Get the Application Server name.
String serverName = (String)adminservice.getAttribute(objectname, “name”);
// Get the Application Server Process ID.
String serverPid = (String)adminservice.getAttribute(objectname, “pid”);
// Return a result, for this example, just return the serverPid.
return serverPid;
}
catch (Exception e)
{
e.printStackTrace();
}
return null;
}
});
// Invoke an AdminClient resource using the authenticated subject.
// This example demonstrates the action of creating an
// administrative client and returning a String value to use outside
// the doAs block.
String myData = (String)
com.ibm.websphere.security.auth.WSSubject.doAs(adminSubject, adminAction);
// use “myData” later on....
}
catch (javax.security.auth.login.LoginException e)
{
e.printStackTrace();
}
使用 wsadmin 交互式脚本编制会话启动或停止服务器时,您将接收到指示读取超时的异常
WASX7015E: 运行以下命令时发生异常:$AdminControl startServer server1 Node1;
异常信息:com.ibm.websphere.management.exception.ConnectorException
org.apache.soap.SOAPException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Read
timed out; targetException=java.net.SocketTimeoutException: 读取超时]
发生此异常的原因是超时值太小。增大 soap.client.props 文件中的 com.ibm.SOAP.requestTimeout 属性所指定的超时值,对于单服务器版,该文件位于
profile_root/properties 目录中;对于 Network Deployment 安装,该文件位于 profile_root/properties 目录中。您选择的值取决于很多因素,如服务器上安装的应用程序的大小和数量,机器的处理速度,以及机器的使用级别。com.ibm.SOAP.requestTimeout
属性的缺省值为 180 秒。
发生此异常的原因是超时值太小。要解决此问题,请增大 soap.client.props 文件中 com.ibm.SOAP.requestTimeout 属性指定的超时值。对于单服务器版,此文件位于 profile_root/properties 目录中;对于 Network Deployment 安装,该文件位于 profile_root/properties 目录中。
您应选择的值取决于很多因素,如服务器上安装的应用程序的大小和数量,您机器的速度,以及您机器的使用级别。com.ibm.SOAP.requestTimeout
属性的缺省值为 180 秒。
启动或使用管理控制台或 wsadmin 实用程序时出现问题
- 对于应用程序服务器进程,请参阅以下文件:
profile_root/logs/server_name/startServer.log,以获取指示服务器已成功启动的消息:ADMU3000I: 服务器 server1 已打开,可运行电子商务;进程标识为 nnnn。
profile_root/logs/server_name/startServer.log,以获取指示服务器已成功启动的消息:ADMU3000I: 服务器 server1 已打开,可运行电子商务;进程标识为 nnnn。
profile_root/logs/server_name/SystemOut.log
profile_root/logs/server_name/SystemOut.log
服务器日志文件,以获取指示服务器已成功启动的消息:WSVR0001I: 服务器 server 已打开,可运行电子商务。
- 对于 WebSphere Application Server Network Deployment 产品,请参阅以下文件:
profile_root/logs/dmgr/startServer.log,以获取指示服务器已成功启动的消息:ADMU3000I: 服务器 dmgr 已打开,可运行电子商务;进程标识为 nnnn。
profile_root/logs/dmgr/startServer.log,以获取指示服务器已成功启动的消息:ADMU3000I: 服务器 dmgr 已打开,可运行电子商务;进程标识为 nnnn。
profile_root/logs/dmgr/SystemOut.log,以获取指示服务器已成功启动的消息:ADMU3000I: 服务器 dmgr 已打开,可运行电子商务;进程标识为 。
profile_root/logs/dmgr/SystemOut.log,以获取指示服务器已成功启动的消息:ADMU3000I: 服务器 dmgr 已打开,可运行电子商务;进程标识为 。
服务器日志文件,以获取指示服务器已成功启动的消息:WSVR0001I: 服务器 dmgr 已打开,可运行电子商务。
对于 z/OS 产品,检查作业输出。
- 查找消息参考表中的这些文件中的任何错误消息。 在信息中心导航中选择参考视图,然后单击消息。当尝试启动 wsadmin 时,类似 WASX7213I:此脚本客户机未连接到服务器进程的消息指示服务器进程未在运行,不能访问运行该进程的主机,或者 wsadmin 实用程序使用的端口或服务器名不正确。
- 验证是否在使用正确的端口号与管理控制台或 wsadmin 服务器进行通信:
查看 SystemOut.log 文件。
查看 joblogs 文件。
- ADMC0013I: SOAP 连接器在端口 nnnn 上可用这一行内容指示服务器正在用于侦听 wsadmin 功能的端口。
profile_root/properties/wsadmin.properties 文件中的 com.ibm.ws.scripting.port 属性控制 wsadmin 实用程序用于向服务器发送请求的端口。
profile_root/properties/wsadmin.properties 文件中的 com.ibm.ws.scripting.port 属性控制 wsadmin 实用程序用于向服务器发送请求的端口。
如果端口值不同于 SystemOut.log 文件中显示的值,那么更改 wsadmin.properties 文件中的端口号,或者在启动 wsadmin 实用程序时通过在命令行上使用 -port port_number 属性来指定正确的端口号。
profile_root/properties/wsadmin.properties 文件中的 com.ibm.ws.scripting.port 属性控制 wsadmin 实用程序用于向服务器发送请求的端口。
如果端口值不同于 SystemOut.log 文件中显示的值,那么更改 wsadmin.properties 文件中的端口号,或者在启动 wsadmin 实用程序时通过在命令行上使用 -port port_number 属性来指定正确的端口号。
profile_root/properties/wsadmin.properties 文件中的 com.ibm.ws.scripting.port 属性控制 wsadmin 实用程序用于向服务器发送请求的端口。
如果端口值不同于服务器日志文件中显示的值,那么更改 wsadmin.properties 文件中的端口号,或者在启动 wsadmin 实用程序时通过在命令行上使用 -port port_number 属性来指定正确的端口号。
消息 SRVE0171I:传输 http 正在侦听端口 nnnn(缺省 9060)表明服务器使用此端口侦听管理控制台请求。
- 如果端口值与管理控制台的 Web 地址中指定的值不同,请将浏览器中的 Web 地址更改为正确的值。缺省值是 http://localhost:9060/ibm/console。
- 使用 telnet 命令测试正在运行应用程序服务器或 Deployment Manager 的主机名可以从使用浏览器或 wsadmin 程序的系统实现。如果可对主机名执行 ping 操作,那么不会存在防火墙或连接问题。
- 如果正在运行应用程序服务器或 Deployment Manager 的主机对于正在运行客户机端浏览器或 wsadmin 命令的机器是远程的,那么确保相应的主机名参数是正确的。验证:
- 控制台的浏览器 Web 地址中的主机名。
- 用于将 wsadmin 实用程序引导至正确的服务器的 wsadmin 命令的 -host host name 选项。
WebSphere Application Server 技术支持可能会要求您跟踪管理组件以进行详细问题确定。此组件的跟踪规范是 com.ibm.websphere.management.*=all=enabled:com.ibm.ws.management.*=all=enabled"
无法使用 AdminConfig.parents 方法来获取某些配置类型的有效父类型
wsadmin>print AdminConfig.parents( "JavaVirtualMachine")
将返回以下参考消息:WASX7351I: 无法使用 parents 命令来查找类型“JavaVirtualMachine”的父类型
#---------------------------------------------------------------------
# Name: parentTypes()
# Role: To search for configuration types that may contain objects of
# the specified type should the result of calling
# AdminConfig.parents( Type )
# be:
# WASX7351I: The parents command cannot be used to find the parents of type ...
# Note: Unlike the AdminConfig.list() command, this routine will not
# raise an InvalidConfigDataTypeException for an unknow datatype
#---------------------------------------------------------------------
def parentTypes( Type ) :
import os
WSAStypes = AdminConfig.types().splitlines()
if Type in WSAStypes :
result = AdminConfig.parents( Type )
if result.startswith( 'WASX7351I' ) :
result = []
for thisType in WSAStypes :
if AdminConfig.attributes( thisType ).find( Type ) > -1 :
result.append( thisType )
result = (os.linesep).join( result )
else :
print 'parentTypes error: unknown / unrecognized type:', Type
result = None
return result
如果这些步骤不能解决问题,请查看您的特定问题是否在安装完成但管理控制台未启动主题中提到。使用诊断和修正问题:学习资源主题中的链接检查是否已标识和记录了此问题。如果没有看到与您的问题类似的问题,或所提供的信息未解决您的问题,请联系 IBM 技术支持以获取进一步的帮助。
如果这些步骤不能解决问题,请查看您的特定问题是否在安装完成但管理控制台未启动主题中提到。使用诊断和修正问题:学习资源主题中的链接检查是否已标识和记录了此问题。