|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MQRC_ Errors when getting messages from iSeries |
« View previous topic :: View next topic » |
Author |
Message
|
plivingstone |
Posted: Tue Jun 30, 2015 2:20 am Post subject: MQRC_ Errors when getting messages from iSeries |
|
|
Novice
Joined: 11 Nov 2014 Posts: 11
|
We are using the below code to and settings to connect to the IBM WebSphere MQ (version IBM(R) WebSphere(R) MQ V6.0.1) on an iSeries.
We use the same uid and pwd for three different applications against the same MQ
We get MQRC_NOT_AUTHORIZED and MQRC_Q_MGR_NOT_AVAILABLE errors intermittently throughout the day, but always on the Get messages method.
Settings:
connection properties:
Quote: |
MQC.TRANSPORT_PROPERTY = MQC.TRANSPORT_MQSERIES_MANAGED
MQC.CHANNEL_PROPERTY = SYSTEM.DEF.SVRCONN
MQC.HOST_NAME_PROPERTY = IP Address
|
We use the below Open Options:
Quote: |
MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_FAIL_IF_QUIESCING + MQC.MQOO_INQUIRE |
Code: |
class WebSphereMQ
{
public bool impStatus { get; set; }
public MQQueueManager gMQQueueManager;
public MQQueue gMQQueue;
private MQMessage queueGetMessage { get; set; }
private MQGetMessageOptions queueGetMessageOptions { get; set; }
public MQQueueManager pMQQueueManager;
public MQQueue pMQQueue;
private MQMessage queuePutMessage { get; set; }
private MQPutMessageOptions queuePutMessageOptions { get; set; }
public WebSphereMQ()
{
impStatus = impersonation.impersonateValidUser(Common.impNme, "", Common.impPwd);
gMQQueueManager = null;
gMQQueue = null;
if (gMQQueue != null && gMQQueue.IsOpen)
{
// Just incase
gMQQueue.Close();
gMQQueueManager.Disconnect();
}
}
public bool connectMQGet(string QMgr, string QName, Hashtable connectionProperties, bool BrowseOnly, string QType)
{
try
{
gMQQueueManager = new MQQueueManager(QMgr, connectionProperties);
if (gMQQueueManager != null && QType == "OUT")
{
if (BrowseOnly)
gMQQueue = gMQQueueManager.AccessQueue(QName, MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_BROWSE + MQC.MQOO_FAIL_IF_QUIESCING + MQC.MQOO_INQUIRE);
else
gMQQueue = gMQQueueManager.AccessQueue(QName, MQC.MQOO_INPUT_AS_Q_DEF + MQC.MQOO_FAIL_IF_QUIESCING + MQC.MQOO_INQUIRE);
}
}
catch (MQException mqe)
{
if (impStatus) impersonation.undoImpersonation();
/* Write to log */
Common.logBuilder("WebSphereMQ --> connectMQGet <--", "MQException", Common.ActiveMQ, mqe.Message, "Exception");
/* Send email to support */
emailer.exceptionEmail(mqe);
return false;
}
return true;
} |
Here is an example of the error and stack trace:
Quote: |
An MQException has happened on 30 June 2015 at 08:52A
Message ---
MQRC_NOT_AUTHORIZED
HelpLink ---
Source ---
amqmdnet
StackTrace ---
at IBM.WMQ.MQBase.throwNewMQException() at IBM.WMQ.MQQueueManager.Connect(String queueManagerName) at IBM.WMQ.MQQueueManager..ctor(String queueManagerName, Hashtable properties) at EvryCardManagement.WebSphereMQ.connectMQGet(String QMgr, String QName, Hashtable connectionProperties, Boolean BrowseOnly, String QType) |
So is there some setting I can change on the client side to prevent us getting these exceptions, or is this something that needs to be modified on the iSeries/MQ?
Should we try using different uid's for the three different applications hitting the MQ? |
|
Back to top |
|
 |
zpat |
Posted: Tue Jun 30, 2015 3:53 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Seems unlikely that "not authorised" would be intermittent.
However make sure you use supported levels of the MQ client and the MQ server.
V6 of MQ is way out of date.
Enable authorisation events to see more details of what is not being allowed (in the SYSTEM.ADMIN.QMGR.EVENT queue). _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
plivingstone |
Posted: Tue Jun 30, 2015 5:15 am Post subject: |
|
|
Novice
Joined: 11 Nov 2014 Posts: 11
|
zpat wrote: |
Seems unlikely that "not authorised" would be intermittent.
However make sure you use supported levels of the MQ client and the MQ server.
V6 of MQ is way out of date.
Enable authorisation events to see more details of what is not being allowed (in the SYSTEM.ADMIN.QMGR.EVENT queue). |
Thanks. We seem to get these exceptions about every 30 minutes...
I will ask if we can enable the authorisation events |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|