IBM MQ - Resolve "AMQ9557E Queue Manager User ID initialization failed"
by
Jeremy Canfield |
Updated: December 07 2022
| IBM MQ articles
Let's say something like this is in the IBM MQ error log.
----- amqzfula.c : 3165 -------------------------------------------------------
12/06/2022 10:44:17 PM - Process(4696.851316) User(mqm) Program(amqrmppa)
Host(server1.example.com) Installation(Installation1)
VRMF(9.1.0.10) QMgr(MANAGER01)
Time(2022-12-07T04:44:17.799Z)
ArithInsert1(2) ArithInsert2(2035)
CommentInsert1(john.doe)
CommentInsert2(my.service.id)
CommentInsert3(john.doe)
AMQ9557E: Queue Manager User ID initialization failed for 'john.doe'.
EXPLANATION:
The call to initialize the User ID 'john.doe' failed with CompCode 2 and Reason
2035. If an MQCSP block was used, the User ID in the MQCSP block was
'my.service.id'. If a userID flow was used, the User ID in the UID header was
'john.doe' and any CHLAUTH rules applied prior to user adoption were evaluated
case-sensitively against this value.
ACTION:
Correct the error and try again.
----- cmqxrsrv.c : 2298 -------------------------------------------------------
This can occur when
- MQConstants.USE_MQCSP_AUTHENTICATION_PROPERTY is set to false
- JmsConstants.USER_AUTHENTICATION_MQCSP is set to false
- System property com.ibm.mq.cfg.jmqi.useMQCSPauthentication is set to false
For example, here is an example Java class with MQConstants.USE_MQCSP_AUTHENTICATION_PROPERTY set to false.
import java.util.Hashtable;
import com.ibm.mq.MQException;
import com.ibm.mq.MQQueueManager;
import com.ibm.mq.constants.MQConstants;
public class Main {
private static final String HOST = "your ibm mq server or cluster hostname";
private static final String QMGR = "your ibm mq queue_manager";
private static final String CHANNEL = "your ibm mq channel";
private static final String USERNAME = "your ibm mq username";
private static final String myPASSWORD = "your ibm mq password";
private static final int PORT = your ibm mq queue manager port;
public static void main(String[] args) throws MQException {
Hashtable<String, Object> properties = new Hashtable<String, Object>();
properties.put(MQConstants.HOST_NAME_PROPERTY, HOST);
properties.put(MQConstants.PORT_PROPERTY, PORT);
properties.put(MQConstants.CHANNEL_PROPERTY, CHANNEL);
properties.put(MQConstants.USER_ID_PROPERTY, USERNAME);
properties.put(MQConstants.PASSWORD_PROPERTY, myPASSWORD);
properties.put(MQConstants.USE_MQCSP_AUTHENTICATION_PROPERTY, false);
try {
MQQueueManager queueManagerConnection = new MQQueueManager("MANAGER01", properties);
if (queueManagerConnection.isConnected()) {
System.out.println("Successfully connected to CHANNEL01");
}
else {
System.out.println("Failed to connect to CHANNEL01");
}
System.out.println(queueManagerConnection);
queueManagerConnection.disconnect();
System.out.println("Successfully disconnected from queue manager MANAGER01");
} catch (MQException e) {
e.printStackTrace();
}
}
}
Did you find this article helpful?
If so, consider buying me a coffee over at