IBM MQ认证

问题描述

尝试连接IBM MQ时出现以下错误。我已经在MQ Explorer中完成了足够的配置,但是仍然出现此错误

**MQ Config:**
        <InputDef name="Order" type="mq">
                <property name="message.flow" value="OrderFlow" />
                 <property name="queue.adapter" value="com.tplus.transform.runtime.external.queueutils.ibmmq.IBMMQAdapter" />
                <property name="queue.ibmmq.manager" value="QM1" />
                <property name="queue.ibmmq.host" value="localhost" />
                <property name="queue.ibmmq.port" value="1414" />
                <property name="queue.ibmmq.channel" value="CH1" />
                <property name="queue.name" value="Q1" />
                <property name="queue.ibmmq.headertype" value="jms" />
            </InputDef>
    
    
       </InputDefs>
    
       <OutputDefs>
    
        <!-- Instantiate a RMIoUtputHandler that is registered in the JNDI with the specified devicename
             The output is written to the specified directory -->
        <OutputDef name="Order" type="rmi">
            <property name="output.device" value="device.order" />
            <property name="output.writer" value="com.tplus.transform.runtime.external.output.mq.QueueOutputDeviceWriterFactory"/>
            <property name="queue.adapter" value="com.tplus.transform.runtime.external.queueutils.ibmmq.IBMMQAdapter" />
            <property name="queue.ibmmq.manager" value="QM1" />
            <property name="queue.ibmmq.host" value="localhost" />
            <property name="queue.ibmmq.port" value="1414" />
            <property name="queue.ibmmq.channel" value="CH1" />
            <property name="queue.name" value="Q2" />
            <property name="queue.ibmmq.headertype" value="jms" />
        </OutputDef>
    

错误日志: log1 log2

解决方法

您是否禁用了队列管理器 QM1 的授权?

试试这个:

为 MQ Explorer 创建连接

runmqsc QM1

define channel(SYSTEM.ADMIN.SVRCONN) chltype(SVRCONN) MCAUSER('mqm')
alter qmgr chlauth(DISABLED)
refresh security

在这些命令之后使用通道 SYSTEM.ADMIN.SVRCONN 而不是 CH1。或者尝试将命令中的SYSTEM.ADMIN.SVRCONN改为CH1。

更改 rfhutil 的访问权限

runmqsc QM1

ALTER AUTHINFO(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) CHCKCLNT(OPTIONAL) 
REFRESH SECURITY TYPE(CONNAUTH)