【问题标题】:unable to connecting application to queue manager getting error JMSWMQ2013无法将应用程序连接到队列管理器,出现错误 JMSWMQ2013
【发布时间】:2018-04-27 16:15:23
【问题描述】:

我们使用的是 websphere MQ 版本 9.0.0.1,基本上我们已经在 linux 机器上配置了主动/被动集群设置,所有队列管理器在主动/被动节点上都运行良好。我们已经在队列管理器中配置了通道队列, 当应用程序尝试连接我的队列管理器时,我们遇到了错误

在应用程序端出现以下错误。

The Security athuntication was not valid that supplied for  QUEUEMANAGER 'xxxxx_OUTWARD'WITH CONNECTION 'CLIENT' and HOST NAME 'xxxxx'PLEASE CHECK IF THE ERROR QUEUEMANAGER 'xxxxx_OUTWARD'WITH CONNECTION MODE 'CLIENT'AND HOST NAME'xxxxxx.

我们在队列管理器级别错误日志中发现的错误以下

----- cmqxrsrv.c : 2362 -------------------------------------------------------
04/27/2018 07:52:35 PM - Process(29498.16) User(mqm) Program(amqzlaa0)
                    Host(xxxxxxx) Installation(Installation2)
                    VRMF(9.0.0.1) QMgr(xxxxx_INWARD)

AMQ5534: User ID 'mqm' authentication failed

EXPLANATION:
The user ID and password supplied by the 'WebSphere MQ Client for Java' program
could not be authenticated. 
Additional information: 'N/A'.
ACTION:
Ensure that the correct user ID and password are provided by the application.
Ensure that the authentication repository is correctly configured. Look at
previous error messages for any additional information.
----- amqzfuca.c : 4486 -------------------------------------------------------
04/27/2018 07:52:35 PM - Process(29498.16) User(mqm) Program(amqzlaa0)
                    Host(JPRIPAYMENTMQ2) Installation(Installation2)
                    VRMF(9.0.0.1) QMgr(xxxxx_INWARD)

AMQ5542: The failed authentication check was caused by the queue manager
CONNAUTH CHCKCLNT(OPTIONAL) configuration.

EXPLANATION:
The user ID 'mqm' and its password were checked because the queue manager
connection authority (CONNAUTH) configuration refers to an authentication
information (AUTHINFO) object named 'SYSTEM.DEFAULT.AUTHINFO.IDPWOS' with
CHCKCLNT(OPTIONAL). 

This message accompanies a previous error to clarify the reason for the user ID
and password check.
ACTION:
Refer to the previous error for more information. 

Ensure that a password is specified by the client application and that the
password is correct for the user ID. The authentication configuration of the
queue manager connection determines the user ID repository. For example, the
local operating system user database or an LDAP server. 

If the CHCKCLNT setting is OPTIONAL, the authentication check can be avoided by
not passing a user ID across the channel. For example, by omitting the MQCSP
structure from the client MQCONNX API call. 

To avoid the authentication check, you can amend the authentication
configuration of the queue manager connection, but you should generally not
allow unauthenticated remote access.
-------------------------------------------------------------------------------
04/27/2018 07:52:36 PM - Process(18265.105) User(xxx) Program(amqrmppa)
                    Host(xxxxx) Installation(Installation2)
                    VRMF(9.0.0.1) QMgr(xxxxx_INWARD)

AMQ9557: Queue Manager User ID initialization failed for 'mqm'.

EXPLANATION:
The call to initialize the User ID 'mqm' failed with CompCode 2 and Reason
2035. If an MQCSP block was used, the User ID in the MQCSP block was 'mqm'.
ACTION:
Correct the error and try again.
----- cmqxrsrv.c : 2362 -------------------------------------------------------

在此之后,我使用以下命令在队列管理器级别和队列级别向“mqm”用户提供了权限,但我们仍然面临同样的错误。

setmqaut -m queue manager name -t qmgr -p mqm +connect & 
setmqaut -m queue manager name -n queue name -t queue -p mqm user name +all

任何人都可以帮助解决这个问题

@Morag Hughson:- 如何在队列管理器级别关闭用户名和密码

@Morag Hughson:- 任何关闭用户名和密码的命令请分享解决此问题的命令。

@JoshMC:- 如果我将其关闭,这是一个很好的做法,或者是否有任何其他选项可以从队列管理器/应用程序端解决此问题?

@Hello all,我被告知应用程序放置消息而不提及任何用户 ID 和密码。之后我的应用程序能够访问所有队列管理器。 问题得到解决。感谢大家帮助这个问题。

【问题讨论】:

  • 错误很明显你有 chkclnt 可选。使用此设置,如果发送密码,则密码必须有效并且能够根据 qmgr connauth 属性中指定的 authinfo 对象的配置方式进行验证。
  • 你想要完成什么?如果您将其关闭,那么任何有权访问您的网络的人都将拥有完整的管理员权限。
  • Morag 提供了 2 个选项,最好的一个是发送正确的密码并确保将 mq 配置为进行身份验证。 Roger 也有很好的建议,你为什么将应用程序作为 mqm 运行?它是一个管理工具吗?如果不是,则不需要以 mqm 权限运行。

标签: ibm-mq


【解决方案1】:

队列管理器错误消息准确地告诉您问题所在。首先它说:-

AMQ5534: User ID 'mqm' authentication failed

EXPLANATION:
The user ID and password supplied by the 'WebSphere MQ Client for Java' program
could not be authenticated. 

因此,试图通过客户端连接的 Java 应用程序正在发送“mqm”作为用户 ID 和错误密码(或者可能根本没有密码)。

队列管理器正在检查密码。第二条错误消息告诉您为什么要检查它。

AMQ5542: The failed authentication check was caused by the queue manager
CONNAUTH CHCKCLNT(OPTIONAL) configuration.

EXPLANATION:
The user ID 'mqm' and its password were checked because the queue manager
connection authority (CONNAUTH) configuration refers to an authentication
information (AUTHINFO) object named 'SYSTEM.DEFAULT.AUTHINFO.IDPWOS' with
CHCKCLNT(OPTIONAL). 

第二条错误消息中描述的配置默认存在于您的队列管理器中。

你有两个选择。

  1. 发送正确的密码以与您的 Java 应用程序上的“mqm”用户 ID 一起使用。
  2. 选择在队列管理器上关闭用户 ID 和密码检查。

【讨论】:

  • ,我们可以编辑 MQIVP.java 文件,它位于以下安装路径:/opt/mqm/samp/wmqjava/samples/ 如果是,那么我应该在行中添加用户名和密码 == => 私有字符串用户 = null;私有字符串密码 = null;
【解决方案2】:

首先,除了 MQAdmins 和那些在“mqm”帐户下运行的 MQ 服务之外,任何应用程序都不应使用“mqm”帐户。常规业务应用程序永远不应该使用“mqm”帐户。这是一个巨大的安全风险,违反了 IBM 的 MQ 最佳实践。

其次,“mqm”账户已经拥有一切的完全权限。

setmqaut -m queue manager name -t qmgr -p mqm +connect & 
setmqaut -m queue manager name -n queue name -t queue -p mqm +all

您正在尝试向已拥有完全权限的 UserId 授予权限。

第三,通过执行这些命令,您可能会弄乱队列管理器。

第四,错误消息与授权无关,但正如 JoshMc 指出的那样,它与身份验证有关。 setmqaut 命令用于授权(即权限)。

第五,在运行队列管理器(或使用 MS AD)的服务器上创建用户 ID 和密码,并在应用程序连接到队列管理器时提供这些凭据。注意:您需要使用 setmqaut 命令授予新的 UserId 访问队列管理器和队列的权限。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-06-28
    • 2021-01-15
    • 1970-01-01
    • 2017-03-31
    • 1970-01-01
    • 2023-04-05
    • 1970-01-01
    相关资源
    最近更新 更多