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 » General Discussion » Connecting to an mqserver using the mqclient

Post new topic  Reply to topic Goto page 1, 2, 3, 4, 5  Next
 Connecting to an mqserver using the mqclient « View previous topic :: View next topic » 
Author Message
mquser925
PostPosted: Tue Apr 22, 2008 7:31 am    Post subject: Connecting to an mqserver using the mqclient Reply with quote

Acolyte

Joined: 22 Apr 2008
Posts: 61

Here is my situation, I did a search and was unable to find a solution. I am running mq series 6.0 on redhat linux. I have created an mq queue manager and assigned a queue and channel on one machine and started the queue manager and started the listener. I am trying to connect to that queue on another machine where the mq client is installed using amqsputc. I have listed my script below.

#mq script
crtmqm TEST
strmqm TEST
runmqsc TEST << EOF
DEFINE QLOCAL (TEST1.QUEUE) REPLACE
DEFINE CHANNEL (TEST1.SVRCONN) CHLTYPE(SVRCONN)+
TRPTYPE(TCP) MCAUSER(' ') REPLACE
EOF
runmqlsr -m TEST -t TCP -p 1414


This is all done on machine A. I then logon to machine B, define the environment variable:

export MQServer=TEST1.SVRCONN/TCP/'xx.xxx.x.xx(1414)'

and try to place a message in the queue using:

amqsputc TEST1.QUEUE TEST

I get the following error:

MQCONN ended with error code 2058

Any ideas?

I made sure that the port was open so I know that is not the problem.
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Apr 22, 2008 11:36 am    Post subject: Re: Connecting to an mqserver using the mqclient Reply with quote

Grand High Poobah

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

mquser925 wrote:
export MQServer=TEST1.SVRCONN/TCP/'xx.xxx.x.xx(1414)'


Assuming you've done the put in the same window, so the variable is in scope, try MQSERVER not MQServer

Not connected to your problem, but if you're using v6 define a listener within the queue manager rather than use runmqslsr - newer, faster, better, more shiny, etc, etc
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 22, 2008 3:12 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mquser925 wrote:
export MQServer=TEST1.SVRCONN/TCP/'xx.xxx.x.xx(1414)'


Try instead
Code:
export MQServer='TEST1.SVRCONN/TCP/xx.xxx.x.xx(1414)'

Note the subtle difference in the quotes.
If I were you I would also use the DNS name instead of the IP.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
PeterPotkay
PostPosted: Tue Apr 22, 2008 3:20 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

if there was a problem with the MQSERVER variable, wouldn't he be getting a 2059 instead?

mquser, on the machine where you set MQSERVER, run the amqscnxc command. On the server where the QM is running, run the dspmq command. Post the output of both here.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Apr 22, 2008 3:27 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

PeterPotkay wrote:
if there was a problem with the MQSERVER variable, wouldn't he be getting a 2059 instead?

mquser, on the machine where you set MQSERVER, run the amqscnxc command. On the server where the QM is running, run the dspmq command. Post the output of both here.


Peter I figure that the problem is not with the variable but with the way it is defined and that the content of the variable did not take. As such the qmgr is not local and the 2058 refers to the local qmgrs...

An echo ${MQServer} should easily clear that.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Nigelg
PostPosted: Tue Apr 22, 2008 10:00 pm    Post subject: Reply with quote

Grand Master

Joined: 02 Aug 2004
Posts: 1046

I agree with Vitor, the variable should be MQSERVER (all caps), not MQServer.

The position of the quotes does not make any difference. The purpose of the quotes in that command is to protect the () from the shell.

The error is 2058 not 2059 because with no valid MQSERVER variable, the client channel table is searched instead. Since there is no entry with the qmgr name TEST, 2058 is returned.
_________________
MQSeries.net helps those who help themselves..
Back to top
View user's profile Send private message
Gaya3
PostPosted: Tue Apr 22, 2008 10:08 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

i didnt see any clntconn channel he has created...isnt that necessary or what

Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 23, 2008 12:37 am    Post subject: Reply with quote

Grand High Poobah

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

Gaya3 wrote:
i didnt see any clntconn channel he has created...isnt that necessary or what


Not if connection is with MQSERVER, which bypasses the client connection table. Check the Clients manual.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Wed Apr 23, 2008 12:57 am    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

, but i usually create both at one shot...and play around it..

Vitor wrote:
Gaya3 wrote:
i didnt see any clntconn channel he has created...isnt that necessary or what


Not if connection is with MQSERVER, which bypasses the client connection table. Check the Clients manual.


Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
mquser925
PostPosted: Wed Apr 23, 2008 1:05 am    Post subject: brilliant! Reply with quote

Acolyte

Joined: 22 Apr 2008
Posts: 61

You guys are very knowledgeable, the problem was that MQServer != MQSERVER. Thank you very much.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 23, 2008 1:27 am    Post subject: Reply with quote

Grand High Poobah

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

Gaya3 wrote:
, but i usually create both at one shot...and play around it..


Valid but pointless, and likely to confuse this poster, who would have created a clntconn and got no further with his problem.

Play about with it? I'd love your workload, but you need better toys. A clntconn can't be much fun....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mquser925
PostPosted: Wed Apr 23, 2008 6:06 am    Post subject: Re: Connecting to an mqserver using the mqclient Reply with quote

Acolyte

Joined: 22 Apr 2008
Posts: 61

Vitor wrote:

Not connected to your problem, but if you're using v6 define a listener within the queue manager rather than use runmqslsr - newer, faster, better, more shiny, etc, etc


Question:

I tried to define a listener,

runmqsc TEST

DEFINE LISTENER(TESTLISTENER) CONTROL(QMGR) TRPTYPE(TCP)+ PORT(1414)

and I get an error with the name. The name is anything I desire correct?
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Apr 23, 2008 6:10 am    Post subject: Re: Connecting to an mqserver using the mqclient Reply with quote

Grand High Poobah

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

mquser925 wrote:
and I get an error with the name. The name is anything I desire correct?


It's subject to the same naming rules as an WMQ object.

And my v6 queue manager has no problem with a listener called that.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
dgolding
PostPosted: Wed Apr 23, 2008 6:13 am    Post subject: Reply with quote

Yatiri

Joined: 16 May 2001
Posts: 668
Location: Switzerland

Nothing wrong with the name (except it's not the most informative ) - take the "+" sign out of the line - that'll help - and put TRPTYPE(TCP) as the first parameter - it seems to insist on it
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Wed Apr 23, 2008 6:17 am    Post subject: Reply with quote

Grand High Poobah

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

dgolding wrote:
TRPTYPE(TCP) as the first parameter - it seems to insist on it


So it does!!!!

Never noticed that before. When I tried it, I automatically typed TRPTYPE as the 2nd parameter because I always do. Never realised there was actually a reason for it!

This forum is so informative!!
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2, 3, 4, 5  Next Page 1 of 5

MQSeries.net Forum Index » General Discussion » Connecting to an mqserver using the mqclient
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.