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 » How to close a queue when opened for exclusive access?

Post new topic  Reply to topic
 How to close a queue when opened for exclusive access? « View previous topic :: View next topic » 
Author Message
rgross999
PostPosted: Fri Jan 16, 2004 10:41 am    Post subject: How to close a queue when opened for exclusive access? Reply with quote

Newbie

Joined: 15 Jan 2004
Posts: 8

I ran a Java program that opened a queue for exclusive access, ie, used open option MQOO_OPEN_EXCLUSIVE.

The program ended abnormally, leaving the queue open.

Now messages can be added but not removed.

How can the queue be forced closed again?

Thanks.
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Jan 16, 2004 11:38 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
Now messages can be added but not removed.

If the queue was still locked from the MQOO_OPEN_EXCLUSIVE, then you wouldn't be able to open it to add messages.

Are you sure that there are messages on the queue. Could they have been backed out when the Java program crashed.

What error are you getting.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
rgross999
PostPosted: Fri Jan 16, 2004 1:30 pm    Post subject: Reply with quote

Newbie

Joined: 15 Jan 2004
Posts: 8

Eddie,

Thanks for responding to this message, as well as the one yesterday.

I'll get more details Monday, as I've gone home for the weekend and do not remember exactly what happened.

My program was looping through all the records, browsing them, but it had opened the queue in get exclusive mode (or something like that).

Later I ran a program to do a normal get, and it received a 2042 error. I cannot clear the queue through the WebSphere console (it is being run on a Windows 2000 server). When I look at the queue, it says the original Java process, which is no longer running, has it locked.

I stopped everything, and even rebooted the server, but I cannot clear the queue, get the messages, or even delete the queue.

Again, I'll provide more details Monday morning.

Thanks again for all your help. If you have any more ideas please let me know.

Thanks.
Back to top
View user's profile Send private message
mqonnet
PostPosted: Fri Jan 16, 2004 1:56 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

I would highly doubt it and even bet on it that once you reboot your system you should be able to clear/delete or do whatever you want to do with the queue.

What may be possible is that you have a 3rd party tool that starts itself up when you reboot your machine and opens this particular queue up.

Under all circumstances, when you have an app opening a queue, if you kill or end your app the connection to the queue is more or less released soon, if not immediately. Because the agent process needs to clean up everything before it ends.

So, in your case, when you said you even rebooted and still find an opener to this queue, i bet it wouldnt be the same app as earlier unless that app too fires up when you reboot.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rgross999
PostPosted: Fri Jan 16, 2004 2:05 pm    Post subject: Reply with quote

Newbie

Joined: 15 Jan 2004
Posts: 8

Kumar,

Thanks for the suggestions.

There is nothing, absolutely nothing else running on the machine.

When I look at the queue in the console it says it is locked by a Java program (I'll let you know exactly where I see this when I get to work on Monday). The Windows Task Manager shows there are no Java programs running.

So are there any ways I can force it to unlock?

Thanks again.

Ron
Back to top
View user's profile Send private message
mqonnet
PostPosted: Fri Jan 16, 2004 2:17 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Feb 2002
Posts: 1114
Location: Boston, Ma, Usa.

Ok!!!

1) Is the queue accessible.
2) Can you issue a dis ql on that queue.
3) Can you put to that queue. I know you cannot get since its opened by someone exclusively.
4) Any FFST's. You would get them when your queue is in a funny state.
5) Since you say you are able to figure out the name of the app that has the queue opened, i would assume you are on 5.3, because prior to that you wouldnt be able to anyways.

If a queue is opened by an app, and you either kill the app or the app ends, it would realease all locks within a few seconds. If it doesnt, try recycling the qm. If that doesnt work either, then i would think you have a corrupt queue on your hands. But to prove that you should look for errors in the errorlog and for any FD files that got created. Without either, its again highly unlikely that the queue would go into a bad state.

Cheers
Kumar
Back to top
View user's profile Send private message Send e-mail Visit poster's website
oz1ccg
PostPosted: Sat Jan 17, 2004 5:55 am    Post subject: Reply with quote

Yatiri

Joined: 10 Feb 2002
Posts: 628
Location: Denmark

Ooops

We're you using a client/JMS connection ??

If it's a client connection, you'll sometime see such a condition becuase the channel initiator opens the queues on behalf of your application.
When the Client application abends (or leaves without MQCLOSE/MQDISC), will the connection be held by the channelinitiator, because it don't know what the application is doing...... It's not a futune teller

What you can do/try to clean up the mesh, is stop the channel (mybee with option FORCE). wait until the Open Input count drops... ans then start the channel again.

By the way is the JAVA application running on the same box as WebSphere MQ ??

Just my $0.02
_________________
Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
rgross999
PostPosted: Mon Jan 19, 2004 9:24 am    Post subject: Fixed. Thanks for all your help. Reply with quote

Newbie

Joined: 15 Jan 2004
Posts: 8

Everybody, thanks for helping. I seem to have fixed it.

The Java program that blew up and seemed to lock the queue was one that looped through the messages and sent an email about each one.

It was activated by a trigger.

I noticed this morning that when I shut down the queue manager I received one email message.

So I stopped and restarted the queue manager several times, and in each cycle one email was sent.

When all emails had been sent the queue was unlocked.

The server was stopped and rebooted several times and according to the task manager no Java programs were running.

So something, somewhere, kept a record of what was going on.

I have no idea exactly what happened.

Again, thanks for your assistance.
Back to top
View user's profile Send private message
bower5932
PostPosted: Mon Jan 19, 2004 9:44 am    Post subject: Reply with quote

Jedi Knight

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

I just appended on the other thread:

http://www.mqseries.net/phpBB/viewtopic.php?t=12925

some information on triggering and queue manager restarts.
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General Discussion » How to close a queue when opened for exclusive access?
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.