Author |
Message
|
klabran |
Posted: Thu Jan 13, 2005 8:35 am Post subject: Trace file locked? |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
Every time I have a trace file created from a flow I can't rename it because it is locked/in use????
If I redeploy the flow that the trace was generated from then I can rename it. Is this normal? Is there a way around this?
I am on MQSI 2.1.
Kevin |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jan 13, 2005 8:46 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
It's normal. The broker opens the file for reading and writing, and keeps it that way until it is sure it's done.
You can do things to clear the file, but you can't rename it and you can't delete it once the broker has started to use it. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
klabran |
Posted: Thu Jan 13, 2005 8:48 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
My experience is that it locks it for a long amount of time.... last instance was about 2+ hours.
Is there a way to decrease the lock time? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jan 13, 2005 8:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I don't think it ever releases the lock "on it's own".
If you redeploy, you are forcing the lock to be released, because you are stopping and deleting the trace node that has it open, and then reinitializing the trace node.
There's no way, that I know of, to force any application to release a file lock, other than to close it down normally - or restart the system.
It *is* possible to overwrite the contents of the file while the TraceNode has it locked, however. You can do this with Notepad, you can do this with other things - as long as they don't try to delete the old file and write a new one.
If you want to do things like archive the contents on a daily basis, you will need to copy the contents into a new file, and then overwrite the current file with empty data. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
klabran |
Posted: Thu Jan 13, 2005 8:55 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
|
Back to top |
|
 |
kirani |
Posted: Thu Jan 13, 2005 11:34 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Have you tried using mqsireload command. I'm guessing that it will release the lock on the trace file. I never tried it though. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
martinrydman |
Posted: Thu Jan 13, 2005 11:50 pm Post subject: |
|
|
 Centurion
Joined: 30 Jan 2004 Posts: 139 Location: Gothenburg, Sweden
|
In a development scenario, there's also the rather unsofisticated forced termination of the DataFlowEngine (using task manager). The broker will automatically restart the engine immediately, but the lock is gone until a message triggers the first instance of the flow that locked the file. I've done this for years without any adverse effects.
This is *not* recommended in a production environment though...
/Martin |
|
Back to top |
|
 |
Tibor |
Posted: Fri Jan 14, 2005 6:06 am Post subject: |
|
|
 Grand Master
Joined: 20 May 2001 Posts: 1033 Location: Hungary
|
Kevin,
You can do the renaming the next way: (on unix)
Code: |
cp tracefile tracefile_copy
cp /dev/null tracefile |
Tibor |
|
Back to top |
|
 |
klabran |
Posted: Thu Jan 20, 2005 10:22 am Post subject: |
|
|
 Master
Joined: 19 Feb 2004 Posts: 259 Location: Flagstaff AZ
|
Thanks again for everyone's input. It looks like I have a few options....
Kevin |
|
Back to top |
|
 |
tillywern |
Posted: Fri Jan 21, 2005 9:15 am Post subject: Don't forget strange permissions on the trace files. |
|
|
 Centurion
Joined: 28 Jan 2003 Posts: 109 Location: Colorado
|
It appears that trance files also inherrit ownership from the user that initiates the request. SO it is possible to have a group of developers where when developer A sets a trace then Developer B cannot change it.
Usually this happens whn you have strange security standards, as we have with my current client. |
|
Back to top |
|
 |
kirani |
Posted: Sun Jan 23, 2005 2:50 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
I'd assume that the Broker Service user-id will have permissions to the folder where the trace files are created. If someone want's to overwrite the trace files, they should also have write permissions to the same directory/file. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
|