0

I am using https://github.com/ibm-messaging/mq-container to start IBM MQ on local dev machine. Here is my docker-compose:

version: '2'

services:
  ibmmq:
    image: icr.io/ibm-messaging/mq:9.3.2.1-r1
    volumes:
      - ./config.mqsc:/etc/mqm/config.mqsc
    environment:
      - LICENSE=accept
      - MQ_QMGR_NAME=QM1
      - MQ_ADMIN_PASSWORD=passw0rd
    ports:
      - 1414:1414
      - 9443:9443

Now, I am trying to connect to it using JMSToolBox without success: enter image description here enter image description here enter image description here enter image description here

Logs from mq-container:

ibmmq-ibmmq-1  | 2023-05-16T08:19:51.019Z AMQ9722W: Plain text communication is enabled.
ibmmq-ibmmq-1  | 2023-05-16T08:19:51.042Z AMQ5806I: Queued Publish/Subscribe Daemon started for queue manager QM1. [CommentInsert1(QM1)]
ibmmq-ibmmq-1  | 2023-05-16T08:19:56.432Z AMQ8077W: Entity 'admin' has insufficient authority to access object QM1 [qmgr]. [CommentInsert1(admin), CommentInsert2(QM1 [qmgr]), CommentInsert3(connect)]
ibmmq-ibmmq-1  | 2023-05-16T08:19:56.432Z AMQ9557E: Queue Manager User ID initialization failed for 'mqm'. [ArithInsert1(2), ArithInsert2(2035), CommentInsert1(mqm), CommentInsert2(admin), CommentInsert3(admin)]

What I am doing wrong? How to send a message to MQ using JMSToolBox?

Note: I took those settings from default Spring Boot configuration https://github.com/ibm-messaging/mq-jms-spring/blob/master/mq-jms-spring-boot-starter/src/main/java/com/ibm/mq/spring/boot/MQConfigurationProperties.java because my @JmsListener (which I want to test sending a message to it) connects to this queue perfectly fine.

2 Answers2

1

As mentionned before, you need to useDEV.APP.SVRCONNchannel

Any reason you are using com.ibm.mq.cfg.useIBMCipherMappings=true?

For my own connection, MQ v9.2.4 is deployed in OpenShift and I use in JTB:

channel: DEV.APP.SVRCONN
queueManager: <MY QM>
com.ibm.mq.cfg.useIBMCipherMappings: false
sslCipherSuite: TLS_RSA_WITH_AES_256_CBC_SHA256

At the console, give some rights to the user used by JTB ("app"):

-> Manage > Queues    
-> SYSTEM.ADMIN.COMMAND.QUEUE, View Configuration > Security    
   -> Add+, add user "app" +Admin acces    
-> SYSTEM.DEFAULT.MODEL.QUEUE
   -> Add+, add user "app" +Admin acces

(I'm the author of JMSToolBox)

titou10
  • 2,814
  • 1
  • 19
  • 42
  • Spring Boot by default uses com.ibm.mq.cfg.useIBMCipherMappings=true and it connects fine, see defaults in https://github.com/ibm-messaging/mq-jms-spring/blob/master/mq-jms-spring-boot-starter/src/main/java/com/ibm/mq/spring/boot/MQConfigurationProperties.java. Never tried to use app user before, I will try to follow your suggestion, meanwhile I ended up installing MQ Explorer, it connects fine under admin user – Andrey_Saksonov Jun 02 '23 at 08:05
0

You have an authorization issue, and not an authentication one. The connection seems to be fine, and if you are performing admin actions the connection settings are ok.

If you are trying to put / publish a message then you will need to use app and not admin and connect to DEV.APP.SVRCONN

chughts
  • 4,210
  • 2
  • 14
  • 27
  • Hello, I have tried to connect with JMSToolBox with app/DEV.APP.SVRCONN with no luck (same 2035 error - tbh, I did not expect that app user will be able to browse list of queues) – Andrey_Saksonov May 17 '23 at 12:08