You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Anil Ambati <aa...@us.ibm.com> on 2014/11/04 20:58:05 UTC

PID file locked on Windows 2008 system

Hi,
We have a requirement to read the PID file created by the Tomcat server 
process on Windows, but we are not able to using RandomAccessFile or 
FileInputStream because the file seems to be locked by the Tomcat process. 



Why does the Tomcat server keep the PID file locked, preventing other 
processes to even read the file? Is there a work around or solution for 
this problem? 

Any help is appreciated. Thank you in advance.


Regards,


Regards,



Anilkumar Ambati
 4205 S Miami Blvd

WebSphere Virtual Enterprise Development
 Durham, 27703-9141
Phone:
+1-919-254-6152
 USA
Mobile:
+1-919-434-5674
 

e-mail:
aambati@us.ibm.com
 

"You have no responsibility to live up to what other people think you 
ought to accomplish." -Richard Feynman (1918-1988)
 
 

Re: PID file locked on Windows 2008 system

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Anil,

On 11/4/14 6:27 PM, Anil Ambati wrote:
> Thanks for the response. How can I ask procrun folks about the
> options? Is there another news group? Sorry , I am new to Tomcat.

Yes, you'll want to post to the commons users mailing list:
http://commons.apache.org/proper/commons-daemon/mail-lists.html

Please be aware that Apache commons is ... crowded. If you post to the
list, please put "[daemon]" in the subject line to get some attention.
Otherwise, you'll not cut through all the messages about mathematical
solvers, parsers, file compression utilities and all the other things
that have been dumped into commons over the years.

We'd be interested in hearing the result of the discussion, so please
post back here if/when you get an answer and/or resolution.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUWXchAAoJEBzwKT+lPKRYRbYP/0B/quqn9cvqG+cZWg0xjHHt
Fq6/qseW+Br+rLRo1+oPSPe/PwDyGdHS39a7L4fFfXUeUeWUWYqv5VNmHN8qIjh2
C8B7KW/Kr2ZGhcI1gN8jhw9vzOlXwOqXH2VhwT6VHXPmFA8QGa8NteVdf29YLvzO
H8V3f6mVIIOtTaNGXLGyQHTPw4IW0vpxZWeTt0b+jtJg3goKM8Tr7vs2dtqY8C5l
UQUZ8o1u9wfAVsoTy/RSeDzRzdafsLYwjp9LNztxU/aDG/mghlbcjgKajnHgaQEn
6xvSRZ1anHZWHbbblpWHC7ak2MG2dvo8OMweblAxjbSEvppq9ngGt+0o3jBheVWJ
9soHHrJOJvz+FF/zYmoKTDRLd6/Y3iTkE/pYPOVZbHcWfGVEVHfCOh0dMeEwiuLw
A8cnX2V4Tv0FeRst+UjuMAbCUrHrTH3dE63bJ3ioFJ1BXFXwxIkGjh2loRhDbU25
gqKGwYWOjzZU45X+GaSsmUap1khA1or2n+fwOzVU9UqoFlu6FpANHb81itK9FEhh
jbOfxfffNspkCOpKK7MWn3Fe2ePTvHehUbbhgtCjScYBfhZviTsWmyg4PdpNt2wt
jBEIRjc/EcaEgp3qW/aPUphN7WzYAR4UBbss2CpXn5YQa+WWok2j9KfuLaDw8xOf
X798FCTr6j1ugiZaedlt
=KW59
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PID file locked on Windows 2008 system

Posted by Anil Ambati <aa...@us.ibm.com>.
Hi Chris,
Thanks for the response. How can I ask procrun folks about the options? Is 
there another news group? Sorry , I am new to Tomcat. 


Regards,



Anilkumar Ambati
 4205 S Miami Blvd

WebSphere Virtual Enterprise Development
 Durham, 27703-9141
Phone:
+1-919-254-6152
 USA
Mobile:
+1-919-434-5674
 

e-mail:
aambati@us.ibm.com
 

"You have no responsibility to live up to what other people think you 
ought to accomplish." -Richard Feynman (1918-1988)
 
 




From:
Christopher Schultz <ch...@christopherschultz.net>
To:
Tomcat Users List <us...@tomcat.apache.org>, 
Date:
11/04/2014 05:39 PM
Subject:
Re: PID file locked on Windows 2008 system



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Anil,

On 11/4/14 5:25 PM, Christopher Schultz wrote:
> Anil,
> 
> On 11/4/14 2:58 PM, Anil Ambati wrote:
>> We have a requirement to read the PID file created by the Tomcat 
>> server process on Windows, but we are not able to using 
>> RandomAccessFile or FileInputStream because the file seems to be 
>> locked by the Tomcat process.
> 
> 
>> Why does the Tomcat server keep the PID file locked, preventing 
>> other processes to even read the file? Is there a work around or 
>> solution for this problem?
> 
> You must be using commons-daemon's procrun, otherwise known as the 
> Windows service wrapper. That process creates (and possibly locks)
> the PID file for Tomcat.
> 
> You may find users here who know the answer to your question, but
> you might have better luck posting to the commons mailing list to
> ask there.
> 
> I suspect it's something silly like holding-open the PID file
> instead of writing to it and then closing it.

I took a quick look, and it looks like the PID file is being created
with a file option FILE_FLAG_DELETE_ON_CLOSE which causes the OS to
delete the file off the disk when all file handles are closed. So,
closing the file handle will result in the PID file being deleted.

This option was added because the PID file wasn't being removed if the
service crashed, which kept the service from restarting (oops).

https://issues.apache.org/jira/browse/DAEMON-183

It seems like an option to control what happens on startup when the
PID file already exists would be a good idea. You'll have to ask the
procrun folks about what the options are. It seems reasonable to be
able to read the PID file, since not being able to read it makes it
kind of useless other than as a lock-file (i.e. its contents are
irrelevant).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUWVVlAAoJEBzwKT+lPKRYrQsP+wVCM1ASSBh+LuNIPjRUkUxi
3uBfjLArQIplC0l98dIQZZlBJQAsh0Lc61Tvo2Q+Ka5zPtq+WA9GlDVTH3MZo82E
kcleNxwFcmx0fGWizStEhMsxGqtGAKWct68FwVTFKDb8Bl68ud20fqJ5bEyyL6lP
2kV8QTjRcqJs42NvpjmW14NBGzXWiGF5BKOh3dGTdp1h6kIZrcOY/oOfX8noaO/K
evMDRrCas/MARzUQ/gBGMoZN5KmqPFcAvotlJlhECg1bpMTX38etIAwnMsnFRuZ9
Y0Ci5ffQ5I3MDvyWUf5Sv8UBJHLGUjwXzKbWCagDfBtgOZxp389t8Ro1TWDtMF7l
KWO9wvjX0Y1oS13xrl4VNNr/6oQuvybSwKYtMrFycRB8/K573QHrgSixI+7lNWNk
jyNus6cpOINxhMxsuyyu5oF+1O7EV0yWhXT+EIWt7mpzXLsyjQc/XbpFwQ3anNUv
YrD+CB+I/FLA/O1RSEEd9+NzpO45laSyoz3KfIqVFMkqCLKyjdA652jR+ik978kX
fc5gsQVtoeGAuTbNTm9eSS9hv2wjJoMSl0A6gT9Y8q83448IlhaSYE1mXSYG6XIp
DxNe0Dci0M5biNju+OIWrtW23zG4Q1eW8MIvs5wltVl8873zLdPpc49+dg3H+xIs
Mj55IlSYkg4GMHtdohle
=fhDz
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




Re: PID file locked on Windows 2008 system

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Anil,

On 11/4/14 5:25 PM, Christopher Schultz wrote:
> Anil,
> 
> On 11/4/14 2:58 PM, Anil Ambati wrote:
>> We have a requirement to read the PID file created by the Tomcat 
>> server process on Windows, but we are not able to using 
>> RandomAccessFile or FileInputStream because the file seems to be 
>> locked by the Tomcat process.
> 
> 
>> Why does the Tomcat server keep the PID file locked, preventing 
>> other processes to even read the file? Is there a work around or 
>> solution for this problem?
> 
> You must be using commons-daemon's procrun, otherwise known as the 
> Windows service wrapper. That process creates (and possibly locks)
> the PID file for Tomcat.
> 
> You may find users here who know the answer to your question, but
> you might have better luck posting to the commons mailing list to
> ask there.
> 
> I suspect it's something silly like holding-open the PID file
> instead of writing to it and then closing it.

I took a quick look, and it looks like the PID file is being created
with a file option FILE_FLAG_DELETE_ON_CLOSE which causes the OS to
delete the file off the disk when all file handles are closed. So,
closing the file handle will result in the PID file being deleted.

This option was added because the PID file wasn't being removed if the
service crashed, which kept the service from restarting (oops).

https://issues.apache.org/jira/browse/DAEMON-183

It seems like an option to control what happens on startup when the
PID file already exists would be a good idea. You'll have to ask the
procrun folks about what the options are. It seems reasonable to be
able to read the PID file, since not being able to read it makes it
kind of useless other than as a lock-file (i.e. its contents are
irrelevant).

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUWVVlAAoJEBzwKT+lPKRYrQsP+wVCM1ASSBh+LuNIPjRUkUxi
3uBfjLArQIplC0l98dIQZZlBJQAsh0Lc61Tvo2Q+Ka5zPtq+WA9GlDVTH3MZo82E
kcleNxwFcmx0fGWizStEhMsxGqtGAKWct68FwVTFKDb8Bl68ud20fqJ5bEyyL6lP
2kV8QTjRcqJs42NvpjmW14NBGzXWiGF5BKOh3dGTdp1h6kIZrcOY/oOfX8noaO/K
evMDRrCas/MARzUQ/gBGMoZN5KmqPFcAvotlJlhECg1bpMTX38etIAwnMsnFRuZ9
Y0Ci5ffQ5I3MDvyWUf5Sv8UBJHLGUjwXzKbWCagDfBtgOZxp389t8Ro1TWDtMF7l
KWO9wvjX0Y1oS13xrl4VNNr/6oQuvybSwKYtMrFycRB8/K573QHrgSixI+7lNWNk
jyNus6cpOINxhMxsuyyu5oF+1O7EV0yWhXT+EIWt7mpzXLsyjQc/XbpFwQ3anNUv
YrD+CB+I/FLA/O1RSEEd9+NzpO45laSyoz3KfIqVFMkqCLKyjdA652jR+ik978kX
fc5gsQVtoeGAuTbNTm9eSS9hv2wjJoMSl0A6gT9Y8q83448IlhaSYE1mXSYG6XIp
DxNe0Dci0M5biNju+OIWrtW23zG4Q1eW8MIvs5wltVl8873zLdPpc49+dg3H+xIs
Mj55IlSYkg4GMHtdohle
=fhDz
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PID file locked on Windows 2008 system

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

David,

On 11/4/14 5:54 PM, David kerber wrote:
> On 11/4/2014 5:25 PM, Christopher Schultz wrote: Anil,
> 
> On 11/4/14 2:58 PM, Anil Ambati wrote:
>>>> We have a requirement to read the PID file created by the
>>>> Tomcat server process on Windows, but we are not able to
>>>> using RandomAccessFile or FileInputStream because the file
>>>> seems to be locked by the Tomcat process.
>>>> 
>>>> 
>>>> Why does the Tomcat server keep the PID file locked,
>>>> preventing other processes to even read the file? Is there a
>>>> work around or solution for this problem?
> 
> You must be using commons-daemon's procrun, otherwise known as the 
> Windows service wrapper. That process creates (and possibly locks)
> the PID file for Tomcat.
> 
>> This is only peripherally related to the OP, but is there a
>> situation where that file is not created, when using the windows
>> service wrapper? I run a dozen or so instances of TC 7.0.54 as
>> separate services on Windows 2008 R2 using the included renamed
>> version of procrun, and don't have any pid files anywhere that I
>> can find on my file system.

Sure: if you don't specify a --PidFile argument in procrun, you won't
get a PID file.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUWV8WAAoJEBzwKT+lPKRYXj0P/jTfRf4NQ2ozxcgIz1kW5SHL
QiSy4lEZnMoN7U52rLDIOH40z4eSp3Q5RqZh5eFbsWGuQBHm0n9DEa1KcR0oXKMD
SYzUnYdelfwi/TeG9dPSzHowMjLPhKE4h5p/fKwNx1tfsuFTbZ2rfLAlEl9XH8Zz
nJ79cN+gxF2n3Dy9+JA86nwO/bACQyMToK1rVjtofSpNGD5Q87ehMDY3BviEh0TX
6Y+TeEzRsgSCyrrNBLw5brfJloqAqf94NEDklytDuWSbCbVA5Sru7/KRVHE/RUmr
TUppuaNgZ3zwS3X8k+24duTQbvRc0ADPu94MbBYjcrIyti1BUfhoZQ9yvVLIxZOo
IT2WkhT34u8l1aDQcdkYc3DX4Osag03kHkEpoJiC8ALe79RSy6b+h/5xFbIZ1gZ5
UgXEsGCylAVErXlsz2695Ogt31LeCBOqoqmbfu1kpmAdZUDrlqG19lXy/hKgTlyB
W5DlmvtgR1od95IiYM4qF02bXrE+PoscpWdsjvMXcJqEjm2g/y8tWD9vHYyjtakw
6kzwPZa/ew+EBmADh6G+SMkeS0826gnguHQXuuxq5GR24Ws7hT/QMhrK2AuPl5nd
dnYfZ9taBvX+4giV6ZBny/nZGxux88/ZJ9S4yfRB4GvQh1cupfohra/xxkBX8+F8
vJUqSoRROGc5k9NJePWW
=2WQg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PID file locked on Windows 2008 system

Posted by David kerber <dc...@verizon.net>.
On 11/4/2014 5:25 PM, Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Anil,
>
> On 11/4/14 2:58 PM, Anil Ambati wrote:
>> We have a requirement to read the PID file created by the Tomcat
>> server process on Windows, but we are not able to using
>> RandomAccessFile or FileInputStream because the file seems to be
>> locked by the Tomcat process.
>>
>>
>> Why does the Tomcat server keep the PID file locked, preventing
>> other processes to even read the file? Is there a work around or
>> solution for this problem?
>
> You must be using commons-daemon's procrun, otherwise known as the
> Windows service wrapper. That process creates (and possibly locks) the
> PID file for Tomcat.

This is only peripherally related to the OP, but is there a situation 
where that file is not created, when using the windows service wrapper? 
  I run a dozen or so instances of TC 7.0.54 as separate services on 
Windows 2008 R2 using the included renamed version of procrun, and don't 
have any pid files anywhere that I can find on my file system.


>
> You may find users here who know the answer to your question, but you
> might have better luck posting to the commons mailing list to ask there.
>
> I suspect it's something silly like holding-open the PID file instead
> of writing to it and then closing it.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> Comment: GPGTools - http://gpgtools.org
>
> iQIcBAEBCAAGBQJUWVJWAAoJEBzwKT+lPKRYo0UP/A/HW0TvHf24Esw4tK+wlbLG
> tOwruOGaSC+fwO+hSnSszwmrbRbgwcD6EKwPuueO7aUy3Gp5rCIjnqH13J34It8m
> /31oO8ILwawUpDpup+QZnPOdgxPUfvVBf0Sobiec5HNTNcfiCvqjF4qBB0Eedbt/
> SMmaRBzNSOzSog4LpBKskHaBJSlt65UqMUS0sk2DrbYO+aJRCYA6hv8f5w8gWB0d
> c6z6KOHncVweFiN3fl8PXabKcTWvSEiLh4c+TdXLfC6syMIAQxjo+w5GSOgzQsEU
> ujWh/aB1FSKltNzvW0/2AKABKBH4r6ODuG7bpjrrQ3xSWZch2j8pFGqYgyuCVBwB
> EHclh9d18RYba031r01I9o9tDHGlt1DewquccBgb5m0qRduESqtI0/LYRpr0QUTP
> 6kgR2CCwi81d2OR8ifk6Jhs58ChGzWq4lpeR8ZAd+xsN/1VozznU0XvOOzNd8E6s
> qjZMYbSjaoFFPNHJNXW1ZrfIXfTrFWXHwO4e29BxZrKFhB4I3pL84GrQqO7jOFpc
> 5jO+avhdOGnAb7I/A2mz3b+XKqVL1Ob+U7rfL3uaUeZbuxraNZEqZuvyhgxZ9c23
> Zwwyw5RoU0QOCpJJfhoTdsAlgPVSNAgcvhxPMChzQQepSIoGHAOg6cQi5pptNKgP
> 1TUe3h54UjuGqY1lJ0wO
> =sBXy
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PID file locked on Windows 2008 system

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Anil,

On 11/4/14 2:58 PM, Anil Ambati wrote:
> We have a requirement to read the PID file created by the Tomcat
> server process on Windows, but we are not able to using
> RandomAccessFile or FileInputStream because the file seems to be
> locked by the Tomcat process.
> 
> 
> Why does the Tomcat server keep the PID file locked, preventing
> other processes to even read the file? Is there a work around or
> solution for this problem?

You must be using commons-daemon's procrun, otherwise known as the
Windows service wrapper. That process creates (and possibly locks) the
PID file for Tomcat.

You may find users here who know the answer to your question, but you
might have better luck posting to the commons mailing list to ask there.

I suspect it's something silly like holding-open the PID file instead
of writing to it and then closing it.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJUWVJWAAoJEBzwKT+lPKRYo0UP/A/HW0TvHf24Esw4tK+wlbLG
tOwruOGaSC+fwO+hSnSszwmrbRbgwcD6EKwPuueO7aUy3Gp5rCIjnqH13J34It8m
/31oO8ILwawUpDpup+QZnPOdgxPUfvVBf0Sobiec5HNTNcfiCvqjF4qBB0Eedbt/
SMmaRBzNSOzSog4LpBKskHaBJSlt65UqMUS0sk2DrbYO+aJRCYA6hv8f5w8gWB0d
c6z6KOHncVweFiN3fl8PXabKcTWvSEiLh4c+TdXLfC6syMIAQxjo+w5GSOgzQsEU
ujWh/aB1FSKltNzvW0/2AKABKBH4r6ODuG7bpjrrQ3xSWZch2j8pFGqYgyuCVBwB
EHclh9d18RYba031r01I9o9tDHGlt1DewquccBgb5m0qRduESqtI0/LYRpr0QUTP
6kgR2CCwi81d2OR8ifk6Jhs58ChGzWq4lpeR8ZAd+xsN/1VozznU0XvOOzNd8E6s
qjZMYbSjaoFFPNHJNXW1ZrfIXfTrFWXHwO4e29BxZrKFhB4I3pL84GrQqO7jOFpc
5jO+avhdOGnAb7I/A2mz3b+XKqVL1Ob+U7rfL3uaUeZbuxraNZEqZuvyhgxZ9c23
Zwwyw5RoU0QOCpJJfhoTdsAlgPVSNAgcvhxPMChzQQepSIoGHAOg6cQi5pptNKgP
1TUe3h54UjuGqY1lJ0wO
=sBXy
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PID file locked on Windows 2008 system

Posted by Anil Ambati <aa...@us.ibm.com>.
7.0.56
To make Tomcat to create a pid file , you need to specify name of the file 
in the Tomcat 7 properties window (To open this window select, Configure 
Tomcat menu option in the Windows Start menu)

Regards,



Anilkumar Ambati
 4205 S Miami Blvd

WebSphere Virtual Enterprise Development
 Durham, 27703-9141
Phone:
+1-919-254-6152
 USA
Mobile:
+1-919-434-5674
 

e-mail:
aambati@us.ibm.com
 

"You have no responsibility to live up to what other people think you 
ought to accomplish." -Richard Feynman (1918-1988)
 
 




From:
David kerber <dc...@verizon.net>
To:
Tomcat Users List <us...@tomcat.apache.org>, 
Date:
11/04/2014 04:37 PM
Subject:
Re: PID file locked on Windows 2008 system



On 11/4/2014 4:21 PM, Anil Ambati wrote:
> I was referring to the .pid file Tomcat server creates in the logs
> directory. This file contains the process ID of the Tomcat process.

What version of Tomcat, Windows, and Java are you using?  My 7.0.54 
doesn't seem to create that file anywhere in the file system.


>
> Regards,
> ------------------------------------------------------------------------
> *Anilkumar Ambati*              4205 S Miami Blvd 
> WebSphere Virtual Enterprise Development                Durham, 
27703-9141
> Phone:                 +1-919-254-6152                  USA
> Mobile:                +1-919-434-5674 
> e-mail:                aambati@us.ibm.com 
> ------------------------------------------------------------------------
> "You have no responsibility to live up to what other people think you
> ought to accomplish." -Richard Feynman (1918-1988)
>
>
>
>
>
> From:                  David kerber <dc...@verizon.net>
> To:            Tomcat Users List <us...@tomcat.apache.org>,
> Date:                  11/04/2014 03:45 PM
> Subject:               Re: PID file locked on Windows 2008 system
>
>
> ------------------------------------------------------------------------
>
>
>
> On 11/4/2014 2:58 PM, Anil Ambati wrote:
>  > Hi,
>  > We have a requirement to read the PID file created by the Tomcat 
server
>  > process on Windows, but we are not able to using RandomAccessFile or
>  > FileInputStream because the file seems to be locked by the Tomcat
> process.
>
> What is the PID file?  The only abbreviation I know by that name is the
> Process ID, which is just a number.
>
>
>
>  >
>  >
>  > Why does the Tomcat server keep the PID file locked, preventing other
>  > processes to even read the file? Is there a work around or solution 
for
>  > this problem?
>  >
>  > Any help is appreciated. Thank you in advance.
>  >
>  >
>  > Regards,
>  >
>  >
>  > Regards,
>  > 
------------------------------------------------------------------------
>  > *Anilkumar Ambati*       4205 S Miami Blvd
>  > WebSphere Virtual Enterprise Development           Durham, 27703-9141
>  > Phone:  +1-919-254-6152         USA
>  > Mobile:  +1-919-434-5674
>  > e-mail:  aambati@us.ibm.com
>  > 
------------------------------------------------------------------------
>  > "You have no responsibility to live up to what other people think you
>  > ought to accomplish." -Richard Feynman (1918-1988)
>  >
>  >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




Re: PID file locked on Windows 2008 system

Posted by David kerber <dc...@verizon.net>.
On 11/4/2014 4:21 PM, Anil Ambati wrote:
> I was referring to the .pid file Tomcat server creates in the logs
> directory. This file contains the process ID of the Tomcat process.

What version of Tomcat, Windows, and Java are you using?  My 7.0.54 
doesn't seem to create that file anywhere in the file system.


>
> Regards,
> ------------------------------------------------------------------------
> *Anilkumar Ambati* 	 4205 S Miami Blvd 	
> WebSphere Virtual Enterprise Development 	 Durham, 27703-9141
> Phone: 	+1-919-254-6152 	 USA
> Mobile: 	+1-919-434-5674 		
> e-mail: 	aambati@us.ibm.com 		
> ------------------------------------------------------------------------
> "You have no responsibility to live up to what other people think you
> ought to accomplish." -Richard Feynman (1918-1988)
>
>
>
>
>
> From: 	David kerber <dc...@verizon.net>
> To: 	Tomcat Users List <us...@tomcat.apache.org>,
> Date: 	11/04/2014 03:45 PM
> Subject: 	Re: PID file locked on Windows 2008 system
>
>
> ------------------------------------------------------------------------
>
>
>
> On 11/4/2014 2:58 PM, Anil Ambati wrote:
>  > Hi,
>  > We have a requirement to read the PID file created by the Tomcat server
>  > process on Windows, but we are not able to using RandomAccessFile or
>  > FileInputStream because the file seems to be locked by the Tomcat
> process.
>
> What is the PID file?  The only abbreviation I know by that name is the
> Process ID, which is just a number.
>
>
>
>  >
>  >
>  > Why does the Tomcat server keep the PID file locked, preventing other
>  > processes to even read the file? Is there a work around or solution for
>  > this problem?
>  >
>  > Any help is appreciated. Thank you in advance.
>  >
>  >
>  > Regards,
>  >
>  >
>  > Regards,
>  > ------------------------------------------------------------------------
>  > *Anilkumar Ambati*       4205 S Miami Blvd
>  > WebSphere Virtual Enterprise Development           Durham, 27703-9141
>  > Phone:  +1-919-254-6152         USA
>  > Mobile:  +1-919-434-5674
>  > e-mail:  aambati@us.ibm.com
>  > ------------------------------------------------------------------------
>  > "You have no responsibility to live up to what other people think you
>  > ought to accomplish." -Richard Feynman (1918-1988)
>  >
>  >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PID file locked on Windows 2008 system

Posted by Anil Ambati <aa...@us.ibm.com>.
I was referring to the .pid file Tomcat server creates in the logs 
directory. This file contains the process ID of the Tomcat process.

Regards,



Anilkumar Ambati
 4205 S Miami Blvd

WebSphere Virtual Enterprise Development
 Durham, 27703-9141
Phone:
+1-919-254-6152
 USA
Mobile:
+1-919-434-5674
 

e-mail:
aambati@us.ibm.com
 

"You have no responsibility to live up to what other people think you 
ought to accomplish." -Richard Feynman (1918-1988)
 
 




From:
David kerber <dc...@verizon.net>
To:
Tomcat Users List <us...@tomcat.apache.org>, 
Date:
11/04/2014 03:45 PM
Subject:
Re: PID file locked on Windows 2008 system



On 11/4/2014 2:58 PM, Anil Ambati wrote:
> Hi,
> We have a requirement to read the PID file created by the Tomcat server
> process on Windows, but we are not able to using RandomAccessFile or
> FileInputStream because the file seems to be locked by the Tomcat 
process.

What is the PID file?  The only abbreviation I know by that name is the 
Process ID, which is just a number.



>
>
> Why does the Tomcat server keep the PID file locked, preventing other
> processes to even read the file? Is there a work around or solution for
> this problem?
>
> Any help is appreciated. Thank you in advance.
>
>
> Regards,
>
>
> Regards,
> ------------------------------------------------------------------------
> *Anilkumar Ambati*              4205 S Miami Blvd 
> WebSphere Virtual Enterprise Development                Durham, 
27703-9141
> Phone:                 +1-919-254-6152                  USA
> Mobile:                +1-919-434-5674 
> e-mail:                aambati@us.ibm.com 
> ------------------------------------------------------------------------
> "You have no responsibility to live up to what other people think you
> ought to accomplish." -Richard Feynman (1918-1988)
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org




Re: PID file locked on Windows 2008 system

Posted by David kerber <dc...@verizon.net>.
On 11/4/2014 2:58 PM, Anil Ambati wrote:
> Hi,
> We have a requirement to read the PID file created by the Tomcat server
> process on Windows, but we are not able to using RandomAccessFile or
> FileInputStream because the file seems to be locked by the Tomcat process.

What is the PID file?  The only abbreviation I know by that name is the 
Process ID, which is just a number.



>
>
> Why does the Tomcat server keep the PID file locked, preventing other
> processes to even read the file? Is there a work around or solution for
> this problem?
>
> Any help is appreciated. Thank you in advance.
>
>
> Regards,
>
>
> Regards,
> ------------------------------------------------------------------------
> *Anilkumar Ambati* 	 4205 S Miami Blvd 	
> WebSphere Virtual Enterprise Development 	 Durham, 27703-9141
> Phone: 	+1-919-254-6152 	 USA
> Mobile: 	+1-919-434-5674 		
> e-mail: 	aambati@us.ibm.com 		
> ------------------------------------------------------------------------
> "You have no responsibility to live up to what other people think you
> ought to accomplish." -Richard Feynman (1918-1988)
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org