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 API Support » Client Connection

Post new topic  Reply to topic
 Client Connection « View previous topic :: View next topic » 
Author Message
alperb
PostPosted: Tue Apr 19, 2005 9:39 am    Post subject: Client Connection Reply with quote

Apprentice

Joined: 01 Jun 2004
Posts: 25

Hi,
I am trying to connect to a remote manager with the following code where I copied the whole from imqsput.cpp.
imqsputc.exe works fine with alpers/TCP/10.1.1.34(1414) parameters however I get 2058 reason code with the code below.
The same code, the same client, the same server but different results.
Can anybody help me?
thanks in advance

ImqChannel * pchannel = 0 ;
pchannel = new ImqChannel ;
pchannel -> setHeartBeatInterval( 1 );
pchannel->setChannelName("alpers");
pchannel->setTransportType( MQXPT_TCP );
pchannel->setConnectionName("10.1.1.34(1414)");
qmgr.setChannelReference(pchannel);
qmgr.setName("MQTEST");
if ( !qmgr.connect( ) )
{ return RET_ERR;}
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Tue Apr 19, 2005 12:10 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

MQTEST is the wrong Queue Manager name for that particular hostname and port number.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
malammik
PostPosted: Tue Apr 19, 2005 12:21 pm    Post subject: Reply with quote

Partisan

Joined: 27 Jan 2005
Posts: 397
Location: Philadelphia, PA

I am not sure I understand 100%. Are you saying it work from one client but with same params does not work from another client? If the answer is yes, there might be a network/subnet/firewall issue.
Try pinging queue manager host from your client machine. Also try telneting into port 1414 of the queue manager machine and see what u get.
_________________
Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex
Back to top
View user's profile Send private message Visit poster's website AIM Address
bower5932
PostPosted: Tue Apr 19, 2005 1:40 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

2058 means that you found a qmgr and that you had the wrong name. Try issuing the dspmq command to verify the qmgr name.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
fjb_saper
PostPosted: Tue Apr 19, 2005 5:23 pm    Post subject: Reply with quote

Grand High Poobah

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

Could the qmgr name be QMTEST instead of MQTEST ??

Back to top
View user's profile Send private message Send e-mail
alperb
PostPosted: Tue Apr 19, 2005 11:29 pm    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2004
Posts: 25

queue manager name is MQTEST I tried dspmq as bower suggested and it all seem OK.
imqsputc.exe works fine with these parameters , channel name, connection name, queue manager name.
I just copied the imqsputc code to another project and hard coded the parameters.
Back to top
View user's profile Send private message
alperb
PostPosted: Wed Apr 20, 2005 12:31 am    Post subject: Reply with quote

Apprentice

Joined: 01 Jun 2004
Posts: 25

I reinstalled Mqclient 5.3 and the 2058 problem is solved.
However I began to get 2277 with the same code. It says

"MQRC_CD_ERROR
An MQCONNX call was issued to connect to a queue manager, but the MQCD channel definition structure addressed by the ClientConnOffset or ClientConnPtr field in MQCNO contains data that is not valid. Consult the WebSphere MQ error log for more information about the nature of the error.

Corrective action: Ensure that required input fields in the MQCD structure are set correctly. "

I thought the server connection definition may be wrong but it works fine with imqsputc.
what can be done?
Back to top
View user's profile Send private message
bower5932
PostPosted: Wed Apr 20, 2005 6:26 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Aug 2001
Posts: 3023
Location: Dallas, TX, USA

I'd double check your code. It sounds like you have a pointer messed up somewhere. Did you do any string copies of strings that weren't null terminated?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
kevinf2349
PostPosted: Wed Apr 20, 2005 8:02 am    Post subject: Reply with quote

Grand Master

Joined: 28 Feb 2003
Posts: 1311
Location: USA

I believe we had a similar problem that was fixed with fix pack Level 8 for the client.

http://www-1.ibm.com/support/docview.wss?rs=172&context=SW900&q1=%22WebSphere+MQ+v5.3%22+CSD+Fix+Pack+Maintenance&uid=swg24007905&loc=en_US&cs=utf-8&lang=en+en
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Client Connection
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.