Search code examples
javajmswebsphereibm-mq

How can i add this user to allowed to put messages to the queue manager from a JMS application


Guys i have a JMS application that has a purpose of sending messages to the Queue manager QM1on local queue DEV.QUEUE.1

This is the set of variables i have.

        private static final String HOST = "34.140.229.148"; // Host name or IP address
    private static final int PORT = 1414; // Listener port for your queue manager
    private static final String CHANNEL = "DEV.APP.SVRCONN"; // Channel name
    private static final String QMGR = "QM1"; // Queue manager name
    private static final String MQ_APP_USER = "admin"; // User name that application uses to  connect to MQ
    private static final String MQ_APP_PASSWORD = "8ATf5a3e4LP8awHpJmm85knh"; //    Password that the application uses to connect to MQ
    private static final String QUEUE_NAME = "DEV.QUEUE.1"; // Queue that the application uses to put and get messages to and from

I think these declarations above are fine, because when i run the JMS application i get an error that states that indeed a connection was made but it cut prematurely due to authorization issues. When i analyse it myself i think i dont have permissions to put any messages(just my personal conclusion)

This is the error i get

error i get

and here is my webconfigurator console, for some weird reason i cant grant the user admin rights

enter image description here

I tried granting the user rights but the controls are disabled


Solution

  • If you are working with the IBM MQ Advanced for Developers as a container image, or following the learn-mq series of tutorials, then the queue manager will be configured with a default developer configuration. This includes a security policy permitting the app user to use the DEV.APP.SVRCONN channel for messaging and the admin user to use the DEV.ADMIN.SVRCONN channel as well as the IBM MQ Console.

    In this case, the config suggests the user admin is attempting to connect to the queue manager via the DEV.APP.SVRCONN channel which is resulting in a 2035. Switching to the app user for messaging work should resolve the problem and avoid modifying the default developer config for testing.