Weblogic8 @aix socket达上限 报错

今天发现有台weblogic应用链接不上了,检查日志发现如下信息.

引用

<Jul 29, 2011 11:37:58 AM GMT+08:00> <Notice> <WebLogicServer> <BEA-000203> <Reopening listen socket on port 7102.>
<Jul 29, 2011 11:37:59 AM GMT+08:00> <Critical> <WebLogicServer> <BEA-000204> <Failed to listen on port 7102, failure co
unt: 246, failing for 2,539 seconds, java.net.SocketException: Too many open files>
<Jul 29, 2011 11:37:59 AM GMT+08:00> <Critical> <WebLogicServer> <BEA-000206> <Attempting to close and reopen the server
socket on port 7102.>
<Jul 29, 2011 11:38:09 AM GMT+08:00> <Notice> <WebLogicServer> <BEA-000203> <Reopening listen socket on port 7102.>
<Jul 29, 2011 11:38:09 AM GMT+08:00> <Critical> <WebLogicServer> <BEA-000204> <Failed to listen on port 7102, failure co
unt: 247, failing for 2,549 seconds, java.net.SocketException: Too many open files>




搜索后发现是文件打开数已达上限. 但看系统设置

ulimit -n 是unlimit

继续搜索发现是weblogic启动脚本重新修改了unlimit值的上限
修改 $WL_HOME/common/bin/commEnv.sh 段的
ulimit设置后重启服务器后OK



为此还写了个脚本监控服务器是否不可用

#!/usr/bin/env python
# coding:utf8
import urllib
import logging

HOST_LIST=['130.59.10.40:7102','130.59.10.40:7104','130.59.10.41:7102','130.59.10.41:7104','130.59.10.59:7102','130.59.10.60:7102']

def checker(host):
	try:
		rst = urllib.urlopen('http://%s' % host)
		if rst.getcode() != 200:
			logging.warn('%s 服务器不在线' % host)
	except Exception:
		logging.warn('%s 服务器不在线' % host)


map(checker,HOST_LIST)
logging.info('检查完成!')



你可能感兴趣的:(weblogic)