Sunday, September 11, 2011

How To Allow Applications to connect to MQ6

On MQ v6, MCAUSER in SYSTEM.DEF.SVRCONN is blank by default, hence this would not allow anyone to connect to it.

This is an example of the error from the application when it couldn't connect even though LDAP setup is correct. Basic network connectivity test by telnet is OK.

2008-04-06 11:11:10,452 [main] ERROR - Hit exception at init JMSSubscriber, System reconnecting after [10] seconds .... com.psa.infra.messaging.PMException at com.psa.infra.messaging.PMSessionFactory.createConnection(PMSessionFactory.java:260) at com.psa.infra.messaging.PMSessionFactory.getConnection(PMSessionFactory.java:168) at com.psa.infra.messaging.PMSession.getPMJMSSession(PMSession.java:216) at com.psa.infra.messaging.PMSession.createHandler(PMSession.java:101) at com.psa.infra.messaging.PMSession.createHandler(PMSession.java:58) at com.psa.common.utility.jms.subscriber.JMSSubscriber.init(JMSSubscriber.java:95) at com.psa.common.utility.core.mesg.MessageTransfer.process(MessageTransfer.java:94) at com.psa.common.utility.core.mesg.MessageTransfer.main(MessageTransfer.java:160) Caused by: javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'png1comm2_ica:PSA.QUEUE.MANAGER' at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:434) at com.ibm.mq.jms.MQQueueConnection.createQM(MQQueueConnection.java:478) at com.ibm.mq.jms.MQQueueConnection.(MQQueueConnection.java:182) at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:166) at com.psa.infra.messaging.PMSessionFactory.createConnection(PMSessionFactory.java:234) ... 7 more 2008-04-06 11:11:10,453 [main] INFO - -- Close JMS subscriber handler

To allow applications to connect, enter the following code after getting in 'runmqsc'.

> alter CHANNEL ('SYSTEM.DEF.SVRCONN') CHLTYPE(SVRCONN) MCAUSER('mqm')

No comments: