[英]How to fix 'JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED')'
I am running a Docker container with MQ 7.1 on it and I am trying to send a test message to the queue using a Java application that will send a message.我正在运行一个带有 MQ 7.1 的 Docker 容器,我正在尝试使用将发送消息的 Java 应用程序向队列发送测试消息。 The docker container is running on a RHEL server and I am trying to send a message from my Windows PC using the Java application in Eclipse locally.
docker 容器在 RHEL 服务器上运行,我正在尝试使用本地 Eclipse 中的 Java 应用程序从我的 Windows PC 发送消息。
I am tripping up when creating the MQQueueConnection, as I am getting the following error:我在创建 MQQueueConnection 时绊倒了,因为我收到以下错误:
Exception in thread "main" com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ2013: The security authentication was not valid that was supplied for QueueManager '' with connection mode 'Client' and host name 'x.x.x.x(1414)'.
Please check if the supplied username and password are correct on the QueueManager to which you are connecting.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:516)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:216)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:423)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:6772)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6151)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:280)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6143)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:115)
at mq.MQMessageSender.main(MQMessageSender.java:107)
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:204)
... 7 more
I have tried to change the authorization of the 'nobody' user and try open the gates with the following command but its not working:我试图更改“nobody”用户的授权并尝试使用以下命令打开大门,但它不起作用:
setmqaut -m QM1 -t qmgr -p 'nobody' +allmqi
Some info below:下面的一些信息:
Queue Manager: QM1
Queues: Q1, Q2
Channel name: MESSAGESENDER
Just fixed this error.刚刚修复了这个错误。 I added the 'mqm' user I was using on the docker container to my
createQueueConnection
call like this:我将我在
createQueueConnection
容器上使用的“mqm”用户添加到我的createQueueConnection
调用中,如下所示:
MQQueueConnection queueConn = (MQQueueConnection) cf.createQueueConnection("admin1", "");
这是 MQ 客户端不提供 conn 凭据时的典型错误,当您忘记在集成控制台中指定凭据时,也可能在 WebSphere 日志中发生此错误
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.