|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
failed to close with reason code 2009 |
« View previous topic :: View next topic » |
Author |
Message
|
irwn |
Posted: Mon Jul 21, 2003 3:38 am Post subject: failed to close with reason code 2009 |
|
|
Newbie
Joined: 19 Jul 2003 Posts: 7 Location: ID
|
Environment:
Win XP, WebSphereMQ 5.3, WebLogic 6.1 SP3, JDK 1.3.1
I have an application (java) that keep running listening to the queue (reply queue). We want to simulate situation where MQ is down for any reason to verify that our application can recover and re-establish the connection to the queue.
The receiver is running in a while loop (forever). Upon exception while listening to the queue, the application suppose to close the queue and the queue manager first before trying to creating the connection again.
However, when we try to close the connection we keep getting and exception with reason code 2009 (connection broken). The same apply also to the queue manager (when trying to disconnect and close).
Therefore when we are trying to restart MQ, it failed with AMQ8041 (cannot restart cause previously connected process still active -- which is the WebLogic server).
Any idea how we can close the queue from java (or in that matter ensure that all the connected resources are cleaned)?
Thank you,
Irawan. |
|
Back to top |
|
 |
bower5932 |
Posted: Mon Jul 21, 2003 7:47 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Do any TCP/IP return codes show up in either the amqerr*.log files or the Windows event viewer? |
|
Back to top |
|
 |
mqonnet |
Posted: Mon Jul 21, 2003 9:56 am Post subject: |
|
|
 Grand Master
Joined: 18 Feb 2002 Posts: 1114 Location: Boston, Ma, Usa.
|
You have to be more specific here. I think there are 2 apps that are connected to MQ. One is your java client app and the other is the weblogic server.
If you are trying to down MQ server while a client app is connected, then any clients that are still connected would ALWAYS get a 2009 from the subsequent API call, irrespective of what call it is. Could be MQCLOSE, or MQDISC. You may want to handle this error in your client java app appropriately or just ignore it and carry on. If you are NOT ending your client app after this, but try to do an mqconn again, after having got 2009(at this point assuming that you got MQ server back again), then you should get a new connection just fine.
But it looks like you cannot get MQ back up again, because WEBLOGIC seems to be connected to the QM as well. Which means you have to manually end WEBLOGIC or somehow make it close all connections and disconnect.
Hope this helps.
Cheers
Kumar |
|
Back to top |
|
 |
irwn |
Posted: Thu Jul 24, 2003 6:03 pm Post subject: |
|
|
Newbie
Joined: 19 Jul 2003 Posts: 7 Location: ID
|
Thank for all the help,
There are no TCP/IP return code in the log file nor the event viewer.
As far as I know WebLogic should not be connected (we are not using JMS/WebLogic implementation, we are only starting the application to listen to the queue from within weblogic. But I will verify again).
Currently right now, when the client get the 2009 error, we do want to re-create the connection again. But that can only be done when the mq is up and running again. But somehow when I shutdown MQ it cannot start again and give me the AMQ8041 error (error to start due to some process still connected).
So in my application what I am trying to do is when we detected error while listening to the queue (e.g. 2009), I want the application to close all the resources (I am using the close() and disconnect() method). But my app failed to call the methods. Initially I thought the close was fine, but displaying the error/exception shown that it actually failed to close the resources (queue, and queue manager).
Are you saying that if the client detect 2009, I cannot perform a graceful disconnect/close api call?
Cause the code is implemented by someone before and I am the 'lucky' one to help debug this problem Hopefully killing the thread is not the only way to release the resources.
Any idea how I can safely close/clean all the resources upon detecting any failure in the channel/queue? or is it can be clean from the mq side itself?
Thanks. |
|
Back to top |
|
 |
prashant |
Posted: Wed Aug 06, 2003 1:16 am Post subject: |
|
|
Novice
Joined: 01 Aug 2002 Posts: 17
|
Irwn,
Did you get any solution to the problem?
I am also facing the same kind of problem in my application. My application is runnng a multiple number of threads, each thread having it's own connection with the MQSeries. The thread has to process incoming requests. The thread has to live/run infinitly and process incoming requests. It prepares connections with MQSeries and using that connection processes the requests. The thread processes anumber of requests successfully(almost 30000 to 70000 requests successfully). After that it starts failing process the request giving the reason code 2009 (Errro JMSMQ2005) completion code 2 reason code 2009.
What should I do(IF you have got the solution to your problem)?
Prashant |
|
Back to top |
|
 |
irwn |
Posted: Wed Aug 06, 2003 11:54 pm Post subject: no luck so far... |
|
|
Newbie
Joined: 19 Jul 2003 Posts: 7 Location: ID
|
Haven't found any solution yet,... have you found anything that you can share? |
|
Back to top |
|
 |
prashant |
Posted: Thu Aug 07, 2003 12:56 am Post subject: |
|
|
Novice
Joined: 01 Aug 2002 Posts: 17
|
I have posted the same query with the subject
"After a few success suddenly MQJMS2005 with reason code 2009"
Bower has suggested peeking into mq logs for 10038. just have a look at that reply. May be that helps you. I will check my logs for that.
Prashant |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|