MQ error 2085 while connecting with remote queue
Mia Lopez
My .NET code can connect and put a message to a remote queue successfuly. However, the same code does not work with local queue. It throws 2085 error. What different setting should be set in code to make that work with local queue?
Here is my code:
Hashtable queueProperties = new Hashtable();
queueProperties[MQC.HOST_NAME_PROPERTY] = "10.x.x.x";
queueProperties[MQC.PORT_PROPERTY] = 1451;
queueProperties[MQC.CHANNEL_PROPERTY] = "TST1.TRADE.CHANNEL";
try
{ // Attempt the connection queueManager = new MQQueueManager("MYQUEUEMANAGER", queueProperties); strReturn = "Connected Successfully";
}
catch (MQException mexc)
{ // TODO: Setup other exception handling throw new Exception(mexc.Message + " ReasonCode: " + mexc.ReasonCode + "\n" + GetReason(mexc.ReasonCode), mexc);
}Here, the code is internally using the IIS user id (application pool user) to connect with MQ because this code is run as part of WCF service.
1 Answer
If you run the mqrc utility you can find out what the error code translates to:
$mqrc 2085 2085 0x00000825 MQRC_UNKNOWN_OBJECT_NAMEThis means the queue name you are attempting to open does not exist on the queue manager you are connected to.
I noted that the source you posted does not include any code related to opening the queue. You should check that the queue name you are attempting to open does in fact exist on the queue manager you are connecting to.
1