6

I have configured two servers by side, one Active MQ and one WebSphere MQ 8.0, in order to communicate each other I've configured an Apache Camel in the middle, which receives messages from Active MQ and send them to WebSphere. Right now Camel is able to receive messages from Active MQ server, but when it tries to send them to the WebSphere MQ it throws the error:

Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2540;AMQ9204: Connection to host '10.0.0.122(1414)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2540;AMQ9520: Channel not defined remotely. [3=channel.test]],3=10.0.0.122(1414),5=RemoteConnection.analyseErrorSegment]

I am able to connect Camel to the WebSphere QueueManager with a user, but not the the channel that is created, the configuration for the camel side in order to connect to the WebSphere server is:

    <bean id="weblogicConnectionFactory"
       class="com.ibm.mq.jms.MQConnectionFactory">
   <property name="hostName" value="10.0.0.122"/>
   <property name="port" value="1414"/>
   <property name="queueManager" value="TESTQ"/>
   <property name="channel" value="channel.test"/>
   <property name="transportType" value="1"/>
 </bean>

 <bean id="myProxyConnectionFactory" class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
   <property name="targetConnectionFactory" ref="weblogicConnectionFactory"/>
   <property name="username" value="administrator"/>
   <property name="password" value="control123!"/>
  </bean>

 <bean id="weblogicConfig"
       class="org.apache.camel.component.jms.JmsConfiguration">
   <property name="connectionFactory" ref="weblogicConnectionFactory"/>
   <property name="concurrentConsumers" value="10"/>
 </bean>

 <bean id="weblogic"
       class="org.apache.camel.component.jms.JmsComponent">
   <property name="configuration" ref="weblogicConfig"/>
 </bean>

And the way that I've created the Server-Connection channel is by going to the WebSphere MQ Explorer, select queue manager, create new Server-Connection channel, set the appropiate username in the MCA User Field.

As a suggestion of @shashi in his answer below I've run the command DIS CHANNEL() with the following output:

    1 : DIS CHANNEL('channel.test')
AMQ8414: Display Channel details.
   CHANNEL(channel.test)                   CHLTYPE(SVRCONN)
   ALTDATE(2015-07-22)                     ALTTIME(00.16.25)
   COMPHDR(NONE)                           COMPMSG(NONE)
   DESCR( )                                DISCINT(0)
   HBINT(300)                              KAINT(AUTO)
   MAXINST(999999999)                      MAXINSTC(999999999)
   MAXMSGL(4194304)                        MCAUSER(mqm)
   MONCHL(QMGR)                            RCVDATA( )
   RCVEXIT( )                              SCYDATA( )
   SCYEXIT( )                              SENDDATA( )
   SENDEXIT( )                             SHARECNV(10)
   SSLCAUTH(REQUIRED)                      SSLCIPH( )
   SSLPEER( )                              TRPTYPE(TCP)

Any help will be really helpfull

Thanks in advance

igarcia
  • 691
  • 1
  • 9
  • 26

1 Answers1

2

MQRC 2540 means the queue manager did not recognize the channel name provided by the client.

In MQ the object names are case sensitive. Ensure the channel name you have provided in Camel configuration matches the one you created in MQ Explorer.

Shashi
  • 14,980
  • 2
  • 33
  • 52
  • Thanks for your answer, I've set the same sensitive case channel name, so I'm afraid is not the issue – igarcia Jul 20 '15 at 14:43
  • So to verify with correct channel names the same error is returned? – Calanais Jul 21 '15 at 05:12
  • @Calanais yes, the same error is returned as it seems I did not have a channel with this name, but I have – igarcia Jul 21 '15 at 13:54
  • Can you please run DIS CHANNEL() in runmqsc and post the output? – Shashi Jul 22 '15 at 05:00
  • Sure, I did it and I posted the output below in the question – igarcia Jul 22 '15 at 14:01
  • Thanks for posting the command output. I think it's time for you to open a PMR to get this resolved. Client and Queue manager side trace would be required to determine the issue. – Shashi Jul 22 '15 at 15:00
  • Thank you so much for your help, I will open a PMR with IBM and then I will post the solution once I have done it – igarcia Jul 22 '15 at 20:08
  • The queue manager error log would have recorded the error when the queue manager did not find the channel, for example AMQ9519: Channel 'xyx.svrconn' not found. You may want to look into the queue manager error logs(AMQERR01.log) and see there is any information what channel name the queue manager is receiving from the client. – Shashi Jul 23 '15 at 04:33
  • @igarcia You got solution to this problem ? – kammy Apr 05 '19 at 16:18