MQ: An MQException occurred: Completion Code 2, Reason 2009

Error Log:

 

MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
    at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:242)
    at com.ibm.mq.MQClientManagedConnectionFactoryJ11._createManagedConnection(MQClientManagedConnectionFactoryJ11.java:276)
    at com.ibm.mq.MQClientManagedConnectionFactoryJ11.createManagedConnection(MQClientManagedConnectionFactoryJ11.java:296)
    at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
   .......................
    at com.ibm.rfidic.test.utils.mq.RFIDICMQDataSource.clearQueue(RFIDICMQDataSource.java:209)
    at com.ibm.rfidic.test.mdm.fvt.testcases.FVT_PEDIGREE_EVENTS_SRV_0055.testFVT_PEDIGREE_EVENTS_SRV_0055(FVT_PEDIGREE_EVENTS_SRV_0055.java:81)
    ........................
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: com.ibm.mqservices.MQInternalException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
    at com.ibm.mq.MQInternalCommunications.establishChannel(MQInternalCommunications.java:1544)
    at com.ibm.mq.MQInternalCommunications.<init>(MQInternalCommunications.java:523)
    at com.ibm.mq.MQSESSIONClient.MQCONN(MQSESSIONClient.java:1316)
    at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:218)
    ... 36 more
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
    at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:242)
    ..............
    at com.ibm.rfidic.test.utils.mq.RFIDICMQDataSource.connect(RFIDICMQDataSource.java:173)
    at com.ibm.rfidic.test.utils.mq.RFIDICMQDataSource.write(RFIDICMQDataSource.java:103)
    at com.ibm.rfidic.test.utils.mq.RFIDICMQDataSource.write(RFIDICMQDataSource.java:149)
    at com.ibm.rfidic.test.mdm.fvt.testcases.FVT_PEDIGREE_EVENTS_SRV_0055.testFVT_PEDIGREE_EVENTS_SRV_0055(FVT_PEDIGREE_EVENTS_SRV_0055.java:82)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:615)
    at junit.framework.TestCase.runTest(TestCase.java:154)
   .......................
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: com.ibm.mqservices.MQInternalException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009
MQJE016: MQ queue manager closed channel immediately during connect
Closure reason = 2009
    at com.ibm.mq.MQInternalCommunications.establishChannel(MQInternalCommunications.java:1544)
    at com.ibm.mq.MQInternalCommunications.<init>(MQInternalCommunications.java:523)
    at com.ibm.mq.MQSESSIONClient.MQCONN(MQSESSIONClient.java:1316)
    at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:218)
    ... 36 more

restoreMasterDatafor_partnerPrivate:
     [echo] basedir = /home/tsadmin/hxlin/vobs/RFIDICTest/fvt/cdlsrc/com.ibm.rfidic.test.config9.1
     [echo] HOME=/home/tsadmin
     [echo] Using Oracle

 

 

It seems that the problem can be solved by practice 2.  What a good news!

 

 

Official Detail Document:

 

http://www-01.ibm.com/support/docview.wss?uid=swg21226703
http://eai.ittoolbox.com/groups/technical-functional/mqseries-l/mqje001-an-mqexception-occurred-completion-code-2-reason-2009-689165

 

 

 

Practices:

 

2. http://hi.baidu.com/faq0/blog/item/c707cc23006e5c569922ed26.html

linked exception: com.ibm.mq.MQException: MQJE001: An MQException occurred: Completion Code 2, Reason 2009

MQJE016: MQ queue manager closed channel immediately during connect

Closure reason = 2009


/var/mqm/qmgrs/TS!QUEUE!MANAGER/qm.ini
qm.ini

   Log:

   LogPrimaryFiles=3

   LogSecondaryFiles=2

   LogFilePages=1024

   LogType=CIRCULAR

   LogBufferPages=17

   LogPath=/var/mqm/log/WNMS3_QM/

   LogWriteIntegrity=TripleWrite

Service:

   Name=AuthorizationService

   EntryPoints=9

ServiceComponent:

   Service=AuthorizationService

   Name=MQSeries.UNIX.auth.service

   Module=/opt/mqm/lib/amqzfu

   ComponentDataSize=0

 

#add below parameters


CHANNELS:

   MaxChannels = 600

   MaxActiveChannels = 600

TuningParameters:

   IPCCECSetSize=4000000

   IPCCExtensionSize=128000

TCP:

   KeepAlive=Yes

   ListenerBacklog=200


It's better to restart MQ before you expect.

 

 

 

1.  http://www.itpub.net/695157.html

 MQ

unix  qm.ini
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp
System Admin/Configuring WebSphere MQ/Configuring WebSphere MQ /Changing queue manager configuration information /Channels


CHANNELS  qm.ini
MaxChannels=100|number
 100
MaxActiveChannels=MaxChannels_value
 MaxChannels



1. stop QueueManager
2. tune or add the channel paramaters within channel section of qm.ini
  (   MaxChannels MaxActiveChannels 500)
3. start QueueManager,
4. ok,

qm.ini :
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp
System Admin/Configuring WebSphere MQ/Configuring WebSphere MQ /Changing configuration information on UNIX systems/ Queue manager configuration files, qm.ini )


Channels:
   MaxChannels=500
   MaxActiveChannels=500
   MQIBindType=STANDARD

 

 

3.

 

Mismatching CSD on various platforms should not cause any problems.

Since you got a 2009 error, that means you've gotten farther than
if you got 2058 and 2059, or 2035 authorization problems. You have
successfully connected and then lost the connection. It is false
to say that you did not connect even if the error code occurred
during the MQConn.

You should be looking in the logs on both sides. Host and server.
This may not or may not yield any insite.

2009 is not uncommon for client connections. Innevitably a network
goes down, a line, modem, router etc is flaky or broken, if a
connection to a queue manager has been made then the line drops
"for a client you would see 2009". If the line is totally gone, you
would not see 2009 on a subsequent attempt. Your program should
be changed to try again when a 2009 occurs, in a loop perhaps 5
times.

If some host process resets or closes and opens the client
connection all connected clients would get a 2009. There are many
cases of this issue going back over 5 years. One Guy was getting it after 98 connections.

Change your code and be happy.

### 解决WSL 更新时遇到的 Docker 错误 当面对 WSL2 上 Docker 的兼容性和配置问题时,可以采取多种方法来解决问题并确保 Docker 正常运行。 #### 方法一:安装特定版本的 Docker CE 由于最新版 Docker Engine 可能不支持 WSL2,可以选择安装一个较旧但稳定的版本 `docker-ce=17.09.0~ce-0~ubuntu` 来确保其能在 WSL2 中正常工作[^1]。这可以通过以下命令实现: ```bash sudo apt-get remove docker docker-engine docker.io containerd runc sudo apt-get update sudo apt-get install -y \ apt-transport-https \ ca-certificates \ curl \ software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update sudo apt-get install -y docker-ce=17.09.0~ce-0~ubuntu ``` #### 方法二:通过 Windows 主机上的 Docker Desktop 访问容器引擎 另一种解决方案是从 WSL 终端连接到已经在虚拟机中启动的 Docker 引擎实例。这意味着不需要直接在 WSL 内部安装 Docker,而是利用已经存在的 Docker Desktop 安装。为了使此设置生效,需执行如下操作: 1. 启动 Docker Desktop 并确认服务正在运行。 2. 配置环境变量以便于从 WSL 使用 Docker CLI 工具与远程守护进程通信: ```bash export DOCKER_HOST="tcp://localhost:2375" ``` 如果上述两种方案均未能有效解决当前困境,则可能是因为系统内核或其他依赖项发生了变化而导致的问题。此时建议检查操作系统版本以及内核信息以排除潜在冲突因素[^2]: ```bash $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy $ root@-WSL2 $ root@-PC:/mnt/c/Users/Lyu# cat /etc/issue Ubuntu 22.04.4 LTS \n \l ``` 以上输出表明用户正使用的是基于 WSL2 的 Ubuntu 22.04 系统,并且内核版本为 `6.6.36.3-microsoft-standard-WSL2`。这些细节对于排查问题至关重要。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值