You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Caldarale, Charles R" <Ch...@unisys.com> on 2010/02/02 22:19:45 UTC

RE: Still unable to get a heap dump from Tomcat running on Windows as a service

> From: Laird Nelson [mailto:ljnelson@gmail.com]
> Subject: Still unable to get a heap dump from Tomcat running on Windows
> as a service
> 
> I am still unable to get Tomcat to dump heap when it encounters an
> OutOfMemoryError.

You appear to be unique in that regard, since no one else seems to be having that problem.

> I'm using the graphical program that comes up when you select "Monitor
> Tomcat" from the Windows Start Menu.  I assume this is TomcatW.exe?

Not quite; it's tomcat6w.exe (note the digit and no caps).

> I have Tomcat 6.0.20 running as a service under the default 
> local user account

What's a "default local user account"?  Try using a real account, possibly one in the administrators group to see if that makes a difference.

> set to be allowed to interact with the desktop

Not needed.

> I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap
> to no avail.

Try just leaving that parameter out.

> I've set the working path for the Startup and Shutdown tabs
> to C:\crap and C:/crap with no effect.

The Shutdown working path doesn't matter, since that's not normally used.  Try setting the Startup path to the Tomcat installation directory after reinstalling Tomcat.  The direction of the slash doesn't seem to matter; I get the .hprof file generated in the designated directory regardless of which I use.

> I've set memory to a minimum of 512 and a maximum of 1024 MB.

You normally want those to be the same for a server environment to avoid heap thrashing.

> I entered the JVM options one per line.

That is a requirement.

> The tomcat documentation says to enter them separated by either 
> a "#" or a ";"

That's for command-line usage, not the GUI.

> Does anyone have any other suggestions to try before giving up on
> Tomcat in favor of either Jetty or (God help me) JBoss?

Sounds like a baby with the bathwater solution...

I would try removing the existing Tomcat service, reinstalling the current (6.0.24) Tomcat from the .zip download, using the service.bat script to create the service, and only then try recreating the OOM problem.  Unpack the .zip download into someplace other than C:\Program Files.  Also try setting the Level on the Logging tab to Debug rather than Error to see if that shows anything interesting.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


RE: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Laird Nelson [mailto:ljnelson@gmail.com]
> Subject: Re: Still unable to get a heap dump from Tomcat running on
> Windows as a service
> 
> I'm not a Windows guy, so bear with me for a moment:

I'm not sure there's anyone who really understands Windows security.

> Or is there some other privilege setting that says even if there's
> permission granted to the filesystem, the system account shalt not
> write even unto it?

Windows security settings are truly bizarre, and the Local System Account is subject to restrictions that don't seem to make any sense.  It certainly *can* write some files, otherwise Tomcat wouldn't be able to function at all.  BTW, on Vista, you can't seem to change the account the Tomcat service runs under with the GUI tool - it has to be done with the Administrative Tools -> Services snapin; don't know if that's true for Server 2K3.

I just tried forcing an OOME dump with Tomcat running under the Local System Account - and it worked.  This is under Vista 64, not Server 2K3, and starting with the .zip download.

You could always try downloading and installing the .zip version in an alternate location, and install the service under an alternate name just for testing.  I don't have access to a Server 2K3 system to play with.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


RE: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Subject: Re: Still unable to get a heap dump from Tomcat running on
> Windowsas a service
> 
> Would you prefer "software warlock"? I consider software to be a
> "black" art, as opposed to a "fine" one.

That would certainly be closer to the truth than anything connoting engineering.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Laird Nelson <lj...@gmail.com>.
On Wed, Feb 3, 2010 at 9:28 PM, Laird Nelson <lj...@gmail.com> wrote:

> Another data point: people have told me to download the Windows .zip
> distribution of Tomcat 6.0.24.  I want to point out that this is not linked
> anywhere on the Tomcat download page.  The *base* distribution is of
> course linked, and the .exe self-extracting-installer package, but I had to
> manually add "-windows-x86" to cause the Windows distribution (containing
> among other things tomcat.exe, service.bat, etc.) to get downloaded.
>
> This was true no matter what mirror I selected.
>

Should have been more clear: http://tomcat.apache.org/download-60.cgi has,
at the bottom, a Binary Distributions section, which lists the Core and
Deployer options.  If you hover over the Core .zip option, and then doctor
its URL such that "-windows-x86" appears right before the ".zip", then you
get the file that people have been recommending I download.

Thanks,
Laird

Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Mark Thomas <ma...@apache.org>.
On 04/02/2010 10:27, Domenico Marzilli wrote:
> Mark,
> please could you provide the .exe self-extracting-installer package for
> x64 (apache-tomcat-6.0.24-windows-x64.exe), too?

The .exe installer works for both 32 and 64 bit windows.

Mark

> Tnx
> 
> 
> 
> ----- Original Message ----- From: "Mark Thomas" <ma...@apache.org>
> To: "Tomcat Users List" <us...@tomcat.apache.org>
> Sent: Thursday, February 04, 2010 10:57 AM
> Subject: Re: Still unable to get a heap dump from Tomcat running on
> Windows as a service
> 
> 
>> On 04/02/2010 08:43, André Warnier wrote:
>>> Laird Nelson wrote:
>>>> Another data point: people have told me to download the Windows .zip
>>>> distribution of Tomcat 6.0.24.  I want to point out that this is not
>>>> linked
>>>> anywhere on the Tomcat download page.  The *base* distribution is of
>>>> course
>>>> linked, and the .exe self-extracting-installer package, but I had to
>>>> manually add "-windows-x86" to cause the Windows distribution
>>>> (containing
>>>> among other things tomcat.exe, service.bat, etc.) to get downloaded.
>>
>> The download page should have been updated for the new windows release
>> packaging but wasn't. Hopefully, this will happen later today.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> 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
> 


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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Domenico Marzilli <do...@gatelab.com>.
Mark,
please could you provide the .exe self-extracting-installer package for x64 
(apache-tomcat-6.0.24-windows-x64.exe), too?
Tnx



----- Original Message ----- 
From: "Mark Thomas" <ma...@apache.org>
To: "Tomcat Users List" <us...@tomcat.apache.org>
Sent: Thursday, February 04, 2010 10:57 AM
Subject: Re: Still unable to get a heap dump from Tomcat running on Windows 
as a service


> On 04/02/2010 08:43, André Warnier wrote:
>> Laird Nelson wrote:
>>> Another data point: people have told me to download the Windows .zip
>>> distribution of Tomcat 6.0.24.  I want to point out that this is not
>>> linked
>>> anywhere on the Tomcat download page.  The *base* distribution is of
>>> course
>>> linked, and the .exe self-extracting-installer package, but I had to
>>> manually add "-windows-x86" to cause the Windows distribution 
>>> (containing
>>> among other things tomcat.exe, service.bat, etc.) to get downloaded.
>
> The download page should have been updated for the new windows release
> packaging but wasn't. Hopefully, this will happen later today.
>
> Mark
>
> ---------------------------------------------------------------------
> 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: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Mark Thomas <ma...@apache.org>.
On 04/02/2010 08:43, André Warnier wrote:
> Laird Nelson wrote:
>> Another data point: people have told me to download the Windows .zip
>> distribution of Tomcat 6.0.24.  I want to point out that this is not
>> linked
>> anywhere on the Tomcat download page.  The *base* distribution is of
>> course
>> linked, and the .exe self-extracting-installer package, but I had to
>> manually add "-windows-x86" to cause the Windows distribution (containing
>> among other things tomcat.exe, service.bat, etc.) to get downloaded.

The download page should have been updated for the new windows release
packaging but wasn't. Hopefully, this will happen later today.

Mark

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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by André Warnier <aw...@ice-sa.com>.
Laird Nelson wrote:
> Another data point: people have told me to download the Windows .zip
> distribution of Tomcat 6.0.24.  I want to point out that this is not linked
> anywhere on the Tomcat download page.  The *base* distribution is of course
> linked, and the .exe self-extracting-installer package, but I had to
> manually add "-windows-x86" to cause the Windows distribution (containing
> among other things tomcat.exe, service.bat, etc.) to get downloaded.
> 
> This was true no matter what mirror I selected.
> 

That seems to be true.
Searching the bugs database does not seem to find anything related.

http://tomcat.apache.org/
in the menu at left : Download .. Tomcat 6.x
In that page (http://tomcat.apache.org/download-60.cgi),
6.0.24
   Binary Distributions
     Core
        .zip
right-click and save.

When I unzip that, I get these files under bin/ :

19.01.2010  14:42            22.012 bootstrap.jar
19.01.2010  14:42             2.374 catalina-tasks.xml
19.01.2010  14:42            11.366 catalina.bat
19.01.2010  14:42            15.582 catalina.sh
19.01.2010  14:42             9.341 commons-daemon.jar
19.01.2010  14:42             1.342 cpappend.bat
19.01.2010  14:42             2.104 digest.bat
19.01.2010  14:42             1.624 digest.sh
19.01.2010  14:42            74.398 jsvc.tar.gz
19.01.2010  14:42             3.146 setclasspath.bat
19.01.2010  14:42             4.114 setclasspath.sh
19.01.2010  14:42             2.096 shutdown.bat
19.01.2010  14:42             1.563 shutdown.sh
19.01.2010  14:42             2.097 startup.bat
19.01.2010  14:42             1.956 startup.sh
19.01.2010  14:42            25.804 tomcat-juli.jar
19.01.2010  14:42           240.745 tomcat-native.tar.gz
19.01.2010  14:42             3.468 tool-wrapper.bat
19.01.2010  14:42             3.459 tool-wrapper.sh
19.01.2010  14:42             2.101 version.bat
19.01.2010  14:42             1.567 version.sh

The previous zip I have, for 6.0.20, contained this in bin/ :

14.05.2009  01:15            17.508 bootstrap.jar
14.05.2009  01:15             2.374 catalina-tasks.xml
14.05.2009  01:15            10.652 catalina.bat
14.05.2009  01:15            13.573 catalina.sh
14.05.2009  01:15             9.341 commons-daemon.jar
14.05.2009  01:15             1.342 cpappend.bat
14.05.2009  01:15             2.104 digest.bat
14.05.2009  01:15             1.624 digest.sh
14.05.2009  01:15            74.398 jsvc.tar.gz
14.05.2009  01:15             4.951 service.bat
14.05.2009  01:15             3.452 setclasspath.bat
14.05.2009  01:15             4.556 setclasspath.sh
14.05.2009  01:15             2.096 shutdown.bat
14.05.2009  01:15             1.563 shutdown.sh
14.05.2009  01:15             2.097 startup.bat
14.05.2009  01:15             1.956 startup.sh
14.05.2009  01:15            19.399 tomcat-juli.jar
14.05.2009  01:15           240.128 tomcat-native.tar.gz
14.05.2009  01:15            57.344 tomcat6.exe
14.05.2009  01:15            98.304 tomcat6w.exe
14.05.2009  01:15             3.189 tool-wrapper.bat
14.05.2009  01:15             3.291 tool-wrapper.sh
14.05.2009  01:15             2.101 version.bat
14.05.2009  01:15             1.567 version.sh


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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Laird Nelson <lj...@gmail.com>.
Another data point: people have told me to download the Windows .zip
distribution of Tomcat 6.0.24.  I want to point out that this is not linked
anywhere on the Tomcat download page.  The *base* distribution is of course
linked, and the .exe self-extracting-installer package, but I had to
manually add "-windows-x86" to cause the Windows distribution (containing
among other things tomcat.exe, service.bat, etc.) to get downloaded.

This was true no matter what mirror I selected.

Best,
Laird

Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Laird Nelson <lj...@gmail.com>.
Aaaaand the whole thing was a red herring.  Well, most of it anyway.  The
buggy download page wasn't, and, indeed, the GUI monitor cannot change
Tomcat's "run as" user despite pretending that it can, but those are
comparatively minor issues.

I'm sure that had Tomcat actually run out of memory, it would have dumped
heap.  The webapp in question, however, Hudson, did not have any memory
options set for the massive Maven build it was running, and, since it forks
a Maven process, it was the Maven process which was running out of heap.
Days like this, I tell you.

Thanks for all your help.

Best,
Laird

On Wed, Feb 3, 2010 at 4:53 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Laird Nelson [mailto:ljnelson@gmail.com]
> > Subject: Re: Still unable to get a heap dump from Tomcat running on
> > Windows as a service
> >
> > turns out no matter what you do through the GUI console,
> > the service still runs as the system account
>
> Yes, I mentioned that a few days ago:
>
> "BTW, on Vista, you can't seem to change the account the Tomcat service
> runs under with the GUI tool - it has to be done with the Administrative
> Tools -> Services snapin; don't know if that's true for Server 2K3."
>
> http://marc.info/?l=tomcat-user&m=126514829321342&w=2
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Laird Nelson [mailto:ljnelson@gmail.com]
> Subject: Re: Still unable to get a heap dump from Tomcat running on
> Windows as a service
> 
> turns out no matter what you do through the GUI console,
> the service still runs as the system account

Yes, I mentioned that a few days ago:

"BTW, on Vista, you can't seem to change the account the Tomcat service runs under with the GUI tool - it has to be done with the Administrative Tools -> Services snapin; don't know if that's true for Server 2K3."

http://marc.info/?l=tomcat-user&m=126514829321342&w=2

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Laird Nelson <lj...@gmail.com>.
Quick update, because I know you all care: turns out no matter what you do
through the GUI console, the service still runs as the system account (!).
Might be worth filing as a bug?  I dimly recall reading something about this
somewhere in the Tomcat documentation.

Next up: Tomcat reinstall, but this time not using the .exe distribution.

L

Re: Still unable to get a heap dump from Tomcat running on Windows as a service

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

Chuck,

On 2/2/2010 6:59 PM, Caldarale, Charles R wrote:
>> From: André Warnier [mailto:aw@ice-sa.com]
>> Subject: Re: Still unable to get a heap dump from Tomcat running on
>> Windows as a service
>>
>> I guess that phrases like that one explain why one talks about the Art
>> of computer programming, and not the Science of ditto.
> 
> Knuth knew whereof he spoke. Having been at this a long time, and
> holding a mechanical engineering degree, I always get a laugh (or get
> upset) when someone uses the term "software engineer".

Would you prefer "software warlock"? I consider software to be a "black"
art, as opposed to a "fine" one.

>> the subject of every post contains a funny character between "as"
>> and "a service", except for Chuck's posts, which don't.
> 
> That's because I try to remember to delete the silly tab character
> that somebody's mailer keeps inserting...

Yeah, I guess some mailers choke on correctly-formatted SMTP messages.
The "funny character" is a newline plus a space, which is the correct
way to encode "more data" after the recommended 78-character limit has
been reached.

I use tb 3.0.1 and I see nothing "funny" at all, and don't have to
remove anything from the subject line.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktp7sQACgkQ9CaO5/Lv0PB7wwCglb7Ga8mCRtY5wnXK2cxFZb1E
CuoAn30inVyaho9fneq2gZsIgWsfWcfJ
=HBdy
-----END PGP SIGNATURE-----

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


RE: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: André Warnier [mailto:aw@ice-sa.com]
> Subject: Re: Still unable to get a heap dump from Tomcat running on
> Windows as a service
> 
> I guess that phrases like that one explain why one talks about the Art
> of computer programming, and not the Science of ditto.

Knuth knew whereof he spoke.  Having been at this a long time, and holding a mechanical engineering degree, I always get a laugh (or get upset) when someone uses the term "software engineer".

> the subject of every post contains a funny character between "as"
> and "a service", except for Chuck's posts, which don't.

That's because I try to remember to delete the silly tab character that somebody's mailer keeps inserting...

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by André Warnier <aw...@ice-sa.com>.
Caldarale, Charles R wrote:
...

> 
> You might try changing your log level and see if something interesting shows up.
> 
I guess that phrases like that one explain why one talks about the Art 
of computer programming, and not the Science of ditto.

That, along with the fact that in this thread, the subject of every post 
contains a funny character between "as" and "a service", except for 
Chuck's posts, which don't.



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


RE: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Caldarale, Charles R
> Subject: RE: Still unable to get a heap dump from Tomcat running on
> Windows as a service
> 
> I just tried forcing an OOME dump with Tomcat running under the Local
> System Account - and it worked.  This is under Vista 64, not Server
> 2K3, and starting with the .zip download.

BTW, increasing the logging level of the service wrapper got me these messages in jakarta_service_xxx.log when the OOME was hit:

[2010-02-02 15:59:40] [info] java.lang.OutOfMemoryError: Java heap space
[2010-02-02 15:59:40] [info] Dumping heap to java_pid3468.hprof ...
[2010-02-02 15:59:40] [info] Heap dump file created [9116554 bytes in 0.261 secs]

You might try changing your log level and see if something interesting shows up.

- Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Laird Nelson <lj...@gmail.com>.
On Tue, Feb 2, 2010 at 4:41 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> That's not a user account, that's the system account, with pretty much no
> privileges to do anything.
>

...which is pretty much how I like it.  :-)  I'm not a Windows guy, so bear
with me for a moment: since I have moved the permissions on the working
directory up such that Everyone has Full Control, surely then the system
account could drop a file in that directory?  Or is there some other
privilege setting that says even if there's permission granted to the
filesystem, the system account shalt not write even unto it?

Thanks again for the help.

Best,
Laird

RE: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Laird Nelson [mailto:ljnelson@gmail.com]
> Subject: Re: Still unable to get a heap dump from Tomcat running on
> Windows as a service
> 
> The one selected by default when one chooses the "Log On" tab of the
> graphical Tomcat monitor.  The value of the label is: "Local System
> account".  That radio button is checked.

That's not a user account, that's the system account, with pretty much no privileges to do anything.

> > Try using a real account, possibly one in the administrators 
> > group to see if that makes a difference.
> 
> I will try this; thanks.

All my testing has been done with a real account, so that may well be difference.

> Is there any reason to suppose that such an installation is 
> somehow borked?

Probably not; it's just that the .zip download gives you more options, which can make debugging problems like this much easier.

> Is there a problem with the out-of-the-box Windows experience
> that is heavily promoted on the Apache site?

Not sure it's "promoted"; I think it's mostly there for the casual Windows users who become panic-stricken when there's no .exe or .msi installer.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by André Warnier <aw...@ice-sa.com>.
Laird Nelson wrote:
> On Tue, Feb 2, 2010 at 4:40 PM, Sateesh Narahari <sateesh.narahari@gmail.com
>> wrote:
> 
>> The default user account 'System' has some weird permission state on
>> Windows, so try the admin user.
> 
> 
> OK; leery of running my Tomcat as the administrator, but am not up to speed
> on which Windows users would be better choices.  I naturally assumed that
> the local user selected by default was appropriate.
> 
> 
The "Local System" account is the "usual" local built-in account used to 
run Services. It has quite extensive privileges on the local machine 
(like the permission to run Services), but has no access to "Windows 
network" resources.  That includes stuff like network "shares", network 
printers etc..
It can however run programs that open TCP/IP sockets to/from anywhere. 
Go figure.

The suggestion of Chuck to run Tomcat as an Administrator is, I believe, 
just a temporary measure to verify if the fact that you are not getting 
the logfiles you expect, would be due to a permission problem to some 
local directory. It would be nice to eliminate that possible source of 
trouble.


Later on, you can revert to LocalSystem, or to some other user, local or 
domain-based.  Which one you choose is a matter of your in-house 
policies, or which resources the apps running in Tomcat will need to 
access later.
Just make sure that while you are running as Administrator, your Tomcat 
does not inadvertently create some files to which later, when it runs as 
another user again, it would not be able to write anymore.



While we are at it, the difference between the .exe version, and the 
.zip version :

The .exe version is like a shortcut, for people used to Windows 
installer programs and who just want to install and run Tomcat as a 
Windows Service, with a gui program (tomcat?w.exe) to set the run 
parameters in the Registry.  With that version, you cannot run Tomcat in 
a command-line window for instance.

The .zip version is more similar to the way you install Tomcat under 
Unix/Linux : you get a bunch of additional scripts and files in the 
tomcat/bin directory, which allow you to run Tomcat in a command-line 
window, which sometimes makes it easier to debug a problem.
It also contains scripts to install and configure Tomcat as a Windows 
Service, but they are a bit more "command-line oriented" rather than 
graphical.

The real pros tend to prefer the .zip.
;-)

It's the same Tomcat in both cases however.


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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Peter Crowther <pe...@melandra.com>.
On 2 February 2010 21:48, Laird Nelson <lj...@gmail.com> wrote:
> OK; leery of running my Tomcat as the administrator, but am not up to speed
> on which Windows users would be better choices.  I naturally assumed that
> the local user selected by default was appropriate.

LocalSystem can impersonate any user on the computer, but has no
rights over the network.  It's actually a very highly privileged
account - if an application running as LocalSystem wanted to, it could
impersonate the local Administrator account without requiring a
password.  There are a few niceties about what that impersonated
Administrator account could do... but not many.

If you doubt this, note that IIS runs as LocalSystem and uses
impersonation to handle integrated login - it just sets the thread
handling the request to the required identity before handling the
request, and sets it back afterwards ;-).

>> I believe you can also download resource kit from Microsoft that has tools
>> that lets you watch all objects opened by a process ( so, look if Tomcat is
>> even trying to open the file ). Its been a while, so don't recall tool
>> sytax.

Process Explorer (
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx ) would
be my weapon of choice here.

- Peter

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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Laird Nelson <lj...@gmail.com>.
On Tue, Feb 2, 2010 at 4:40 PM, Sateesh Narahari <sateesh.narahari@gmail.com
> wrote:

> The default user account 'System' has some weird permission state on
> Windows, so try the admin user.


OK; leery of running my Tomcat as the administrator, but am not up to speed
on which Windows users would be better choices.  I naturally assumed that
the local user selected by default was appropriate.


>  Also, review the event log  ( Windows Log,
> Security ) if it yields any information.
>

Yep; did that; no issues.


> I believe you can also download resource kit from Microsoft that has tools
> that lets you watch all objects opened by a process ( so, look if Tomcat is
> even trying to open the file ). Its been a while, so don't recall tool
> sytax.
>

Thanks!

Best,
Laird

RE: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Sateesh Narahari <sa...@gmail.com>.
The default user account 'System' has some weird permission state on
Windows, so try the admin user.  Also, review the event log  ( Windows Log,
Security ) if it yields any information. 

I believe you can also download resource kit from Microsoft that has tools
that lets you watch all objects opened by a process ( so, look if Tomcat is
even trying to open the file ). Its been a while, so don't recall tool
sytax.


-----Original Message-----
From: Laird Nelson [mailto:ljnelson@gmail.com] 
Sent: Tuesday, February 02, 2010 1:31 PM
To: Tomcat Users List
Subject: Re: Still unable to get a heap dump from Tomcat running on Windows
as a service

On Tue, Feb 2, 2010 at 4:19 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Laird Nelson [mailto:ljnelson@gmail.com]
> > Subject: Still unable to get a heap dump from Tomcat running on Windows
> > as a service
> >
> > I am still unable to get Tomcat to dump heap when it encounters an
> > OutOfMemoryError.
>
> You appear to be unique in that regard, since no one else seems to be
> having that problem.
>

Well aware of that; thanks!  The reason I'm bringing it up on this list is
just because I'm using the graphical tool without doing any egregious
hacking, and it is not working the way I would expect it to.  In such cases
I blame the software until it is proven that I am putting in bad inputs, at
which point I cheerfully blame myself and move on.  No one has accused me so
far of putting in bad inputs, and I can't see any myself.


> > I have Tomcat 6.0.20 running as a service under the default
> > local user account
>
> What's a "default local user account"?


The one selected by default when one chooses the "Log On" tab of the
graphical Tomcat monitor.  The value of the label is: "Local System
account".  That radio button is checked.


>  Try using a real account, possibly one in the administrators group to see
> if that makes a difference.
>

I will try this; thanks.


>  > set to be allowed to interact with the desktop
>
> Not needed.
>

I'll make sure this is off.


>  > I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap
> > to no avail.
>
> Try just leaving that parameter out.
>

Yep; tried that too.

The Shutdown working path doesn't matter, since that's not normally used.
>  Try setting the Startup path to the Tomcat installation directory after
> reinstalling Tomcat.  The direction of the slash doesn't seem to matter; I
> get the .hprof file generated in the designated directory regardless of
> which I use.
>

OK.


>  > I've set memory to a minimum of 512 and a maximum of 1024 MB.
>
> You normally want those to be the same for a server environment to avoid
> heap thrashing.
>

OK; will change.


>  > I entered the JVM options one per line.
>
> That is a requirement.
>

Good to know; thanks.


> > Does anyone have any other suggestions to try before giving up on
> > Tomcat in favor of either Jetty or (God help me) JBoss?
>
> I would try removing the existing Tomcat service, reinstalling the current
> (6.0.24) Tomcat from the .zip download, using the service.bat script to
> create the service, and only then try recreating the OOM problem.  Unpack
> the .zip download into someplace other than C:\Program Files.  Also try
> setting the Level on the Logging tab to Debug rather than Error to see if
> that shows anything interesting.
>

OK; for various reasons I can't do the reinstall (without bureaucratic
wrangling).  I did the initial install from the Windows executable installer
available from the main download site.  It was beautifully simple and I let
it set things up for me.  Is there any reason to suppose that such an
installation is somehow borked?  Is there a problem with the out-of-the-box
Windows experience that is heavily promoted on the Apache site?

Thanks for the help!

Best,
Laird


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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Laird Nelson <lj...@gmail.com>.
On Tue, Feb 2, 2010 at 4:19 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Laird Nelson [mailto:ljnelson@gmail.com]
> > Subject: Still unable to get a heap dump from Tomcat running on Windows
> > as a service
> >
> > I am still unable to get Tomcat to dump heap when it encounters an
> > OutOfMemoryError.
>
> You appear to be unique in that regard, since no one else seems to be
> having that problem.
>

Well aware of that; thanks!  The reason I'm bringing it up on this list is
just because I'm using the graphical tool without doing any egregious
hacking, and it is not working the way I would expect it to.  In such cases
I blame the software until it is proven that I am putting in bad inputs, at
which point I cheerfully blame myself and move on.  No one has accused me so
far of putting in bad inputs, and I can't see any myself.


> > I have Tomcat 6.0.20 running as a service under the default
> > local user account
>
> What's a "default local user account"?


The one selected by default when one chooses the "Log On" tab of the
graphical Tomcat monitor.  The value of the label is: "Local System
account".  That radio button is checked.


>  Try using a real account, possibly one in the administrators group to see
> if that makes a difference.
>

I will try this; thanks.


>  > set to be allowed to interact with the desktop
>
> Not needed.
>

I'll make sure this is off.


>  > I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap
> > to no avail.
>
> Try just leaving that parameter out.
>

Yep; tried that too.

The Shutdown working path doesn't matter, since that's not normally used.
>  Try setting the Startup path to the Tomcat installation directory after
> reinstalling Tomcat.  The direction of the slash doesn't seem to matter; I
> get the .hprof file generated in the designated directory regardless of
> which I use.
>

OK.


>  > I've set memory to a minimum of 512 and a maximum of 1024 MB.
>
> You normally want those to be the same for a server environment to avoid
> heap thrashing.
>

OK; will change.


>  > I entered the JVM options one per line.
>
> That is a requirement.
>

Good to know; thanks.


> > Does anyone have any other suggestions to try before giving up on
> > Tomcat in favor of either Jetty or (God help me) JBoss?
>
> I would try removing the existing Tomcat service, reinstalling the current
> (6.0.24) Tomcat from the .zip download, using the service.bat script to
> create the service, and only then try recreating the OOM problem.  Unpack
> the .zip download into someplace other than C:\Program Files.  Also try
> setting the Level on the Logging tab to Debug rather than Error to see if
> that shows anything interesting.
>

OK; for various reasons I can't do the reinstall (without bureaucratic
wrangling).  I did the initial install from the Windows executable installer
available from the main download site.  It was beautifully simple and I let
it set things up for me.  Is there any reason to suppose that such an
installation is somehow borked?  Is there a problem with the out-of-the-box
Windows experience that is heavily promoted on the Apache site?

Thanks for the help!

Best,
Laird

Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Laird Nelson <lj...@gmail.com>.
Thanks for sticking with me, guys.  No luck so far.  I will begin the
laborious process of requesting a reinstall.  :-(

(Incidentally, no service logs either, anywhere; this is all very bizarre.)

L

On Tue, Feb 2, 2010 at 7:01 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com]
> > Subject: Re: Still unable to get a heap dump from Tomcat running on
> > Windows as a service
> >
> > set the HeapDumpPath option, so you can actually write to a
> > location on disk
>
> You're late to the party; that's already been tried, to no effect.  It's
> not needed if the Startup tab has the Working Path set - which Laird has
> also tried.  Seems to work for everyone but him.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com]
> Subject: Re: Still unable to get a heap dump from Tomcat running on
> Windows as a service
> 
> set the HeapDumpPath option, so you can actually write to a 
> location on disk

You're late to the party; that's already been tried, to no effect.  It's not needed if the Startup tab has the Working Path set - which Laird has also tried.  Seems to work for everyone but him.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Still unable to get a heap dump from Tomcat running on Windows as a service

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
set the HeapDumpPath option, so you can actually write to a location on disk

On 02/02/2010 02:19 PM, Caldarale, Charles R wrote:
>> From: Laird Nelson [mailto:ljnelson@gmail.com]
>> Subject: Still unable to get a heap dump from Tomcat running on Windows
>> as a service
>>
>> I am still unable to get Tomcat to dump heap when it encounters an
>> OutOfMemoryError.
>>      
> You appear to be unique in that regard, since no one else seems to be having that problem.
>
>    
>> I'm using the graphical program that comes up when you select "Monitor
>> Tomcat" from the Windows Start Menu.  I assume this is TomcatW.exe?
>>      
> Not quite; it's tomcat6w.exe (note the digit and no caps).
>
>    
>> I have Tomcat 6.0.20 running as a service under the default
>> local user account
>>      
> What's a "default local user account"?  Try using a real account, possibly one in the administrators group to see if that makes a difference.
>
>    
>> set to be allowed to interact with the desktop
>>      
> Not needed.
>
>    
>> I've specified -XX:HeapDumpPath=C:\crap, and -XX:HeapDumpPath=C:/crap
>> to no avail.
>>      
> Try just leaving that parameter out.
>
>    
>> I've set the working path for the Startup and Shutdown tabs
>> to C:\crap and C:/crap with no effect.
>>      
> The Shutdown working path doesn't matter, since that's not normally used.  Try setting the Startup path to the Tomcat installation directory after reinstalling Tomcat.  The direction of the slash doesn't seem to matter; I get the .hprof file generated in the designated directory regardless of which I use.
>
>    
>> I've set memory to a minimum of 512 and a maximum of 1024 MB.
>>      
> You normally want those to be the same for a server environment to avoid heap thrashing.
>
>    
>> I entered the JVM options one per line.
>>      
> That is a requirement.
>
>    
>> The tomcat documentation says to enter them separated by either
>> a "#" or a ";"
>>      
> That's for command-line usage, not the GUI.
>
>    
>> Does anyone have any other suggestions to try before giving up on
>> Tomcat in favor of either Jetty or (God help me) JBoss?
>>      
> Sounds like a baby with the bathwater solution...
>
> I would try removing the existing Tomcat service, reinstalling the current (6.0.24) Tomcat from the .zip download, using the service.bat script to create the service, and only then try recreating the OOM problem.  Unpack the .zip download into someplace other than C:\Program Files.  Also try setting the Level on the Logging tab to Debug rather than Error to see if that shows anything interesting.
>
>   - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
>
>
> ---------------------------------------------------------------------
> 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