错误Python PYMQI模块

时间:2014-11-03 01:24:46

标签: python python-2.7 ibm-mq

我尝试使用PYMQI连接到MQ Z / OS,但是我收到以下错误:

Traceback (most recent call last):
  File "davidemq.py", line 9, in <module>
    qmgr = pymqi.connect(queue_manager, channel, conn_info)
  File "/usr/local/lib/python2.7/dist-packages/pymqi.py", line 2431, in connect
    qmgr.connect_tcp_client(queue_manager, CD(), channel, conn_info)
  File "/usr/local/lib/python2.7/dist-packages/pymqi.py", line 1330, in connectTCPClient
    self.connectWithOptions(name, cd)
  File "/usr/local/lib/python2.7/dist-packages/pymqi.py", line 1311, in connectWithOptions
    raise MQMIError(rv[1], rv[2])
pymqi.MQMIError: MQI Error. Comp: 2, Reason 2195: FAILED: MQRC_UNEXPECTED_ERROR

这是代码:

import pymqi

queue_manager = "****"
channel = "***********"
host = "******"
port = "nnnnn"
conn_info = "%s(%s)" % (host, port)

qmgr = pymqi.connect(queue_manager, channel, conn_info)

可能是什么问题?

1 个答案:

答案 0 :(得分:0)

您的追溯会给您(模糊)错误:

Reason 2195: FAILED: MQRC_UNEXPECTED_ERROR

可能是环境/配置错误,权限,遗漏了类路径中的内容。

请参阅:

why i am getting websphere mq error code 2195 where my adapter read a messages from websphere mq

How to resolve WebSphere MQ Reason code 2195 related error?