tomcat停止响应但jstack和jmap访问被拒绝怎么办?
有谁知道 Tomcat 可能停止响应的任何原因,或者我可以通过什么方式找出发生这种情况的原因?
Tomcat 在崩溃之前似乎运行良好数周,但现在已经发生过几次了。
我看到这个问题tomcat 6在几个小时后挂起这似乎与我遇到的问题相同,但我不知道如何运行 jstack。
这是在 Windows Server 2008 上运行的 Tomcat 2.0.28 和 jdk 6.0.20。 Tomcat 作为一项服务运行,以名为 tomcat_user 的本地用户身份登录。该用户以服务权限登录,并且不是任何组的成员。我尝试将用户添加到管理员组,但访问仍然被拒绝。
从命令行我尝试了 runas /user:servername\tomcat_user
然后,当我运行 jps
时,我得到以下输出:
4476 -- 进程信息不可用
1540 日元
jstack 4476
和 jmap -histo 4476
都给出相同的错误:
4476:访问被拒绝
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 priv 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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道为什么tomcat会崩溃,但是“访问被拒绝”响应通常来自没有以管理员权限运行命令提示符,因此jstack无法访问跟踪给定进程所需的资源。
在 Windows7 中,我发现打开命令提示符的最简单方法,作为一次性的,具有管理员权限的方法是通过开始菜单(开始 -> 附件 -> 命令提示符)右键单击命令提示符并说运行作为管理员。
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.