Websphere MQ Client, rc=2058 rc=MQRC_Q_MGR_NAME_ERROR
Autor: Juliano Claiton | Publicado: 2015-11-17T08:44:00-08:00

Troubleshooting aplicações que utilizam o MQ Client.

Vamos analisar o rc=2058, MQRC_Q_MGR_NAME_ERROR, visto nos logs de uma aplicação que se conecta via MQ Client.

Resumidamente, habilitamos o trace no MQ Client: strmqtrc -e -t all -t detail -l 100

Nos traces foi possível identificar que a aplicação não estava enviando as informações de conectividade com o MQ, através da liinha no trace destacada abaixo.

000E9C96 09:32:04.816994&nbsp; 26884.2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RSESS:001381 --------{&nbsp; xcsWaitThreadEvent&nbsp;


000E9C9B 09:32:04.826892&nbsp; 26884.182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Constructing IBM.WMQ.MQQueueManager#0294AD3E MQMBID sn=p750-005-150424 su=_cGGLkOp9EeSJoq1UhPFS6Q pn=lib/dotnet/pc/winnt/baseclasses/MQManagedObject.cs


&nbsp;000E9C9C 09:32:04.826924&nbsp; 26884.182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Constructing IBM.WMQ.MQQueueManager#0294AD3E MQMBID sn=p750-005-150424 su=_cGGLkOp9EeSJoq1UhPFS6Q pn=lib/dotnet/pc/winnt/baseclasses/MQQueueManager.cs


&nbsp;000E9C9D 09:32:04.826939&nbsp; 26884.182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --{&nbsp; MQQueueManager.Connect()


&nbsp;000E9C9E 09:32:04.826950&nbsp; 26884.182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SCCSID: '@(#) MQMBID sn=p750-005-150424 su=_cGGLkOp9EeSJoq1UhPFS6Q pn=lib/dotnet/pc/winnt/baseclasses/MQQueueManager.cs'


&nbsp;000E9C9F 09:32:04.826965&nbsp; 26884.182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MQQueueManager.IsConnected False HConn: (null)


&nbsp;000E9CA0 09:32:04.826979&nbsp; 26884.182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConnectOptions: QMgr = '', ConnName = '', Channel = ''


Por isso ocorreu o reason code 2058
000EA05F 09:32:04.845598&nbsp; 26884.182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IBM.WMQ.MQQueueManager#0294AD3E throwing MQException: cc=2 rc=2058


&nbsp;000EA060 09:32:04.845617&nbsp; 26884.182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; New MQException CompCode: 2 Reason: 2058


&nbsp;000EA061 09:32:04.845677&nbsp; 26884.182&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --}! MQQueueManager.Connect() (rc=MQRC_Q_MGR_NAME_ERROR)


Para uma conectividade normal com o MQ, os dados de conectividade irão aparecer como abaixo:

&nbsp;00001545 16:35:21.486811&nbsp; 36520.8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConnectOptions: QMgr = 'Nome-Queue-Manager', ConnName = '', Channel = ''


00001546 16:35:21.486843&nbsp; 36520.8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Connection Name: Ip-MQ-Server(Porta-MQ-Server)


00001547 16:35:21.486861&nbsp; 36520.8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Channel: Nome-do-canal


Com isso, vimos como analisar o trace e identificar uma falha de conexão de aplicações que se conectam diretamente no MQ Server via MQ Client..