<Jan 14, 2007 5:11:33 PM CST> <Warning> <HTTP Session> <BEA-100074> <Primary session was removed during our attempt to retrieve secondary information from the session in the local server for the session: roid: -3937880596723352109 , rsid: [ID: 9LQnFpbPxTjJ1DVGF19hBT947L1vHvBQ2ZrztvQtfPykGRDTht0R Primary: -90604744:192.168.80.10:8004:-1 Secondary: 1696053682:192.168.80.11:8002:-1] , primaryURL: t3://192.168.80.10:8004.>
java.io.FileNotFoundException: /data/cncbss/cncBssCluster/mserver2/applications/DefaultWebApp/DefaultWebApp/account/temp/yMcgF0NBy1zh8hbqCTw41GGWZGYnVYjhJjd2bWvzc2b3stZK3n0j!-90604744!1696053682!1169460641300.dat (No such file or directory)
上网求助,某版主要我设置WebLogic cluster的算法是affinity的,我选择了round-robin affinity.
设置后,会话请求按照我的想法发送了,但是又出现了另一个问题,页面打开相当缓慢,开始以为是算法的问题。
后来发现apache的日志里出现很多[error] CONNECTION_REFUSED [os error=0, line 1730 of ../nsapi/URL.cpp]: Error connecting to host错误,于是又上网找资料,没找到什么有用的,又去查看bea的文档,改了KeepAlive On、增大了WebLogic的Accept BackLog大小,又改了系统TCP的参数,好像也没什么用处。最后在文档中看到下面一段话: The Dynamic Server List
When you use the WebLogicCluster parameter in your httpd.conf orweblogic.conf file to specify a list of WebLogic Servers, the plug-in uses that list as a starting point for load balancing among the members of the cluster. After the first request is routed to one of these servers, a dynamic server list is returned containing an updated list of servers in the cluster. The updated list adds any new servers in the cluster and deletes any that are no longer part of the cluster or that have failed to respond to requests. This list is updated automatically with the HTTP response when a change in the cluster occurs.
试着关闭了DynamicServerList,重启apache,系统页面响应飞快。
我是这样认为的,WebLogic使用了round-robin affinity算法,同时关闭了DynamicServerList就意味着apache不再将请求路由到别的server上。
虚拟主机的配置如下:
<VirtualHost 192.168.0.8:9999>
ServerName 192.168.0.8:9999
DocumentRoot /CNC/
CustomLog "|/usr/local/sbin/cronolog /CNC/ApacheLog/bssCluster/%w/access_9999_log" combined
<IfModule mod_weblogic.c>
WebLogicCluster 192.168.0.17:8002,192.168.0.18:8004
MatchExpression *.jsp
MatchExpression *.htm
MatchExpression *.html
Idempotent ON
KeepAliveEnabled ON
DynamicServerList OFF
</IfModule>
</VirtualHost>