0

I'm trying to connect to MQ z/OS using PYMQI, but I get the following error:

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

This is the code:

import pymqi

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

qmgr = pymqi.connect(queue_manager, channel, conn_info)
JoshMc
  • 10,239
  • 2
  • 19
  • 38
Dave
  • 1

1 Answers1

0

Your traceback gives you the (vague) error:

Reason 2195: FAILED: MQRC_UNEXPECTED_ERROR

Could be an environment/configuration error, permissions, missing something from the classpath.

See:

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?

Community
  • 1
  • 1
William Denman
  • 3,046
  • 32
  • 34