What to do when tomcat stops responding but access denied to jstack and jmap?
Does anyone know any reason why tomcat might stop responding or any way I can find out why this is happening?
Tomcat seems to run fine for many weeks before falling over but it has happened a few times now.
I have seen this question tomcat 6 hangs after a few hours which seems to be the same problem I am having but I can't figure out how to run jstack.
This is on windows server 2008 with tomcat 2.0.28 running with jdk 6.0.20. Tomcat is running as a service logging on as a local user called tomcat_user. This user has the login as a service pri开发者_运维知识库v and is not a member of any groups. I tried adding the user to the administrators group but still get access denied.
From the command line I tried runas /user:servername\tomcat_user
Then when I run jps
I get this output:
4476 -- process information unavailable
1540 Jps
Both jstack 4476
and jmap -histo 4476
give the same error:
4476: Access is denied
I don't know why tomcat will have fallen over, but the "Access is denied" response often comes from not running the command prompt with Administrator rights, so jstack can't access the resources needed to trace a given process.
In Windows7 I found the simplest way to open the command prompt, as a one-off, with admin rights was to go through the start menu (Start->Accessories->Command Prompt) right-click on command prompt and say Run as Administrator.
精彩评论