java - DetailedJMSSecurityException while trying to access queue in IBM MQ -
java - DetailedJMSSecurityException while trying to access queue in IBM MQ -
here problem.
i using trial version of ibm mq v7.1
. have created queue manager myqm
, channel my_svrconn
mca user id abc
. have provided user abc
access myqm
. trying set message queue q1
. while getting queue connection getting below exception.
com.ibm.msg.client.jms.detailedjmssecurityexception: jmswmq2013: security authentication not valid supplied queuemanager 'myqm' connection mode 'client' , host name '(1500)'. please check if supplied username , password right on queuemanager connecting.
i have used below command allow user abc access myqm
.
[mqm@localhost ~]$ setmqaut -m myqm -t qmgr -p abc +connect setmqaut command completed successfully.
here java program
public class mqput { public static void main(string[] args) { sendmsg("sample message"); } public static void sendmsg(string msg) { mqqueueconnectionfactory connectionfactory = null; queueconnection queueconn = null; queuesession queuesession = null; queuesender queuesender = null; textmessage message = null; seek { connectionfactory = new mqqueueconnectionfactory(); connectionfactory.sethostname(<mq server ip>); connectionfactory.setport(1500); connectionfactory.settransporttype(wmqconstants.wmq_client_nonjms_mq); connectionfactory.setqueuemanager("myqm"); connectionfactory.setchannel("my_svrconn"); queueconn = connectionfactory.createqueueconnection("abc","password"); queuesession = queueconn.createqueuesession(false, session.auto_acknowledge); queuesender = queuesession.createsender(queuesession.createqueue("q")); queuesender.setdeliverymode(deliverymode.non_persistent); message = queuesession.createtextmessage(msg); queuesender.send(message); queueconn.close(); } grab (exception je) { je.printstacktrace(); } } }
i have tried websphere 7, configuring jms q connection mill without user id: mqrc_not_authorized, still problem persist. not getting doing wrong. help appreciated.
edit
user abc not part of mqm group
have set chlauth (channel authentication) user on svrconn channel? channel authentication new mq 7.1 onwards. password validation available mq 8 only. need allow remote connections client ip on qmgr svrconn channel.
try in mqsc console set chlauth(my_svrconn) type(addressmap) address(ip of client machine) usersrc(channel)
if doesnt work, check qmgr log. should causing 2035. technote found here http://www-01.ibm.com/support/docview.wss?uid=swg21577137 morag's useful blog https://www.ibm.com/developerworks/community/blogs/aimsupport/entry/blocked_by_chlauth_why?lang=en
java websphere-mq
Comments
Post a Comment