利用代理插件的问题常规诊断过程
问题描述
遇到诸如下列问题时按下文说明用几个附加参数配置 WebLogic Proxy 插件可生成诊断数据:
  • HTTP 请求的负载平衡不均
  • 频繁或意外的会话 Failover
  • HTTP 响应中的意外状态代码(比如 400、404、500、503 等等),无法从后端 WebLogic Server 确定其产生根源或原因。
快速链接
代理插件的配置
启用代理调试
      通过在代理配置文件中设置 Debug="ALL"启用代理调试。

启用代理桥接器
      在代理配置文件中设置DebugConfigInfo="ON"

有关这些配置参数的详细信息,请参考 General Parameters for Web Server Plug-Ins(Web 服务器插件的常规参数)。
上述两种设置都要求重新启动 Web 服务器。

iPlanet/SunOne 插件 (obj.conf) 的配置示例
<Object name="weblogic" ppath="*/mywebapp/*">
  Service fn=wl-proxy
  WebLogicCluster="sol1:8001,sol2:8001,sol3:8003" 
  Debug=ALL
  DebugConfigInfo=ON
  WLLogFile="/tmp/wlproxy.log" 
</Object>
有关配置的详细信息,请参考 Installing and Configuring the Netscape Enterprise Server Plug-In(安装和配置 Netscape Enterprise Server 插件)

Apache 插件 (httpd.conf) 的配置示例
<Location /mywebapp>
  SetHandlerweblogic-handler
  WebLogicCluster sol1:8001,sol2:8001,sol3:8003
  Debug ALL
  DebugConfigInfo ON
  WLLogFile /tmp/wlproxy.log
</Location>
有关配置的详细信息,请参考 Configuring the Apache HTTP Server Plug-In(配置 Apache HTTP Server 插件)

IIS 插件 (iisproxy.ini) 的配置示例
WebLogicCluster sol1:8001,sol2:8001,sol3:8003
  Debug ALL
  DebugConfigInfo ON
  WLLogFile C:\temp\wlproxy.log
有关配置的详细信息,请参考 Configuring the Apache HTTP Server Plug-In(配置 Apache HTTP Server 插件)

返回页首

分析代理日志文件
下面是插件处理一个请求(含会话 cookie)及其生成的日志信息的示例。在接收新请求和返回响应期间经历四个不同的阶段,它们用不同的颜色编码来显示。

接收 WebServer 发出的新请求,分析请求报头和会话 cookie(如果出现的话)
连接 WebLogic Server 节点并转发该请求
读取 WebLogic Server 节点的响应
将该响应写回客户端

Mon May 10 13:14:40 2004 =================== new request ===================
============

Mon May 10 13:14:40 2004 INFO: SSL is not configured
Mon May 10 13:14:40 2004 URI=[/mywebapp/session.jsp]
Mon May 10 13:14:40 2004 Parsing cookie JSESSIONID=Af48B06Xe6BvewE8yCNWKz62dsiu028ql
O9GvkS41bg3n53RbJ2Z!-2032354160!-457294087
Mon May 10 13:14:40 2004 getpreferredServersFromCookie: -2032354160!-457294087
Mon May 10 13:14:40 2004 GET Primary JVMID1: -2032354160
Mon May 10 13:14:40 2004 GET Secondary JVMID2: -457294087
Mon May 10 13:14:40 2004 [Found Primary]: 172.18.137.50:38625:65535
Mon May 10 13:14:40 2004 list[0].jvmid: -2032354160
Mon May 10 13:14:40 2004 secondary str: -457294087
Mon May 10 13:14:40 2004 list[1].jvmid: -457294087
Mon May 10 13:14:40 2004 secondary str: -457294087
Mon May 10 13:14:40 2004 [Found Secondary]: 172.18.137.54:38625:65535
Mon May 10 13:14:40 2004 Found 2 servers
Mon May 10 13:14:40 2004 Hdrs from Client:[host]=[slsol4:3862]
Mon May 10 13:14:40 2004 Hdrs from Client:[user-agent]=[Mozilla/5.0 (Windows; U;
 Windows NT 5.1; en-US; rv:1.6) Gecko/20040113]
Mon May 10 13:14:40 2004 Hdrs from Client:[accept]=[text/xml,application/xml,
application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,image/jpeg,
image/gif;q=0.2,*/*;q=0.1]
Mon May 10 13:14:40 2004 Hdrs from Client:[accept-language]=[en-us,en;q=0.5]
Mon May 10 13:14:40 2004 Hdrs from Client:[accept-encoding]=[gzip,deflate]
Mon May 10 13:14:40 2004 Hdrs from Client:[accept-charset]=[ISO-8859-1,
utf-8;q=0.7,*;q=0.7]
Mon May 10 13:14:40 2004 Hdrs from Client:[keep-alive]=[300]
Mon May 10 13:14:40 2004 Hdrs from Client:[cookie]=[JSESSIONID=Af48B06Xe6BvewE8yCNWK
z62dsiu028qlO9GvkS41bg3n53RbJ2Z!-2032354160!-457294087]
Mon May 10 13:14:40 2004 Hdrs from Client:[cache-control]=[max-age=0]

Mon May 10 13:14:40 2004 attempt #0 out of a max of 5
Mon May 10 13:14:40 2004 trying connect to PRIMARY '172.18.137.50'/38625 /65535 at
 line 1138 for '/mywebapp/session.jsp'
Mon May 10 13:14:40 2004 WLS info :  172.18.137.50:38625 recycled? 1
Mon May 10 13:14:40 2004 URL::sendHeaders(): meth='GET' file='/mywebapp/session.jsp'
 protocol='HTTP/1.1'
Mon May 10 13:14:40 2004 Hdrs to WLS:[host]=[slsol4:3862]
Mon May 10 13:14:40 2004 Hdrs to WLS:[user-agent]=[Mozilla/5.0 (Windows; U; Windows
 NT 5.1; en-US; rv:1.6) Gecko/20040113]
Mon May 10 13:14:40 2004 Hdrs to WLS:[accept]=[text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/
plain;q=0.8,image/png,image/jpeg,image/gif;q=0.2,*/*;q=0.1]
Mon May 10 13:14:40 2004 Hdrs to WLS:[accept-language]=[en-us,en;q=0.5]
Mon May 10 13:14:40 2004 Hdrs to WLS:[accept-encoding]=[gzip,deflate]
Mon May 10 13:14:40 2004 Hdrs to WLS:[accept-charset]=[ISO-8859-1,utf-8;q=0.7,*;q=0.7]
Mon May 10 13:14:40 2004 Hdrs to WLS:[keep-alive]=[300]
Mon May 10 13:14:40 2004 Hdrs to WLS:[cookie]=[JSESSIONID=Af48B06Xe6BvewE8yCNWKz62dsiu028qlO9GvkS41bg3n53RbJ2Z!-
2032354160!-457294087]
Mon May 10 13:14:40 2004 Hdrs to WLS:[cache-control]=[max-age=0]
Mon May 10 13:14:40 2004 Hdrs to WLS:[Proxy-Path-Translated]=[/home/sutanug/webservers/iplanet41sp11/docs/
mywebapp/session.jsp]
Mon May 10 13:14:40 2004 Hdrs to WLS:[Proxy-Path-Translated-Base]=[/home/sutanug/webservers/iplanet41sp11/docs]
Mon May 10 13:14:40 2004 Hdrs to WLS:[WL-Proxy-Client-IP]=[10.40.4.45]
Mon May 10 13:14:40 2004 Hdrs to WLS:[WL-Proxy-SSL]=[false]
Mon May 10 13:14:40 2004 Hdrs to WLS:[Proxy-Client-IP]=[10.40.4.45]
Mon May 10 13:14:40 2004 Hdrs to WLS:[X-Forwarded-For]=[10.40.4.45]
Mon May 10 13:14:40 2004 Hdrs to WLS:[Connection]=[Keep-Alive]
Mon May 10 13:14:40 2004 Hdrs to WLS:[X-WebLogic-Request-ClusterInfo]=[true]
Mon May 10 13:14:40 2004 Hdrs to WLS:[X-WebLogic-KeepAliveSecs]=[30]
Mon May 10 13:14:40 2004 Hdrs to WLS:[x-weblogic-cluster-hash]=[sUuYnuyhFpkhw6ty44bkNczWnaA]
Mon May 10 13:14:40 2004 INFO: sysSend 947

Mon May 10 13:14:40 2004 Hdrs from WLS:[Date]=[Mon, 10 May 200417:14:46 GMT]
Mon May 10 13:14:40 2004 Hdrs from WLS:[Server]=[WebLogic Server 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284 ]
Mon May 10 13:14:40 2004 Hdrs from WLS:[Content-Length]=[3895]
Mon May 10 13:14:40 2004 Hdrs from WLS:[Content-Type]=[text/html]
Mon May 10 13:14:40 2004 parsed all headers OK
Mon May 10 13:14:40 2004 Hdrs to client:[Date]=[Mon, 10 May 200417:14:46 GMT]
Mon May 10 13:14:40 2004 Hdrs to client:[Server]=[WebLogic Server 8.1 SP2 Fri Dec 5 15:01:51 PST 2003 316284]
Mon May 10 13:14:40 2004 add content-length to srvhdrs, [Content-Length]=[3895]
Mon May 10 13:14:40 2004 Hdrs to client:[Content-Type]=[text/html]
Mon May 10 13:14:40 2004 canRecycle: conn=1 status=200 isKA=1 clen=3895 isCTE=0
Mon May 10 13:14:40 2004 closeConn: pooling for '172.18.137.50/38625'
Mon May 10 13:14:40 2004 request [/mywebapp/session.jsp] processed sucessfully..................

返回页首

查看代理桥接器页
可以利用类似如下形式的 URL 查看代理桥接器页面:
    http://webserver_host:port/path/xyz.jsp?__WebLogicBridgeConfig
其中,path 应当是调用插件的路径。

例如,http://myhost:8080/mywebapp/session.jsp?__WebLogicBridgeConfig

下面是一个代理桥接器页面示例。


Query String: '__WebLogicBridgeConfig'
This entry is cluster aware.

ClusterID (from obj.conf): "sol1:8001,sol2:8001,sol3:8001"
This is the same list of servers that is configured in proxy configuration file

WebLogic
Cluster List:
  1. Host: '172.18.137.54' Port: 8001 *Primary*
  2. Host: '172.18.137.50' Port: 8001 *Secondary*
General Server List:
Also called dynamic server list and contains the server nodes that are known to be healthy at this point
  1. Host: '172.18.137.50' Port: 8001 Status: OK
  2. Host: '172.18.137.54' Port: 8001 Status: OK
ConnectRetrySecs: '2'
ConnectTimeoutSecs: '10'
CookieName: JSESSIONID
Debug: 'ALL'
DebugConfigInfo: 'ON'
DefaultFileName:
DynamicServerList: ON
ErrorPage: ''
FileCaching: ON
Idempotent: ON
KeepAliveEnabled: true
KeepAliveSecs: '20'
MaxPostSize: '-1'
MaxSkipTime: '10'
PathPrepend: ''
PathTrim: ''
SecureProxy: 'OFF'
StatPath: false
WLIOTimeoutSecs(old name is HungServerRecoverSecs): '300'
WLSocketTimeoutSecs: '2'
WLLogFile: '/tmp/wlproxy.log'
WLProxySSL: 'OFF'

Runtime statistics:
  • requests: 4
  • successful requests: 4
  • Exception objects created: 0
  • Exception Objects deleted: 0
  • URL Objects created: 1
  • URL Objects deleted: 1
  • connections recycled: 3
  • UNKNOWN_ERROR_CODE exceptions: 0
  • CONNECTION_REFUSED exceptions: 0
  • CONNECTION_TIMEOUT exceptions: 0
  • READ_ERROR_FROM_CLIENT exceptions: 0
  • READ_ERROR_FROM_SERVER exceptions: 0
  • READ_ERROR_FROM_FILE exceptions: 0
  • WRITE_ERROR_TO_CLIENT exceptions: 0
  • WRITE_ERROR_TO_SERVER exceptions: 0
  • WRITE_ERROR_TO_FILE exceptions: 0
  • READ_TIMEOUT exceptions: 0
  • WRITE_TIMEOUT exceptions: 0
  • UNKNOWN_HOST exceptions: 0
  • NO_RESOURCES exceptions: 0
  • PROTOCOL_ERROR exceptions: 0
  • CONFIG_ERROR exceptions: 0
  • FAILOVER_REQUIRED exceptions: 0
  • POST_TIMEOUT exceptions: 0
  • REQUEST_ENTITY_TOO_LARGE exceptions: 0
Build date/time: Oct 4 200318:00:57

Change Number: 291942

返回页首

外部资源

返回页首
  
是否需要更多帮助?
如果您已经理解这个模式,但仍需要其它帮助,您可以:
  1. http://support.bea.com/ 上查询 AskBEA(例如使用“<web server plug-ins>”),以查找其它已发布的解决方案。
  2. http://support.bea.com/ 上,向 BEA 的某个新闻组中提出更详细具体的问题。
如果这还不能解决您的问题,并且您拥有有效的技术支持合同,您可以通过登录以下网站来打开支持案例:http://support.bea.com/

反馈

请给我们提供您的意见,说明此支持诊断模式“利用代理插件的问题常规诊断过程”一文是否有所帮助,您需要的任何解释,以及对支持诊断模式的新主题的任何要求。


免责声明:

依据 BEA 与您签署的维护和支持协议条款,BEA Systems, Inc. 在本网站上提供技术技巧和修补程序供您使用。虽然您可以将这些信息和代码与您获得 BEA 授权的软件一起使用,但 BEA 并不对所提供的技术技巧和修补程序做任何形式的担保,无论是明确的还是隐含的。

本文档中引用的任何商标是其各自所有者的财产。有关完整的商标信息,请参考您的产品手册。


返回页首