Reputation: 2788
I'm getting this error message, MQRC_HOST_NOT_AVAILABLE, when connecting to IBMMQ.
I'm relatively new to working with IBMMQ, but have been handed this project and need to get our .NET WCF code talking to MQ.
Our code currently looks like this:
Hashtable queueManagerProps = new Hashtable();
queueManagerProps.Add(MQC.HOST_NAME_PROPERTY, mqhost);
queueManagerProps.Add(MQC.CHANNEL_PROPERTY, mqchannel);
queueManagerProps.Add(MQC.PORT_PROPERTY, ConfigurationManager.AppSettings["MQPort"].ToString());
queueManagerProps.Add(MQC.TRANSPORT_PROPERTY, MQC.TRANSPORT_MQSERIES_MANAGED);
try
{
mqQMgr = new MQQueueManager(qmname, queueManagerProps);
}
catch (Exception ex)
{
throw new Exception(String.Format("Failed to connect to MQ Queue Manager {0}, channel {1} on host {2} on port {3}. Check inner exception for root cause.", qmname, mqchannel, mqhost, ConfigurationManager.AppSettings["MQPort"].ToString()), ex);
}
I have confirmed that (1) all the properties contain values, and (2) the values match the setup of our MQ server.
I also looked in the AMQERR01.LOG log file and there have been no entries since we set up the queue earlier this month.
Why is my new MQQueueManager() called throwing this exception? Is there any chance this could be a permissions issue, or is it definitely network / connectivity / configuration related?
Upvotes: 0
Views: 3337
Reputation: 2788
Found the problem. I had the host name misspelt.
The moral of the story is don't overlook the fundamentals, even when working with a technology you don't understand.
Admins: please feel free to delete this question if you don't find it useful.
Upvotes: 2