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 » I get an error code: 2009 - MQRC_CONNECTION_BROKEN

Post new topic  Reply to topic
 I get an error code: 2009 - MQRC_CONNECTION_BROKEN « View previous topic :: View next topic » 
Author Message
patkatm
PostPosted: Fri Jan 09, 2009 8:34 am    Post subject: I get an error code: 2009 - MQRC_CONNECTION_BROKEN Reply with quote

Newbie

Joined: 09 Jan 2009
Posts: 7

I m new to MQ development, developing MQ Client Application in C# .NET 2.0 with Windows XP environment. My MQ Server is in a remote location. When I execute the following piece of code I get an error code: 2009 - MQRC_CONNECTION_BROKEN.

PS: I m able to telnet to the MQ Server machine at Port (1414)

//--------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using IBM.WMQ;

namespace MQClient
{
public class MQClass
{
private MQQueueManager mqQMgr; // MQQueueManager instance
private String queueManger; // Name of queueManager to use
private String GetQName; // Name of Get queue to use
private String SndQName; // Name of Send queue to use

MQQueue mqSndQueue; // MQQueue Send instance
MQQueue mqGetQueue; // MQQueue Get instance

private String channelName;
private String connectionName;

public MQClass(string sChannelName)
{
channelName = "MYTEST.SVRCONN";
connectionName = "localhost";
SndQName = "MYTEST.QUEUE";
GetQName = "MYTEST.QUEUE.REPLY";
}

/// <summary>
/// Connect to MQ Server.
/// </summary>
/// <param name="sChannelName">Name of the Channel.</param>
/// <param name="sMachineIP">The Server machine's IP.</param>
/// <param name="sQMgrName">Name of the Q Manager.</param>
/// <param name="sQName">Name of the Q.</param>
/// <returns>True or false</returns>
public bool Connect2MQSrvr(string sChannelName, string sMachineIP, string sQMgrName, string sSndQName, string sGetQName)
{
bool bResult = true;

MessageBox.Show("Connect2MQSrvr... Enter.");

///
/// Try to create an MQQueueManager instance
///
try
{
//Channel Name
if (sChannelName.Length > 0)
channelName = sChannelName;

//Queue Manager Server IP
if (sMachineIP.Length > 0)
connectionName = sMachineIP;

//Queue Manager name
if (sQMgrName.Length > 0)
queueManger = sQMgrName;

//Send Queue name
if (sSndQName.Length > 0)
SndQName = sSndQName;

//Get Queue name
if (sGetQName.Length > 0)
GetQName = sGetQName;

MQEnvironment.Channel = channelName;
MQEnvironment.Hostname = connectionName;
MQEnvironment.Port = 1414;

mqQMgr = new MQQueueManager(queueManger, channelName, connectionName);


if (mqQMgr == null || !mqQMgr.IsConnected)
{
MessageBox.Show("Cannot Connect to " + connectionName +
" - QueueManager - " + queueManger + "ChannelName - " + channelName);
bResult = false;
}
else
MessageBox.Show("MQ Client connected to the Manager.");
}
catch (MQException mqe)
{
// stop if failed
MessageBox.Show("Connect2MQSrvr ended with an Error: " + mqe.Message + ", RCode: " + mqe.ReasonCode + ", Reason: " + mqe.Reason);
bResult = false;
}
MessageBox.Show("Connect2MQSrvr... Exit.");
return bResult;
}
}
}
//--------------------------------------------------------------------------


Looking forward your help at the earliest.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jan 09, 2009 9:44 am    Post subject: Re: I get an error code: 2009 - MQRC_CONNECTION_BROKEN Reply with quote

Grand High Poobah

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

patkatm wrote:
Looking forward your help at the earliest.


First thing is to learn to use the search facility in this forum!

2009 is a common problem with a number of possible causes, all of which have been discussed in here at one time or another with possible resolutions.

Note that some causes may not be connected to your code. But I suspect this is...

....unless this is just a fragment of the full application!

Hint - what is this reason code saying? What does it signify?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
aditya.aggarwal
PostPosted: Sun Jan 18, 2009 1:36 am    Post subject: Reply with quote

Master

Joined: 13 Jan 2009
Posts: 252

Check with the Remote Server MQ Administration team that listner is running on that server.

there may be othere reasons. Ask your remote Mq Server adminstration team to investigate on the 2009 error.
Back to top
View user's profile Send private message
sakthi_sarathi
PostPosted: Sun Jan 18, 2009 3:59 am    Post subject: Reply with quote

Novice

Joined: 07 Dec 2008
Posts: 16

I am really curious about this error, when I search in Google I see most of them end with either CPU resource issue on QMRG server or Network related issue.
Is this not really some thing to do with Application side?
Back to top
View user's profile Send private message
Vitor
PostPosted: Sun Jan 18, 2009 5:58 am    Post subject: Reply with quote

Grand High Poobah

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

sakthi_sarathi wrote:
Is this not really some thing to do with Application side?


Not typically, though the posted example may be the exception. Even having said that, I would not be astonished to discover a resource/network issue as well.

Badly written code, as with any situation, can of course exacerbate resource and network problems.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
patkatm
PostPosted: Tue Jan 20, 2009 11:30 pm    Post subject: Error: 2009 issue solve Reply with quote

Newbie

Joined: 09 Jan 2009
Posts: 7

Thanks. This is was sorted out. I need to set: MQC.TRANSPORT_PROPERTY with MQC.TRANSPORT_MQSERIES_CLIENT and also install IBM MQ client setup in the target PC.
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 Installation/Configuration Support » I get an error code: 2009 - MQRC_CONNECTION_BROKEN
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.