IBM MQ关闭原因 Code 2,Reason 2009 达到最大连接数,mq2009


IBM MQ关闭原因 Code 2,Reason 2009 达到最大连接数。

原来连接MQ的程序是正确的,今天突然不能运行了,错误之一如下:

[plain]?view plain?copy

com.ibm.mqservices.MQInternalException:???MQJE001:发生???MQException:完成码???2,原因码???2009???

MQJE016:连接期间,MQ???队列管理器立即关闭通道???

关闭原因???=???2009???

原因是程序进行发送时未关闭,或者程序遇到Bug终端,未终端连接,使得MQ队列达到最大连接数一般为100,我的远程服务器为95。

通过查询错误日志可以验证是否是由于最大连接数到达上限导致的。

错误日志内容:

[plain]?view plain?copy

2012-7-24?13:49:21?-?Process(5804.126)?User(MUSR_MQADMIN)?Program(amqrmppa.exe)??

AMQ9513:?已达到最大通道数。??

??

??

说明:??

已达到可同时使用的最大通道数。允许通道数是队列管理器配置文件中的一个可配置的参??

数。??

操作:??

等待一些正在工作的通道关闭。当有某些通道可用时再试该操作。???

-----?amqrcsia.c?:?1080?-------------------------------------------------------??

2012-7-24?13:49:21?-?Process(5804.126)?User(MUSR_MQADMIN)?Program(amqrmppa.exe)??

AMQ9999:?通道程序异常终止。??

??

??

说明:??

通道程序?'SYSTEM.DEF.SVRCONN'?异常终止。??

操作:??

查看出错文件中通道程序?'SYSTEM.DEF.SVRCONN'?以前的错误消息以确定故障的原因。???

-----?amqrmrsa.c?:?468?--------------------------------------------------------??

确定就是最大连接数到达上限了,解决方法很简答,启动WebSphere MQ 服务管理器,名字为amqsvc.exe。然后点击关闭再重启,这样连接数就恢复为0了。

附录:

[plain]?view plain?copy

如何找到MQ的错误日志???

??

环境??

??

??

产品:MQSeries??

?平台:Unix,?NT??

?版本:5.0以上??

??

??

?MQSeries用错误日志记录与MQSeries自身运行,队列管理器以及通道有关的消息。因此,错误日志对于MQSeries错误诊断非常重要。??

1.?UNIX?平台上的MQSeries错误日志:??

??

??

当队列管理器名称已知,并且队列管理器可用时,错误日志位于?/var/mqm/qmgrs/qmname/errors?目录下,如:与MQ通道有关的消息。??

当队列管理器不可用时,错误日志位于?/var/mqm/qmgrs/@SYSTEM/errors?目录下;??

??

??

当错误是与Client?应用程序有关,错误日志位于:?/var/mqm/errors?目录下??

??

??

2.???

NT,?OS/2?Warp?平台上的MQSeries错误日志:??

??

??

当队列管理器名称已知,并且队列管理器可用时,错误日志位于?$MQM\qmgrs\qmname\errors?目录下,如:与MQ通道有关的消息。??

??

??

当队列管理器不可用时,错误日志位于?$MQM\qmgrs\@SYSTEM\errors?目录下;??

??

??

当错误是与Client?应用程序有关,错误日志位于:?$MQM\errors?目录下??

??

??

其中,$MQM是指MQSeries的安装目录,如C:\MQM等。??

我的远程服务器的错误日志为C:\Program Files\IBM\WebSphere MQ\Qmgrs\XIR_QM_1502\errors,注意这个路径,可不是什么logs之类的!

-------------------------------------------------------------------------------------------------------------------------

MQJE001:?Completion?Code?2,?Reason?2009

esolving JMSException due to com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2009

Cause

There are two possible scenarios. One is allocating a new QCF connection. The other is when the Application Server allocates a free connection from its connection pool, but the connection is no longer active, that is, broken. The connection may be broken for a number of different reasons; the 2009 reason code indicates that something prevented a successful connection to the Queue Manager. The most common causes for 2009 are the following:

1. A firewall has terminated the connection.

2. An IOException caused the socket to be closed.

3. An explicit action caused the socket to be closed by one end.

4. The queue manager is offline.

5. The maximum number of channels allowed by the queue manager are already open.

6. A configuration problem in the Queue Connection Factory (QCF).

My question is the vpn disconnected(because vpn connected timeout ,then it would disconnect automatically)! So,I restart the vpn and restart the program again.That's my solution.

相关内容