Topic
4 replies Latest Post - ‏2013-02-01T11:37:38Z by SystemAdmin
SystemAdmin
SystemAdmin
8524 Posts
ACCEPTED ANSWER

Pinned topic Error AMQ9248 with MQ 7.0.1.9

‏2013-01-29T11:11:17Z |
Hi Everyone,

I am using WebSphere MQ v7.0.1.9 in my application. On connecting with the MQ, i am frequently getting the following exception:

ERROR com.steria.testcenter.bl.driver.conf.impl.QueueConfiguration - Error occured in method createConnection():
com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018: Failed to connect to queue manager 'QM_L55' with connection mode 'Client' and host name 'ipaddress(1414)'. Check the queue manager is started and if running in client mode, check there is a listener running Please see the linked exception for more information.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:496)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:236)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:452)
at com.ibm.msg.client.wmq.internal.WMQXAConnection.<init>(WMQXAConnection.java:70)
at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:190)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6583)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:295)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6232)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:115)
at com.steria.testcenter.bl.driver.conf.impl.QueueConfiguration.createConnection(QueueConfiguration.java:98)
at com.steria.testcenter.bl.driver.conf.impl.QueueConfiguration.getConnection(QueueConfiguration.java:78)
at com.steria.testcenter.bl.driver.factory.QueueActionDriverFactory.<init>(QueueActionDriverFactory.java:43)
at com.steria.testcenter.bl.driver.factory.ActionDriverBuilder.getActionDriver(ActionDriverBuilder.java:58)
at com.steria.testcenter.bl.execution.StepRunner.getDriverForStep(StepRunner.java:235)
at com.steria.testcenter.bl.execution.StepRunner.execute(StepRunner.java:79)
at com.steria.testcenter.bl.execution.StepRunner.runStep(StepRunner.java:68)
at com.steria.testcenter.bl.execution.SingleTestCaseRunner.executeTestCase(SingleTestCaseRunner.java:379)
at com.steria.testcenter.bl.execution.SingleTestCaseRunner.execute(SingleTestCaseRunner.java:287)
at com.steria.testcenter.bl.execution.SingleTestCaseRunner.run(SingleTestCaseRunner.java:102)
at com.steria.testcenter.cl.web.bean.TBQADetailedExecutorBean.executeTestCase(TBQADetailedExecutorBean.java:105)
at com.steria.testcenter.cl.web.bean.TBQADetailedExecutorBean.run(TBQADetailedExecutorBean.java:151)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2059' ('MQRC_Q_MGR_NOT_AVAILABLE').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:223)
... 20 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2059;AMQ9204: Connection to host 'ipaddress(1414)' rejected [1=com ibm mq jmqi JmqiException[CC=2;RC=2059;AMQ9248: The program could not bind to a 'TCP' socket [1=Socket bind,3=TCP,4=1099,5=java net BindExceptionCannot assign requested address]]],3=ipaddress(1414),5=RemoteTCPConnection connnectUsingLocalAddress
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:2072)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1286)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:367)
... 19 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2059;AMQ9248: The program could not bind to a 'TCP' socket. [1=Socket.bind,3=TCP,4=1,5=java.net.BindExceptionAddress already in use]
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.connnectUsingLocalAddress(RemoteTCPConnection.java:746)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1003)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnection.connect(RemoteConnection.java:1162)
at com.ibm.mq.jmqi.remote.internal.system.RemoteConnectionPool.getConnection(RemoteConnectionPool.java:353)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1660)
... 21 more
Caused by: java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383)
at java.net.Socket.bind(Socket.java:577)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.connnectUsingLocalAddress(RemoteTCPConnection.java:651)
... 25 more

1) this problem never occurred while usng WebSphere MQ 6.x. It has started to occur only when we migrated to MQ 7.0.x
3) We also tried downgrading to MQ 7.0.1.8 and 7.0.1.7, but the error did not get resolved
2) This error get resolved sometimes (for a very short duration) on bouncing the MQ server

Please help !!! (Kindly feel free to ask for more information)
Updated on 2013-02-01T11:37:38Z at 2013-02-01T11:37:38Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    8524 Posts
    ACCEPTED ANSWER

    Re: Error AMQ9248 with MQ 7.0.1.9

    ‏2013-01-29T12:09:44Z  in response to SystemAdmin
    Can you provide full details of your client-connection definition? I am specifically interested in the LocalAddress field. You appear to have a conflict where the Local Address is already in use when you try to connect.

    Cheers
    Morag
    • SystemAdmin
      SystemAdmin
      8524 Posts
      ACCEPTED ANSWER

      Re: Error AMQ9248 with MQ 7.0.1.9

      ‏2013-01-30T08:48:00Z  in response to SystemAdmin
      Hi Morag,

      Thanks for your time.

      We have created a QCF using JMS Admin tool with following details:

      ASYNCEXCEPTION(ALL)
      CCSID(819)
      CHANNEL(SYSTEM.DEF.SVRCONN)
      CLIENTRECONNECTOPTIONS(ASDEF)
      CLIENTRECONNECTTIMEOUT(1800)
      COMPHDR(NONE )
      COMPMSG(NONE )
      CONNECTIONNAMELIST(ipaddress(1414))
      CONNOPT(STANDARD)
      FAILIFQUIESCE(YES)
      HOSTNAME(ipaddress.de)
      LOCALADDRESS()
      MAPNAMESTYLE(STANDARD)
      MSGBATCHSZ(10)
      MSGRETENTION(YES)
      POLLINGINT(5000)
      PORT(1414)
      PROVIDERVERSION(UNSPECIFIED)
      QMANAGER(QM1)
      RESCANINT(5000)
      SENDCHECKCOUNT(0)
      SHARECONVALLOWED(YES)
      SSLFIPSREQUIRED(NO)
      SSLRESETCOUNT(0)
      SYNCPOINTALLGETS(NO)
      TARGCLIENTMATCHING(YES)
      TEMPMODEL(SYSTEM.DEFAULT.MODEL.QUEUE)
      TEMPQPREFIX()
      TRANSPORT(CLIENT)
      USECONNPOOLING(YES)
      VERSION(7)
      WILDCARDFORMAT(TOPIC_ONLY)

      Further, this is used to create a binding file which has been mapped in WebLogic (v10.0.3) with a jndi name. Further, in my application, which runs on Tomcat, we have following Java code that connects to the MQ:

      Properties props = new Properties();
      props.put(Context.PROVIDER_URL, "t3://weblogic_server_name:port_no"); // address of weblogic on which we lookup
      props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
      props.put(Context.SECURITY_PRINCIPAL, "admin"); // admin user of weblogic
      props.put(Context.SECURITY_CREDENTIALS, "admin"); // password of weblogic admin
      getInitialContext(props);
      connectionFactory = (QueueConnectionFactory)initCtx.lookup("jndi_name_of_QCF");
      connection = connectionFactory.createQueueConnection(); // this is the line which "sometimes" throws the exception

      Here, I have no clue what is the value of LocalAddress at runtime (I also cannot debug this code, as I do not have the source code for IBM libraries).

      Hope this helps.

      Thanks.
    • SystemAdmin
      SystemAdmin
      8524 Posts
      ACCEPTED ANSWER

      Re: Error AMQ9248 with MQ 7.0.1.9

      ‏2013-02-01T11:37:38Z  in response to SystemAdmin
      Hello,
      I am from Ankur's team only.
      ClientCOnnection Channel has LOCLADDR field as blank.

      2 : display channel(SYSTEM.DEF.CLNTCONN)
      AMQ8414: Display Channel details.
      CHANNEL(SYSTEM.DEF.CLNTCONN) CHLTYPE(CLNTCONN)
      AFFINITY(PREFERRED) ALTDATE(2012-10-21)
      ALTTIME(14.05.23) CLNTWGHT(0)
      COMPHDR(NONE) COMPMSG(NONE)
      CONNAME( ) DESCR( )
      HBINT(300) KAINT(AUTO)
      LOCLADDR( ) MAXMSGL(4194304)
      MODENAME( ) PASSWORD( )
      QMNAME( ) RCVDATA( )
      RCVEXIT( ) SCYDATA( )
      SCYEXIT( ) SENDDATA( )
      SENDEXIT( ) SHARECNV(10)
      SSLCIPH( ) SSLPEER( )
      TPNAME( ) TRPTYPE(TCP)
      USERID( )
  • SystemAdmin
    SystemAdmin
    8524 Posts
    ACCEPTED ANSWER

    Re: Error AMQ9248 with MQ 7.0.1.9

    ‏2013-01-30T05:32:20Z  in response to SystemAdmin
    Please ensure that the queuemanager 'QM_L55' and it's MQ listener is up and running.

    Thanks
    Ravi