Author |
Message
|
Fok |
Posted: Wed Sep 14, 2016 7:18 am Post subject: Connection Problems to Channel |
|
|
Newbie
Joined: 14 Sep 2016 Posts: 6
|
Hey folks,
i am pretty new here. Here is what i want to do. I have installed a mq server on a virtual win server for testing my client. But i can´t connect to the QM running on the machine. I've tried to connect through the network and direct from the machine where the QM manager is running.
I am getting the error_code 2040 MQRC_UNKNOWN_CHANNEL_NAME
Looking through the logs i get the infomation AMQ9520 Channel is not remote defined.
While the code seems to be pretty clear i created the channel in the MQ Explorer with the same name. Therefore i know that the channel exists.
Any ideas or tips?
regards |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 14, 2016 7:31 am Post subject: Re: Connection Problems to Channel |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Fok wrote: |
Any ideas or tips? |
MQ is case sensitive. MY.CHANNEL and my.channel are 2 different channel objects. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Sep 14, 2016 7:32 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Channels come in several types.
MQ will turn unquoted object names into upper case names.
so "define channel(abc)" will define a channel named "ABC" _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
Vitor |
Posted: Wed Sep 14, 2016 7:33 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
Channels come in several types. |
That's another likely possibility - wrong channel type _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Fok |
Posted: Wed Sep 14, 2016 10:24 pm Post subject: |
|
|
Newbie
Joined: 14 Sep 2016 Posts: 6
|
Thanks, i considered case sensitiv.
The channel is in all caps defined "CHANNEL1".
The channel is created in the category "Clientconnections" and the type of the channel is "clientconnection".
Sorry, if i don't use the correct terms because i work with the german version of mq explorer. |
|
Back to top |
|
 |
exerk |
Posted: Thu Sep 15, 2016 1:20 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Fok wrote: |
...The channel is created in the category "Clientconnections" and the type of the channel is "clientconnection"... |
That will populate an entry in a Client Channel Definition Table (CCDT) file but needs its 'partner' SVRCONN (Server Connection) channel defined...
Fok wrote: |
...Sorry, if i don't use the correct terms because i work with the german version of mq explorer. |
No worries - I wish my German was as good as your English! _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Sep 15, 2016 3:50 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
exerk wrote: |
Fok wrote: |
...Sorry, if i don't use the correct terms because i work with the german version of mq explorer. |
No worries - I wish my German was as good as your English! |
Ich spreche keine Deutch. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Sep 15, 2016 5:47 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
mqjeff wrote: |
exerk wrote: |
Fok wrote: |
...Sorry, if i don't use the correct terms because i work with the german version of mq explorer. |
No worries - I wish my German was as good as your English! |
Ich spreche keine Deutch. |
Leider so, und Fliessend fuer mich... _________________ MQ & Broker admin |
|
Back to top |
|
 |
Fok |
Posted: Mon Sep 19, 2016 1:13 am Post subject: |
|
|
Newbie
Joined: 14 Sep 2016 Posts: 6
|
exerk wrote: |
Fok wrote: |
...The channel is created in the category "Clientconnections" and the type of the channel is "clientconnection"... |
That will populate an entry in a Client Channel Definition Table (CCDT) file but needs its 'partner' SVRCONN (Server Connection) channel defined... |
Ok, let's go step by step. I tried quite a few things but i am feeling like no progression is made.
I can connect my client to local QM, yay. Let's call the local QM QM_LOCAL. QM_LOCAL has a channel of the type Clientconnection.
Now i want to connect my client to a remote QM, QM_REMOTE.
What type of channel has to be created by the client and what kind of channel has to be running on QM_REMOTE?
exerk tried to give me a hint, but i am a bit clueless at the moment.
Error logs and return codes are not giving me enough clues to handle this on my own. |
|
Back to top |
|
 |
exerk |
Posted: Mon Sep 19, 2016 1:41 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Fok wrote: |
I can connect my client to local QM, yay. Let's call the local QM QM_LOCAL. QM_LOCAL has a channel of the type Clientconnection. |
Now we're getting somewhere! The chances are, that if you are connecting to a local queue manager, one that has only a CLNTCONN channel defined, then you are not connecting via MQ Client. What application are you using, e.g. the amqsput/amqsputc sample? And which version of MQ are you using?
Fok wrote: |
Now i want to connect my client to a remote QM, QM_REMOTE.
What type of channel has to be created by the client and what kind of channel has to be running on QM_REMOTE? |
ALL channels need to have two ends. In the case of MQ Client the 'other' end (the queue manager end) needs to be a SVRCONN.
There are various methods of creating the MQ Client end of a channel and THIS will help you. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
Fok |
Posted: Mon Sep 19, 2016 5:54 am Post subject: |
|
|
Newbie
Joined: 14 Sep 2016 Posts: 6
|
exerk wrote: |
ALL channels need to have two ends. In the case of MQ Client the 'other' end (the queue manager end) needs to be a SVRCONN. |
This helped a lot. Now i am able to connect to QManager on a remote machine.
I am coding a c++ client to send messages to a customers via MQ. At the moment taking my first steps.
After a little strugle with authentification i send successfully a message. |
|
Back to top |
|
 |
exerk |
Posted: Mon Sep 19, 2016 7:48 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Fok wrote: |
exerk wrote: |
ALL channels need to have two ends. In the case of MQ Client the 'other' end (the queue manager end) needs to be a SVRCONN. |
This helped a lot. Now i am able to connect to QManager on a remote machine.
I am coding a c++ client to send messages to a customers via MQ. At the moment taking my first steps.
After a little strugle with authentification i send successfully a message. |
Excellent! How did you overcome the authentication issue? _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
gbaddeley |
Posted: Mon Sep 19, 2016 6:29 pm Post subject: |
|
|
 Jedi Knight
Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia
|
Fok wrote: |
I am coding a c++ client to send messages to a customers via MQ. At the moment taking my first steps. |
Ensure the client app keeps an active connection to the queue manager for as long as possible, ie. across multiple sends. The biggest overhead in MQ is establishing a connection.
Ensure the client app keeps the queue open across multiple message sends. Opening and closing queues is also an overhead that should be avoided, particularly for client apps. _________________ Glenn |
|
Back to top |
|
 |
Fok |
Posted: Mon Sep 19, 2016 10:22 pm Post subject: |
|
|
Newbie
Joined: 14 Sep 2016 Posts: 6
|
exerk wrote: |
Excellent! How did you overcome the authentication issue? |
*Well, at first i got the message authentification failure sid couldn't obtained, roughly translated.
The remote server is a virtual server and not part of our damain. So the user from the client was not known. I created a user with the same name on the server. Than i was able to establish a connection but had insufficient right to connect to the QM. The next step was to make a entry for the user at the qm at role-based authorities. This worked and i had to do the same for the Queue.
And voila, i was able to put a message to the queue  |
|
Back to top |
|
 |
exerk |
Posted: Tue Sep 20, 2016 2:43 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Fok wrote: |
exerk wrote: |
Excellent! How did you overcome the authentication issue? |
...The remote server is a virtual server and not part of our damain. So the user from the client was not known. I created a user with the same name on the server. Than i was able to establish a connection but had insufficient right to connect to the QM. The next step was to make a entry for the user at the qm at role-based authorities. This worked and i had to do the same for the Queue.
And voila, i was able to put a message to the queue  |
Well done you! That's learning how to do it the proper way, rather than putting the user in the mqm group.
Your answer implies you're on Windows, so, if cross-domain membership is an issue, you could look to use a CHLAUTH rule with USERMAP set  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
|