MQ logging

I'm an MQ newb. I'm trying to connect from WAS7 JMS. I use JNDI to get the QueueConnectionFactory then call createQueueConnection. When I make this call I get a JMSException caused by

JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED')

I would like to see the credentials being passed to MQ, does MQ log failed connection attempts ? Is there a way to see why this connection is failing ?

thanks very much
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

HonorGodSoftware EngineerCommented:
It looks like you are getting an authorization failure (e.g., bad userid/password kind of thing).

Information about "API Completion and reason codes" can be found here:

Information about "Security consideration" can be found here:

Is this a new installation, or did you upgrade your MQ and/or WSAS recently?

Did it ever work?

Are they (MQ & WSAS) on the same, or different machines?

Searching for MQRC_NOT_AUTHORIZED, we find:

public final static int

Reason code - queue is not authorized for access.

Information about "Log defaults" can be found here:

Hopefully this helps.

Let me know.
buckrodgerAuthor Commented:
We did upgrade WAS from 6.1 to 7.  And this all worked on 6.1.  In my local env WAS and MQ are on different machines.  In the test env WAS and MQ are on the same machine.  I don't think its a password thing because if I specify the same username and password on the createQueueConnection call it works fine.  However if I let WAS pass the credentials it fails.
HonorGodSoftware EngineerCommented:
So what version of MQ is being used?  6.0, I presume.
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

buckrodgerAuthor Commented:
HonorGodSoftware EngineerCommented:
Here's something that I just learned:

changes were done to the MQ JMS V7 client to provide to the MQ server the userid of the process (application) that is talking with the MQ server via the MQ JMS client.
In this case, the MQ queue manager has received a username which either:
- Does not exist in the Unix host of the MQ queue manager,
- Does exist, but it does not have the proper authority to access the MQ queue manager.

Check which user ID the application is being run under and then check to see if that user ID is in the mqm group (or some other group with sufficient authority).
If it is not in the mqm group, then add it to the mqm group and issue a runmqsc  command:

The user ID associated with the program when it runs must have authority to access certain resources of the queue manager. Grant the following authorities to the user ID:
- The authority to connect to the queue manager, and the authority to inquireon the attributes of the queue manager object
- The authority to put and get messages on the desired queue.
b) In case that it is not obvious which is the actual userid token that is received by the MQ queue manager from the MQ JMS client, then it is necessary to take a trace of the queue manager (and if possible, a trace of the MQ JMS client).
The tokens to look for in the traces are:
+ From the JMS Trace (trace.log) you can see the userid that is sent by the MQ Client
For example, the trace.log for the JMS client may have strings such as these: connecting as user: JohnDoe Setting username = JohnDoe userID = 'JohnDoe ' UID :JOHNDOE

+ From the MQ server trace you can see the userid that is received by the queue manager
It is very likely that one of the MQ trace files (*.FMT) will have the following string indicating that the value (username) is not a user ID in the system or that it does not belong to the mqm group (unknown principal). Search for the string: UnknownPrincipal


Also, in case that the userid does exist, another possible cause is that the user does not have all the proper authorizations, thus, check for the following phrase in the trace:

      The following requested permissions are unauthorized:

I hope that this helps!
HonorGodSoftware EngineerCommented:
For information about how to grant authorities, see the following book from the MQ online information center

Title: MQ V7 Information Center

Title: WebSphere MQ System Administration Guide

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
buckrodgerAuthor Commented:
Thanks for your help
HonorGodSoftware EngineerCommented:
Glad to have been able to help.

Thanks for the grade & points.

Good luck & have a great day.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.