ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Configuring MQ client to connect to local queue manager

Post new topic  Reply to topic Goto page 1, 2  Next
 Configuring MQ client to connect to local queue manager « View previous topic :: View next topic » 
Author Message
bhandar_amit
PostPosted: Mon Jul 30, 2007 11:21 pm    Post subject: Configuring MQ client to connect to local queue manager Reply with quote

Novice

Joined: 30 Jul 2007
Posts: 15

hi all,

i am using IBM MQ v6.0 and its C APIs. i am building a application with client libraries (i.e. libmqic.so) and using MQSERVER env variable to connect to remote queue manager. That is working fine.
But how do i allow the application to connect to local queue manager?
What configuration do i need for that?
Any help regarding this will be great. Thanks in advance.

Regards,
Amit Bhandar


Last edited by bhandar_amit on Tue Jul 31, 2007 5:25 am; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Jul 30, 2007 11:37 pm    Post subject: Re: Configuring MQ client to connect to local queue manager Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bhandar_amit wrote:
But how do i allow the application to connect to local queue manager?
What configuration do i need for that?


1) Be aware that it's perfectly valid to establish a client connection to a local queue manager i.e. one running on the same box as your application.

2) If you decide (again for perfectly valid reasons) you want to establish a bindings connection to a local queue manager rather than a client one then your application needs to be linked with the server side libraries rather the client ones you're currently using. You'll find details of this in the Application Programming guide.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bhandar_amit
PostPosted: Tue Jul 31, 2007 12:37 am    Post subject: Re: Configuring MQ client to connect to local queue manager Reply with quote

Novice

Joined: 30 Jul 2007
Posts: 15

hi vitor,

thanks for the reply.
if i have a application whose one instance want to connect to local queue manager (on the same box) and some other instance wants to connect to remote queue manager, then how do i do that?
can i do that using the server side libraries? or i need to have two different applications (one using the client libraries and other server libraries)?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 31, 2007 12:49 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

In that instance it's considered best practice to link the application with the client side libraries and allow it to connect to whatever queue manager it wants (see my point 1 above).

You could link 2 versions, one client, one server but what would be the point?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bhandar_amit
PostPosted: Tue Jul 31, 2007 12:58 am    Post subject: Reply with quote

Novice

Joined: 30 Jul 2007
Posts: 15

[quote="Vitor"]In that instance it's considered best practice to link the application with the client side libraries and allow it to connect to whatever queue manager it wants (see my point 1 above).

You could link 2 versions, one client, one server but what would be the point?[/quote]

Yes, i am linking my application with client side libraries, then the application is able to connect to the remote queue manager as i am giving the details in MQSERVER env variable. But the same application is not connecting to a local queue manager. Its giving 2059,MQRC_Q_MGR_NOT_AVAILABLE error.
i am giving the IP of local machine in MQSERVER when trying to connect to local queue manager.
Can you please tell me is there anything else needs to be done?
Thanks.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 31, 2007 1:04 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bhandar_amit wrote:
Its giving 2059,MQRC_Q_MGR_NOT_AVAILABLE error.


Use the search button to find posts for 2059 - it's the most common problem in client connections and in a majority of cases has nothing to do with the application or the MQ configuration per se.

All it means is that a client connection can't be established with the local queue manager. Typcially there's a firewall or other impediment, but your search will give you a "laundry list" of things to check.

You might also want to specify the port of the queue manager in the MQSERVER, especially if it's not using the default one!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bhandar_amit
PostPosted: Tue Jul 31, 2007 2:05 am    Post subject: Reply with quote

Novice

Joined: 30 Jul 2007
Posts: 15

i searched for the error in the qmgr directory and i found this -

AMQ9503: Channel negotiation failed.

EXPLANATION:
Channel 'SYSTEM.DEF.SVRCONN' between this machine and the remote machine could
not be established due to a negotiation failure.

Here the remote machine is nothing but the local machine.
And i have set the SYSTEM.DEF.CLNTCONN with the IP address and QMNAME.

Can you help me with this?
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 31, 2007 2:16 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

You've got a configuration error. Check out the Clients manual for detailed information but you need to either use MQSERVER & a server connection channel or use a client connection table & a client connection channel. Not both as you seem to be doing.

I'd recommend you speak to whoever administers the queue manager(s) you're using and get them to generate a client connection table containing names & details of all the queue managers your application needs to reference. This will be far easier than trying to set MQSERVER each time you run the application against a different queue manager.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bhandar_amit
PostPosted: Tue Jul 31, 2007 3:43 am    Post subject: Reply with quote

Novice

Joined: 30 Jul 2007
Posts: 15

As per my requirement setting MQSERVER is better.

So I am using a default server conn channel SYSTEM.DEF.SVRCONN.
And setting MQSERVER to
MQSERVER=SYSTEM.DEF.SVRCONN/TCP/localhost(1414)

But i am still getting this error -
AMQ9503: Channel negotiation failed.

Any help?

Thanks.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jul 31, 2007 3:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Do you get a Return Code from your MQCONN?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bhandar_amit
PostPosted: Tue Jul 31, 2007 3:56 am    Post subject: Reply with quote

Novice

Joined: 30 Jul 2007
Posts: 15

the return code i am getting-

MQCONN call failed with reason code 2059 and text MQRC_Q_MGR_NOT_AVAILABLE
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 31, 2007 3:57 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

jefflowrey wrote:
Do you get a Return Code from your MQCONN?


Presumably the 2059 mentioned earlier.

But if it's not that could be a clue.

I hate it when assumptions sneak up on me.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 31, 2007 3:59 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

bhandar_amit wrote:
As per my requirement setting MQSERVER is better.


Why? Using a client table would allow it to be packed with the application and the relevant queue manager fed to the application directly.

What is your driving requirement here?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Jul 31, 2007 4:10 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Okay, so you're sure you've linked your code against mqic32, and you're using MQServer.

And you're getting a channel negotiation error in the AMQERR log, or in the Event Viewer at the same time.

what does amqscnxc do with the same information (same MQSERVER)?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
bhandar_amit
PostPosted: Tue Jul 31, 2007 4:14 am    Post subject: Reply with quote

Novice

Joined: 30 Jul 2007
Posts: 15

hi vitor,

actually i have a application which is built with client side libraries.
this appln should connect to a single QM at a time and that QMcan be either remote/local. it has a configuration parameter PROCESS_ENVIRONMENT where i can specify MQSERVER for that particular instance of the appln. So one instance can connect to local and other can connect to remote QM.

Now that after mentioning MQSERVER with the correct IP of remote server,i am able to connect to remote QM. but that is not happening for local QM.
i am using the default server channel on the local QM (which is not the default QM).
And i am getting the errors mentioned above in the process.

Thanks,
Amit
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Configuring MQ client to connect to local queue manager
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.