I am using WMQ (IBM Websphere Message Queue) and am facing the below error:
Root Exception was: MQJE001: An MQException occurred: Completion Code 2, Reason 2059
MQJE011: Socket connection attempt refused. Type: class com.ibm.mqservices.MQInternalException
ERROR 2017-04-21 11:36:52,212 [main] org.mule.module.launcher.application.DefaultMuleApplication:
********************************************************************************
Message : MQJMS2005: failed to create MQQueueManager for '172.17.65.24:RQACBRKB'
JMS Code : MQJMS2005
Element : /WMQ2 @ app:config.xml:14 (WMQ)
--------------------------------------------------------------------------------
Root Exception stack trace:
com.ibm.mqservices.MQInternalException: MQJE001: An MQException occurred: Completion Code 2, Reason 2059
MQJE011: Socket connection attempt refused
at com.ibm.mq.MQInternalCommunications.createSocketConnection(MQInternalCommunications.java:2316)
at com.ibm.mq.MQv6InternalCommunications$1.run(MQv6InternalCommunications.java:157)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.mq.MQv6InternalCommunications.initialize(MQv6InternalCommunications.java:154)
I have imported below jars. I came to know some modifications need to be done on anypoint studio.
com.ibm.mq.jar
com.ibm.mqetclient.jar (if using Transactions)
com.ibm.mq.jmqi.jar
com.ibm.mqjms.jar
dhbcore.jar
com.ibm.mq.headers.jar
It appears based on the error messages that you are using IBM MQ classes from MQ v6.0 which was released June 24th 2005 and has been out of support since September 30th 2012 (almost 5 years). The version may not have anything to do with your issue but I would strongly suggest that you move to a supported version of the MQ client. Newer MQ client versions can connect to older MQ queue managers. You can download a java only install of MQ 8.0 or MQ 9.0 jar files at the links below:
The error indicates you are unable to connect to the IP and port that you have specified. Try a simple telnet to that IP and port to ensure you are able to connect, if you are not then verify the IP and port. MQ will default to port 1414 if no port is specified.
For a good write up on common causes of Reason 2059 please review the answer posted by @T.Rob to the question "Can't connect Websphere MQ Queue Manager"