MQRC 2035: Not authorized
MQRC 2035 (MQRC_
Other names for this code
Also written as RC2035, reason code 2035, MQ 2035, MQ error 2035, MQRC_NOT_AUTHORIZED, 07F3, 0x07F3, not authorized, JMSWMQ2013, AMQ4036, MQJE001 Reason 2035, MQ 2035 not authorized.
What it means
Several different checks can return 2035, and the fix depends on which one failed. On MQCONN or MQCONNX the user may lack connect authority, the user ID or password may be wrong, or the queue manager may require credentials the application didn't send. On MQOPEN, MQPUT1 or MQSUB the user lacks authority for the options requested, such as put, get, browse or inquire. Commands fail with 2035 when the user can't issue them or can't touch the object named.
For client connections on distributed MQ, two layers run before any object check. Channel authentication records (CHLAUTH) can block the connection outright. New queue managers ship with a rule that blocks privileged administrator IDs on client channels, which is why an admin user often gets 2035 from a remote client. Connection authentication (CONNAUTH) then checks any user ID and password. On a new queue manager the default object SYSTEM.
On IBM MQ for z/OS, object and connection security is done by RACF or another external security manager, through classes such as MQCONN, MQQUEUE, MQADMIN and MQCMDS. A refusal there usually comes with an ICH408I message in the queue manager's job log. z/OS also supports CHLAUTH and connection authentication for channels. CICS applications on z/OS that aren't allowed to connect get 2217 (MQRC_
Common causes
- A CHLAUTH rule blocks the connection. The most common case is an administrator user ID connecting over a client channel, which the default backstop rule blocks.
- Connection authentication failed. The password is wrong or expired, the user ID doesn't exist on the queue manager's host or LDAP, or no credentials were sent when CHCKCLNT requires them.
- The user ID that reaches the queue manager has no authority on the queue. For clients this is the channel's MCAUSER, a CHLAUTH-mapped ID or, with MCAUSER blank, the ID the client asserted.
- The user lacks authority on the cluster transmission queue when putting to a cluster queue. The queue itself is fine.
- On z/OS, a RACF profile in MQCONN, MQQUEUE, MQADMIN or MQCMDS denies access, or a new profile wasn't refreshed.
- Java and JMS clients in compatibility mode sending a user ID longer than 12 characters, or authentication behavior changing after an upgrade to MQ 9.3 or later.
How to find the problem
- Read the queue manager error log (AMQERR01.LOG on distributed MQ) at the time of the failure. It names the check that failed, such as a channel blocked by a CHLAUTH rule, a rejected user ID and password, or a missing authority with the user ID and object.
- Test CHLAUTH rules with
DISPLAY CHLAUTH(APP.. It shows which rule would apply.SVRCONN) MATCH(RUNCHECK) ADDRESS('10. 1. 2. 3') CLNTUSER('ordapp') - Check the authentication setup with
DISPLAY QMGR CONNAUTHandDISPLAY AUTHINFO(...) CHCKCLNT CHCKLOCL ADOPTCTX. - On distributed MQ, list authority with
dspmqaut -m QM1 -t q -n ORDERS.IN -p ordapp. The environment variables MQS_REPORT_ NOAUTH and MQSAUTHERRORS add more detail to the logs. - Turn on authority events (
ALTER QMGR AUTHOREV(ENABLED)). Each refusal then puts a Not Authorized event on SYSTEM.ADMIN. QMGR. EVENT with the user ID. - On z/OS, look for ICH408I in the queue manager or channel initiator job log. It names the class, the profile and the user ID that was refused.
How to fix it
- Don't connect remote applications as an administrator. Use a non-privileged user ID, set by MCAUSER or a CHLAUTH USERMAP or ADDRESSMAP rule, and grant only what it needs.
- If a CHLAUTH rule blocks a legitimate user, change or add a specific rule rather than turning CHLAUTH off. New rules apply to new connections without a restart.
- Send valid credentials from the application in MQCSP or the connection factory, and run
REFRESH SECURITY TYPE(CONNAUTH)after changing the AUTHINFO object. - Grant object authority on distributed MQ with
setmqaut -m QM1 -t q -n ORDERS.IN -p ordapp +put +inq(or SET AUTHREC), thenREFRESH SECURITYif you changed group membership. - On z/OS, permit the user to the right RACF profile, refresh the class with
SETROPTS RACLIST(MQQUEUE) REFRESH, then issueREFRESH SECURITYon the queue manager.
What it looks like
JMSCMQ0001: IBM MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').IBM documentation
IBM documentation: MQRC 2035. Use the documentation for your installed release.
Related codes
Questions
Why does my admin user get 2035 when connecting from MQ Explorer or a client?
New queue managers have a CHLAUTH rule that blocks privileged users on client channels, and connection authentication requires them to send a password. MQ Explorer shows this as AMQ4036. Use a non-admin ID for applications, or add a specific CHLAUTH rule for the admin channel.
The user has authority on the queue. Why still 2035?
The user ID that reaches the queue manager may not be the one you think. For clients it can be the MCAUSER or a mapped ID. For cluster queues the user also needs authority on the cluster transmission queue.
What is the difference between 2035 and 2063?
2035 means the security check ran and the answer was no. 2063 (MQRC_SECURITY_ERROR) means the security check itself failed, for example because the LDAP server or the external security manager returned an error.