Need help on IBM MQ - "Error connecting to the JMS AppServer service" - Forum - OpenEdge Development - Progress Community

Need help on IBM MQ - "Error connecting to the JMS AppServer service"

 Forum

Need help on IBM MQ - "Error connecting to the JMS AppServer service"

This question is answered

Hi,

When I am connecting to websphere MQ I got this error message - "Error connecting to the JMS AppServer service".

Please find the attachments for setups and programs are used for testing the IBM MQ.

1. AdminServerPlugins.properties

2. ubroker.properties

3. Testing sample code

4. Sonimq server log.

Other than ubroker and adminserverplugin properties, do I need to any other changes or any setup is required in websphere MQ?

0601.sonicMQ1.server.log

5481.AdminServerPlugins.properties6557.ubroker.propertiesJMSWebsphereMQ.zip

Thanks in advance.

Regards,

Sivarami

All Replies
  • Hi Anand,

    I am unable to attach the files here from my office.

    Thanks,

    Sivarami

  • Hi Sivarami,

    Please follow the below thread to create CCDT file to connect WebSphereMQ remotely.

    https://community.progress.com/community_groups/openedge_development/f/19/t/30343

    Thanks,

    Anand.

  • Hi Anand,

    Thanks.I already gone through this document.

    I am facing issue with IBM MQ while connecting the remote MQ. I have followed the below steps to create the remote MQ in MQ explorer.

    1. Queue Managers > Add remote queue manager .

    2. It is prompted for the Queue manager, entered RMQ1.

    3. Selected "connect directly" and click on next.

    4. In connection details it is prompted for the IP address, Port and server-connection channel

    5. local host/ip address of system as IP address, port as 1420 and "SYSTEM.ADMIN.SVRCONN" as server-connection channel.

    6. Click on finish, now i have received this error -

    Could not establish a connection to the queue manager - reason 2538. (AMQ4059)

     Could not establish a connection to the queue manager - reason 2538. (AMQ4059)

     Severity: 10 (Warning)

     Explanation: The attempt to connect to the queue manager failed. This could be because the queue manager is incorrectly configured to allow a connection from this system, or the connection has been broken.

     Response: Try the operation again. If the error persists, examine the problem determination information to see if any information has been recorded.

    If I am missing anything please let me know.

    Thanks,

    Sivarami

  • Hi Sivarami,

    Create the JNDI context from MQ Explorer -> JMS Administered Objects -> Add Initial Context -> Select 'File System'. Provide the any directory path and click on 'Finish', it will create the .bindings file under specified directory. Now, create the Client Connections from Channels section. In order to create it follow the steps mentioned in the below thread.

    https://community.progress.com/community_groups/openedge_development/f/19/t/30343

    Thanks,

    Anand.

  • Hi Anand,

    Thanks for your help.

    Now I am able to create connection factory, but I am unable to find channels from connection factory.

    Do I need to create the channels  from Queue Manager? - where I have created the local queue.

    Thanks,

    Sivarami.

  • Hi Sivarami,

    In Order to make remote connection with WebSpherMQ follow the below steps:

    1) Create Connection factory in WebSphereMQ server
    2) Create Client-connection Channel from Channels under Queue Manager (provided the steps to create it in previous conversation)
    3) Create Client Channel Definition Table (CCDT) and it will be located at <WebSphereMQInstallation>\Qmgrs\RemoteQM\@ipcc\AMQCLCHL.TAB
    4) Now, install the WebSphereMQ client on client machine and create .bindings file by providing the location of .TAB file using below commands.


    Syntax:
    InitCtx> DEF CF(<connection_factory_name>) + QMGR(<queue_manager_name>) + TRAN(CLIENT) + CHAN(SYSTEM.DEF.SVRCONN) + HOST(<ServerName>) + PORT(<ServerPort>) + CCDTURL(<location of TAB file>)

    Example:

    InitCtx> DEF CF(RemoteCF) + QMGR(RemoteQM) + TRAN(CLIENT) + CHAN(SYSTEM.DEF.SVRCONN) + HOST(<ServerName>) + PORT(<ServerPort>) + CCDTURL(file:C:/workspace/WMQClient/AMQCLCHL.TAB)

    Once .bindings generated, create AdminObjectFinder.java file and specify the location of .bindings file as value to PROVIDER_URL property along with username and password. We can use the INITIAL_CONTEXT_FACTORY value as "com.sun.jndi.fscontext.RefFSContextFactory". Generate the class file from java and package that class in jar and provide the generated jar file in pluginclasspath and classpath under [PluginPolicy.Progress.SonicMQ].

    Hope this helps!!

    Thanks,

    Anand.

  • Hi Anand,

    Thanks for your help.

    Now I am running the same programs, which are run  for local queue and I am using same queue name for remote Queue also.

    Now I am getting the below error message.

    Please find the sonicmq log.

    S-0001>(Jul 7, 2017 15:12:55:218) 10.242.244.47::sonicMQ1::3620::f9cd250ea34bfa0f:1a15cb38:15d1c38d8b5:-7f97:     Startup Parameters:

       jmsServerName:

       Point-To-Point    

       brokerURL: TestQueueManager

       user:

       password:

       clientID: null

       pingInterval:

       transactedPublish: false

       transactedReceive: false

       singleMessageAck: false

       symbiontAdapter: false

       jmsDomain: true

    S-0001>(Jul 7, 2017 15:12:55:218) S-0001: receive message queue size set to 10

    S-0001>(Jul 7, 2017 15:12:55:219) S-0001: browse message queue size set to 500

    S-0001>(Jul 7, 2017 15:12:55:219) : In SessionContainer()

    S-0001>(Jul 7, 2017 15:12:55:219) : Looking up ConnectionFactory in JNDI Object Store

    S-0001>(Jul 7, 2017 15:12:55:219) : Connection Factory object not found in JNDI Object Store. Creating using jmsProvider.properties file

    S-0001>(Jul 7, 2017 15:12:55:219) : Creating JMS connection factory with Broker URL as [ TestQueueManager ]

    S-0001>(Jul 7, 2017 15:12:55:220) : Setting Queue Manager TestQueueManager on Connection Factory Class com.ibm.mq.jms.MQConnectionFactory

    S-0001>(Jul 7, 2017 15:12:55:220) 10.242.244.47::sonicMQ1::3620::f9cd250ea34bfa0f:1a15cb38:15d1c38d8b5:-7f97: Using connection values: 26,null,true,,true,false,-1,-1,false,0,false,false,,10000,0,30,false,60,0,20,0,,null,null,CTSC00520904801,localhost

    S-0001>(Jul 7, 2017 15:12:55:228) 10.242.244.47::sonicMQ1::3620::f9cd250ea34bfa0f:1a15cb38:15d1c38d8b5:-7f97: A JMS session has been created. (9291)

    Thread-53>(Jul 7, 2017 15:12:55:236) 10.242.244.47::sonicMQ1::3620::f9cd250ea34bfa0f:1a15cb38:15d1c38d8b5:-7f97: getNextMessage(): Client requests next message.

    Thread-51>(Jul 7, 2017 15:12:55:237) 10.242.244.47::sonicMQ1::3620::f9cd250ea34bfa0f:1a15cb38:15d1c38d8b5:-7f97: receive(): Request to receive from: RMQ.

    Thread-51>(Jul 7, 2017 15:12:55:239) 10.242.244.47::sonicMQ1::3620::f9cd250ea34bfa0f:1a15cb38:15d1c38d8b5:-7f97

    com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ1017: non-local MQ queue 'RMQ' not valid for receiving or browsing.

    The MQ queue is not able to be opened, as it is not local to the connected Queue Manager.

    Connect to the Queue Manager for which this MQ Queue resides locally.

    at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:595)

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

    at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:213)

    at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:261)

    at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:153)

    at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.initialize(WMQConsumerShadow.java:1179)

    at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.initialize(WMQSyncConsumerShadow.java:134)

    at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.<init>(WMQMessageConsumer.java:471)

    at com.ibm.msg.client.wmq.internal.WMQSession.createConsumer(WMQSession.java:877)

    at com.ibm.msg.client.jms.internal.JmsSessionImpl.createConsumer(JmsSessionImpl.java:993)

    at com.ibm.msg.client.jms.internal.JmsSessionImpl.createConsumer(JmsSessionImpl.java:1052)

    at com.ibm.mq.jms.MQSession.createConsumer(MQSession.java:439)

    at com.progress.messaging.jms.ListenerCollection.createConsumer(ListenerCollection.java:317)

    at com.progress.messaging.jms.ListenerCollection.createListener(ListenerCollection.java:147)

    at com.progress.messaging.jms.ListenerCollection.createDestinationListener(ListenerCollection.java:127)

    at com.progress.messaging.jms.SessionContainer.receive(SessionContainer.java:795)

    at com.progress.messaging.jms.SessionContainer.receive2(SessionContainer.java:825)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:498)

    at com.progress.javafrom4gl.implementation.MethodHolder.invoke(MethodHolder.java:168)

    at com.progress.javafrom4gl.implementation.RequestExecuter$Request.executeRequest(RequestExecuter.java:264)

    at com.progress.javafrom4gl.implementation.RequestExecuter.executeRequest(RequestExecuter.java:70)

    at com.progress.javafrom4gl.implementation.RequestThread.go(RequestThread.java:63)

    at com.progress.javafrom4gl.implementation.RequestThread.run(RequestThread.java:38)

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

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

    ... 24 more

    Thread-51>(Jul 7, 2017 15:12:57:437) 10.242.244.47::sonicMQ1::3620::f9cd250ea34bfa0f:1a15cb38:15d1c38d8b5:-7f97: start(): Starting message reception.

    Thread-51>(Jul 7, 2017 15:12:57:438) 10.242.244.47::sonicMQ1::3620::f9cd250ea34bfa0f:1a15cb38:15d1c38d8b5:-7f97: start(): Message reception started.

    Thanks,

    Sivarami

  • Hi Anand,

    I have MQ client in other machine (client), Do I need to run the programs from the same machine?

    Currently I have the programs and MQ server in same machine. Could you please guide me how test this?

    As per MQ expert - I can create the local queue and remote queue in the same server, while connecting to the queue i need to provide the Queue name correspondingly.

    If this is the case I am able to test successfully.

    Remote queue basically it will not consume the data it will only produce the data.

    Thanks,

    Sivarami

  • Hi Sivarami,

    We need to run the procedures from Client machine. Also, while connecting to MQ Remotely using JNDI approach we need to provide the connection factory name instead of QueueManager. From the logs it look likes you are using QueueManger name to connect MQ remotely using JNDI approach. To over this issue use the connect factory name.

    Hope this helps!!

    Thanks,

    Anand.

  • Hi Anand,

    Thanks for the correction.

    I have mentioned the connection factory name instead of queue manger, Now I am receiving the attached error messages and I have attached the programs also.

    I have created and connecting to sonic mq adapter in client machine.

    6076.sonicMQ1.server.log3324.consumer.pproducer.p

    Thanks,

    Sivarami

  • Hi Sivarami,

    Thank you for sharing the logs.

    From the logs it looks like you are not using JNDI approach to connect Remote MQ. If you want to use JNDI approach you should place the AdminObjectFinder.jar file in the classpath. I think you current configuration is to use the local QueueManger but not the Remote MQ. Follow the steps that are mentioned in the earlier conversion to connect remote MQ.

    Thanks,

    Anand.

  • Hi Anand,

    Thanks for Quick response.

    My Jar file is in class path. Please find AdminServerPlugins.properties file for class file path and Jar file in my client machine.

    5127.AdminServerPlugins.properties

    7183.AdminObjectFinder.jar

    Thanks,

    Sivarami

  • Hi Sivarami,

    Thank you for sharing the files.

    AdminObjectFinder.jar file doesn't contains any classes. Seems you have not included the classes in the jar file. Please include the classes in the jar.

    Thanks,

    Anand.

  • Hi Anand,

    Thanks for correcting Jar file, do we need to add class file manually?, If yes I am unable to see the file correctly it seems file contains ascii characters/Junk characters in the file.

    I have generated the Jar byusing below commands.

    1. Compile AdminObjectFinder.java (command create AdminObjectFinder.class):

    %DLC%\jdk\bin\javac AdminObjectFinder.java

    2. Pack AdminObjectFinder.class in jar:

    %DLC%\jdk\bin\jar CF2 AdminObjectFinder.jar AdminObjectFinder.class

    Thanks,

    Sivarami

  • Hi Sivarami,

    Follow the below steps to generate the jar file.

    Step 1: compile the java file using following command.
    javac -cp jms.jar:.: -d . AdminObjectFinder.java

    Step 2: Now, generate the jar file with below command.
    jar -cvf AdminObjectFinder.jar jmsfromABL

    Follow the below link as a reference to connect WebSphereMQ remotely.

    https://community.progress.com/community_groups/openedge_development/f/19/t/30343?pi20882=3

    Thanks,

    Anand.