Skip to content

AMQ9557E: Queue Manager User ID initialization failed for 'worker' #104

Open
@mohammadrsh

Description

@mohammadrsh

Hello, I am using this implementation in our JmsConfig file:

@Bean
    fun mqQueueConnectionFactory(): MQQueueConnectionFactory {
        logger.info("Try to initialise jms template ...")
        val mqQueueConnectionFactory = MQQueueConnectionFactory().apply {
            queueManager = properties.queueManager
            hostName = properties.hostName
            transportType = WMQConstants.WMQ_CM_CLIENT
            channel = properties.channel
            port = properties.port
            appName = properties.applicationName
            setStringProperty(WMQConstants.USERID, properties.user)
            setStringProperty(WMQConstants.PASSWORD, properties.password)
        }
        logger.info("Finished initialisation of jms template ...")
        return mqQueueConnectionFactory
    }

    @Bean
    @Primary
    fun cachingConnectionFactory(mqQueueConnectionFactory: MQQueueConnectionFactory): CachingConnectionFactory =
        CachingConnectionFactory().apply {
            targetConnectionFactory = mqQueueConnectionFactory
            isCacheConsumers = false
            isCacheProducers = false
            sessionCacheSize = 500
        }

    @Bean
    fun jmsOperations(cachingConnectionFactory: CachingConnectionFactory): JmsOperations =
        JmsTemplate(cachingConnectionFactory).apply {
            receiveTimeout = 20000
        }

    @Bean
    fun jmsListenerContainerFactory(
        errorHandler: JmsErrorHandler,
        cachingConnectionFactory: CachingConnectionFactory
    ): DefaultJmsListenerContainerFactory? =
        DefaultJmsListenerContainerFactory().apply {
            setConnectionFactory(cachingConnectionFactory)
            setErrorHandler(errorHandler)
        }

Every property is set correctly from application.yml, the issue I have is that the connectionFactory trying to connect with a different user in the header as I see in the log here:

----- cmqxrsrv.c : 7795 -------------------------------------------------------
12/13/2023 08:18:58 AM - Process(42448.58374) User(mqm) Program(amqrmppa)
                    Host() Installation(Installation1)
                    VRMF(9.3.0.6) QMgr(QM1)
                    Time(2023-12-13T07:18:58.711Z)
                    ArithInsert1(2) ArithInsert2(2035)
                    CommentInsert1(worker)
                    CommentInsert2(admin)
                    CommentInsert3(worker)
                   
AMQ9557E: Queue Manager User ID initialization failed for 'worker'.

EXPLANATION:
The call to initialize the User ID 'worker' failed with CompCode 2 and Reason
2035. If an MQCSP block was used, the User ID in the MQCSP block was
'admin'. If a userID flow was used, the User ID in the UID header was
'worker' and any CHLAUTH rules applied prior to user adoption were evaluated
case-sensitively against this value.
ACTION:
Correct the error and try again.

I don't know from where we see this user 'worker' in the header, the only user we use in config file is admin. Can you help with that to see if it's a client issue or related to CHLAUTH rules on IBM MQ Server.

  • ibmmq-jms-spring versions 2.7.2
  • Java version 17

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions