1 Reply Latest reply on Apr 27, 2017 11:36 AM by Justin Bertram

    MQ issue

    Venkatesh Uppari Newbie

      I am deploying .EAR file in my localhost which has configuration for WMQ resource adapter in standalone.xml as below (which is working successfully in case of .WAR file).

       

      <subsystem xmlns="urn:jboss:domain:resource-adapters:2.0">
                  <resource-adapters>
                      <resource-adapter id="wmq.jmsra.rar">
                          <module slot="main" id="com.ibm.wmq.jmsra"/>
                          <transaction-support>XATransaction</transaction-support>
                          <connection-definitions>
                              <connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:/MQQueueConnectionFactory" enabled="true" pool-name="MQQueueConnectionFactory">
                                  <config-property name="hostName">
                                      **prsl3mqm01.intra.******.com
                                  </config-property>
                                  <config-property name="password">
                                      password****
                                  </config-property>
                                  <config-property name="queueManager">
                                      SQ*T**88
                                  </config-property>
                                  <config-property name="port">
                                      1414
                                  </config-property>
                                  <config-property name="channel">
                                      APP.SVRCONN
                                  </config-property>
                                  <config-property name="transportType">
                                      CLIENT
                                  </config-property>
                                  <config-property name="username">
                                      userid
                                  </config-property>
                                  <security>
                                      <application/>
                                  </security>
                                  <validation>
                                      <background-validation>false</background-validation>
                                  </validation>
                              </connection-definition>
                          </connection-definitions>
                          <admin-objects>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/workerQueue1" pool-name="WSMQWorkerQueue1">
                                  <config-property name="baseQueueName">
                                      APP.WORKER.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/workerQueue2" pool-name="WSMQWorkerQueue2">
                                  <config-property name="baseQueueName">
                                      APP.WORKER.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/ERRORQ" pool-name="WSMQLocalERROR">
                                  <config-property name="baseQueueName">
                                      APP.ERROR.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/exceptionQueue" pool-name="WSMQExceptionQueue">
                                  <config-property name="baseQueueName">
                                      APP.EXCEPTION.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/RequestQueue" pool-name="WSMQRequestQueue">
                                  <config-property name="baseQueueName">
                                      APP.LOCALREQUEST.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/RequestQueue2" pool-name="WSMQRequestQueue2">
                                  <config-property name="baseQueueName">
                                      APP.PREPAID.REQ.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/NotificationServiceQueue" pool-name="WSMQNotificationServiceQueue">
                                  <config-property name="baseQueueName">
                                      APP.PLATFORM.REQUEST.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/BalanceResponseQueue" pool-name="WSMQBalanceResponseQueue">
                                  <config-property name="baseQueueName">
                                      APP.REPLY.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/ResponseQueue" pool-name="WSMQResponseQueue">
                                  <config-property name="baseQueueName">
                                      APP.REPLY.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/WalletRequestQueue" pool-name="WSMQSLWalletRequestQueue">
                                  <config-property name="baseQueueName">
                                      APP.WALLET.REQUEST.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/MResponseQueue2" pool-name="WSMQMResponseQueue2">
                                  <config-property name="baseQueueName">
                                      APP.REPLY.***
                                  </config-property>
                              </admin-object>
                              <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/wsmq/workerQueue3" pool-name="WSMQWorkerQueue3">
                                  <config-property name="baseQueueName">
                                      APP.WORKER.***
                                  </config-property>
                              </admin-object>
                          </admin-objects>
                      </resource-adapter>
                  </resource-adapters>
              </subsystem>
      

       

       

      On starting of the server I am getting below error. (why I am getting cannot connect to localhost when I have already provided remote host name)

       

      Caused by: com.ibm.msg.client.jms.DetailedIllegalStateException: JMSWMQ0018: Failed to connect to queue manager '' with connection mode 'Client' and host name 'localhost(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:489)

        at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:215)

        at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:413)

        at com.ibm.msg.client.wmq.internal.WMQXAConnection.<init>(WMQXAConnection.java:67)

        at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:188)

        at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:7814)

        at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createProviderXAConnection(WMQXAConnectionFactory.java:98)

        at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createXAConnectionInternal(JmsConnectionFactoryImpl.java:347)

        at com.ibm.mq.jms.MQXAConnectionFactory.createXAConnection(MQXAConnectionFactory.java:131)

        at com.ibm.mq.connector.inbound.ConnectionHandler.allocateConnection(ConnectionHandler.java:268)

        ... 13 more

      Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2538' ('MQRC_HOST_NOT_AVAILABLE').

        at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:203)

        ... 21 more

      Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2538;AMQ9204: Connection to host 'localhost(1414)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2538;AMQ9213: A communications error for 'TCP' occurred. [1=java.net.ConnectException[Connection refused: connect],3=connnectUsingLocalAddress,4=TCP,5=Socket.connect]],3=localhost(1414),5=RemoteTCPConnection.connnectUsingLocalAddress]

        at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:2282)

        at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1294)

        at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiConnect(InterceptedJmqiImpl.java:376)

        at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiConnect(ESEJMQI.java:560)

        at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:346)

        ... 20 more

      Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2538;AMQ9213: A communications error for 'TCP' occurred. [1=java.net.ConnectException[Connection refused: connect],3=connnectUsingLocalAddress,4=TCP,5=Socket.connect]

        at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.connnectUsingLocalAddress(RemoteTCPConnection.java:838)

        at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.protocolConnect(RemoteTCPConnection.java:1277)

        at com.ibm.mq.jmqi.remote.impl.RemoteConnection.connect(RemoteConnection.java:863)

        at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSessionFromNewConnection(RemoteConnectionSpecification.java:409)

        at com.ibm.mq.jmqi.remote.impl.RemoteConnectionSpecification.getSession(RemoteConnectionSpecification.java:305)

        at com.ibm.mq.jmqi.remote.impl.RemoteConnectionPool.getSession(RemoteConnectionPool.java:146)

        at com.ibm.mq.jmqi.remote.api.RemoteFAP.jmqiConnect(RemoteFAP.java:1730)

        ... 24 more

      Caused by: java.net.ConnectException: Connection refused: connect

        at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method) [rt.jar:1.8.0_111]

        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) [rt.jar:1.8.0_111]

        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) [rt.jar:1.8.0_111]

        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) [rt.jar:1.8.0_111]

        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) [rt.jar:1.8.0_111]

        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) [rt.jar:1.8.0_111]

        at java.net.Socket.connect(Socket.java:589) [rt.jar:1.8.0_111]

        at java.net.Socket.connect(Socket.java:538) [rt.jar:1.8.0_111]

        at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$5.run(RemoteTCPConnection.java:823)

        at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection$5.run(RemoteTCPConnection.java:814)

        at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_111]

        at com.ibm.mq.jmqi.remote.impl.RemoteTCPConnection.connnectUsingLocalAddress(RemoteTCPConnection.java:814)

        ... 30 more