I want to create a queue manager and queue on a WebSphere MQ server, and I want to do two things 1) access the queue and queue manager using WMQ Explorer from the client window 2) write a stand-alone Java application that starts in the client window and places and receives message from the queue.
However, I get exceptions for authentication. Please let me know what I am doing wrong?
Linux server box:
I have installed WebSphere MQ v7.1
QM_TEST
queue QM_TEST
created ( crtmqm
, strmqm
commands)
A local Q_TEST
queue has been Q_TEST
( runmqsc
and define qlocal
)
The channel SVRCONN ( DEFINE CHANNEL (TEST_CHANNEL) CHLTYPE (SVRCONN) TRPTYPE (TCP)
) is DEFINE CHANNEL (TEST_CHANNEL) CHLTYPE (SVRCONN) TRPTYPE (TCP)
the listener started ( runmqlsr -t tcp -m QM_TEST -p 1414
)
Linux Client Box:
I tried to show / hide the queue manager with the host name, ip address, queue manager name and channel name; However, I get the following error:
Access not permitted. You are not authorized to perform this operation. (AMQ4036) Severity: 10 (Warning) Explanation: The queue manager security mechanism has indicated that the userid associated with this request is not authorized to access the object.
Tried to access the queue manager and queues using Java code, underlined below:
public void sendMail(Mail mail) { MQConnectionFactory cf = new MQQueueConnectionFactory(); Connection conn = null; try {
However, I get the following error:
An error occurred: JMSWMQ2013: Security authentication is not valid which was provided for QueueManager 'QM_TEST' with the connection mode "Client" and the host name "hostname (1414)".
You can help? How to pass security authentication information? For now, this is normal if I can disable security. Just need to make it work?
Let me know if I need to provide more information.
UPDATE:
I created the user "mq-user" linux (user group mq-users). CHLAUTH is enabled (default). After creating the QM_TEST queue manager (using sudo mqm), I again ran the following mqsc commands using sudo mqm:
DEFINE QLOCAL(TEST_QUEUE) SET AUTHREC PROFILE('TEST_QUEUE') OBJTYPE(QUEUE) PRINCIPAL('mq-user') AUTHADD(PUT,GET) SET AUTHREC OBJTYPE(QMGR) PRINCIPAL('mq-user') AUTHADD(CONNECT) DEFINE CHANNEL (TEST_CHANNEL) CHLTYPE (SVRCONN) TRPTYPE (TCP) SET CHLAUTH(TEST_CHANNEL) TYPE(ADDRESSMAP) ADDRESS('xxx.xx.xxx.*') MCAUSER('mq-user') DEFINE LISTENER (TEST_LISTENER) TRPTYPE (TCP) CONTROL (QMGR) PORT (1414) START LISTENER (TEST_LISTENER)
I still get AMQ4036 access to an invalid error. Keep in mind that I am referring to the queue and queue manager from a third remote computer (client computer) registered as a third user. However, I understand that I can pass the credentials to "mq-user". I'm sorry that there are no clear step-by-step instructions, WebShere MQ 71. The info center is not enough for me.
What is still missing here?