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 Java / JMS » growing svrconn channels and 2009's...

Post new topic  Reply to topic
 growing svrconn channels and 2009's... « View previous topic :: View next topic » 
Author Message
justrob
PostPosted: Fri Sep 02, 2005 9:20 am    Post subject: growing svrconn channels and 2009's... Reply with quote

Apprentice

Joined: 30 Apr 2004
Posts: 26

We have a problem... lots of 2009 errors (yet the channels remain running), and svrconn channels that just hang around, and keep increasing. As they increase, they increase the amqcrsta processes (hp ux 10) and eventually kill the system.

Here's the kicker, its' a V2.2.1 server with a V5.3 client connecting.
Is there anything short of upgrading that can help here? (upgrading at this point is not an option)

Thanks

import com.ibm.mq.* ;

/**
* This test program receives messages from MQ input queue INQ, and
* sends response to OUTQ.
*/

public class Responder {
public static void main(String args[]) {
MQQueue respQueue = null;
MQQueue queue = null;
MQQueueManager qMgr = null ;

//test return values
String[] retVal = {
"2#999#Could Not find MailBox on MOD", "1#0#", "1#0#",
"2#999#Could Not find MailBox on MOD","1#0#", "1#0# ",
"2#999#Unexpected Action received from SSM","1#0#", "1#0#"
};
try
{
String hostName = "198.105.214.2" ;
String channel = "MQMCHAN" ;
String qManager = "MQPV" ;
String qName = "INQ" ;
String replyName = "OUTQ" ;

//Set up the MQEnvironment properties for Client Connections
MQEnvironment.hostname = hostName ;
MQEnvironment.channel = channel ;
MQEnvironment.port = 1414 ;
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,
MQC.TRANSPORT_MQSERIES);

//Connection To the Queue Manager
qMgr = new MQQueueManager(qManager) ;

/* Set up the open options to open the queue for out put and
additionally we have set the option to fail if the queue manager is
quiescing.
*/
int openOptions = MQC.MQOO_INPUT_SHARED | MQC.MQOO_FAIL_IF_QUIESCING ;

//Open the queue
queue = qMgr.accessQueue(qName,
openOptions,
null,
null,
null);
System.out.println("Ready for receiving responses...");

// Set the put message options.
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = gmo.options + MQC.MQGMO_SYNCPOINT ; //Get messages unde sync point control
gmo.options = gmo.options + MQC.MQGMO_WAIT ; // Wait if no messages on the Queue
gmo.waitInterval = MQC.MQWI_UNLIMITED ; // Sets the time limit for the wait.

/* Next we Build a message The MQMessage class encapsulates the data buffer
that contains the actual message data, together with all the MQMD
parameters that describe the message.
To Build a new message, create a new instance of MQMessage class and use
writxxx (we will be using writeString method). The put() method of
MQQueue also takes an instance of the MQPutMessageOptions class as a parameter.
*/

int count = 0;
for(; {

MQMessage inMsg = new MQMessage(); //Create the message buffer
// Get the message from the queue on to the message buffer.

queue.get(inMsg, gmo) ;
qMgr.commit();

String msgString = inMsg.readString(inMsg.getMessageLength());
System.out.println(" The Message from the Queue is : " + msgString);

System.out.println("Preparing To Reply To the Request " );
openOptions = MQC.MQOO_OUTPUT | MQC.MQOO_FAIL_IF_QUIESCING ;
respQueue = qMgr.accessQueue(replyName,
openOptions,
null,
null,
null);
MQMessage respMessage = new MQMessage() ;
respMessage.correlationId = inMsg.messageId;

MQPutMessageOptions pmo = new MQPutMessageOptions();

pmo.options = pmo.options + MQC.MQPMO_SYNCPOINT ;
respMessage.format = MQC.MQFMT_STRING ;

String response = "Reply from the Responder Program " ;

msgString = msgString + ":" + retVal[count];
count++;

respMessage.writeString(msgString);
respQueue.put(respMessage, pmo);
System.out.println("The response Successfully send: " + msgString );
qMgr.commit();
respQueue.close();
}
} catch (MQException ex) {
System.out.println("An MQ Error Occurred: Completion Code is :\t" +
ex.completionCode + "\n\n The Reason Code is :\t" + ex.reasonCode );
ex.printStackTrace();
} catch(Exception e) {
e.printStackTrace();
} finally {
try {
if(queue != null) queue.close();
if(respQueue != null) respQueue.close();
if(qMgr != null) qMgr.disconnect();
} catch (Exception ex) {}
}
}
}
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Sep 02, 2005 9:23 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It can take a minute or more for a disconnect to actually close the channel.

Consequently, doing lots of connects and disconnects in rapid succession will cause exactly the symptoms you are seeing.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
justrob
PostPosted: Fri Sep 02, 2005 9:28 am    Post subject: Reply with quote

Apprentice

Joined: 30 Apr 2004
Posts: 26

Thanks for that... I'll see what can be done to avoid it. I believe that every time a 2009 is logged, a new channel connection attempt is made by the app... bet that doesn't help either
Back to top
View user's profile Send private message
justrob
PostPosted: Fri Sep 02, 2005 9:31 am    Post subject: Reply with quote

Apprentice

Joined: 30 Apr 2004
Posts: 26

Also.. if i do a netstat |grep 1414 all I get is 'established' connections, I don't see any close_wait or things like that
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Sep 02, 2005 9:33 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

compare netstat -an| grep 1414 with echo dis chlstatus(<your svrconn)|runmqsc...
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
justrob
PostPosted: Fri Sep 02, 2005 9:50 am    Post subject: Reply with quote

Apprentice

Joined: 30 Apr 2004
Posts: 26

the display chs gives me nothing... though that may be a problem with my knowledge of v2.2.1... The netstat gives me 17 - and that just happens to be hte number of amqcrsta processes that are shown as well.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Sep 02, 2005 9:52 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Eiuh.

Forgot you were running Mq 2. May not be able to get what you need from mqsc. I don't know - cause I don't know MQ 2.

There should, I hope, be some way to get it to show you the running channels.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
hopsala
PostPosted: Fri Sep 02, 2005 10:50 am    Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

justrob wrote:
the display chs gives me nothing... though that may be a problem with my knowledge of v2.2.1...

No problem of knowledge here - just like in any other version of MQ, if you type "DIS CHS(*)" and get nothing at all, it means that there are no active channels; This means you have 17 redundant processes up and running after the channels are no longer up...
I don't think those 17 processes are your problem - the 2009 is, and those processes are merely a result of your trying to reconnect too rapidly for the QM to close the channels - as jeff said
jefflowrey wrote:
It can take a minute or more for a disconnect to actually close the channel.

Consequently, doing lots of connects and disconnects in rapid succession will cause exactly the symptoms you are seeing.

What you should do, as always, is look at the AMQERR0x.LOG files, both in the /var/mqm/qmgrs/QMNAME/errors and the /var/mqm/errors directorty.

MQ V2 versions (especially on OS/390, i'm not sure about HP UX) were quite buggy in general - there might be a fix out there with your name on it.
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 Java / JMS » growing svrconn channels and 2009's...
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.