Jstack和Jstat停止了升级到JDK6u23的工作 [英] Jstack and Jstat stopped working with upgrade to JDK6u23

查看:221
本文介绍了Jstack和Jstat停止了升级到JDK6u23的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们最近从JDK6u20(Linux,32bit和64bit)升级到JDK6u23。此后,我们无法再使用工具jstack和 jstat 从运行过程获取监控信息。如果我们切换回JDK6u20,一切都正常。



我们正在运行Tomcat 6.根据这个论坛帖子,其他人也有同样的问题:
http://forums.oracle.com/forums/thread.jspa?threadID = 2151967& tstart = 0



运行简单的纯Java进程并使用这些工具。



Jstack说:无法打开套接字文件:目标进程未响应或未加载HotSpot VM当目标进程未响应时,可以使用-F选项。



Jstat说:19799没有找到



使用Jps根本不显示正在运行的进程,所以我猜这个问题是JDK6u23和JDK6u24的一般性质。它有一个新的热点引擎。也许某些东西不能与Tomcat和Hotspot v19结合使用。



任何想法?帮助不胜感激。



当然,我们以同样的用户身份运行,我们还没有改变任何其他的东西。只有JDK。

解决方案

在Oracle论坛中找到可能的答案:


尽管6u23 / 24介绍了这个问题,但它并不是jps中的错误。而是虚拟机本身的行为的改变。在GNU / Linux Jps和喜欢似乎只看/ tmp,但不一定你的CATALINA_TMPDIR。如果设置或不设置,尝试导出CATALINA_TMPDIR = / tmp,转换为-Djava.io.tmpdir = / tmp,重新启动Tomcat进程后,您应该看到Tomcat的数据为/ tmp / hsperfdata_ /,Jps最有可能再次工作。



We recently upgraded from JDK6u20 (Linux, 32bit and 64bit) to JDK6u23. Since then, we cannot longer use the tools jstack and jstat to get monitoring information from the running process. If we switch back to JDK6u20, everything works fine.

We are running Tomcat 6. According to this forum post, others have the same problem: http://forums.oracle.com/forums/thread.jspa?threadID=2151967&tstart=0

Running simple plain Java processes and using the tools works.

Jstack says: Unable to open socket file: target process not responding or HotSpot VM not loaded The -F option can be used when the target process is not responding.

Jstat says: 19799 not found

Using Jps does not show the running processes at all, so I guess the problem is more of general nature with JDK6u23 and also JDK6u24. It has a new Hotspot engine. Maybe something does not work in conjunction with Tomcat and that Hotspot v19.

Any idea? Help is appreciated.

P.S. Of course, we run that as the same user and we have not changed anything else. Only the JDK.

解决方案

Found a possible answer in the Oracle forum:

While it's true that 6u23/24 introduce this issue, it's not a bug in jps. Rather a change in behavior of the VM itself. On GNU/Linux Jps and the likes seem to only look at /tmp but not necessarily your CATALINA_TMPDIR. If set or not, try to export CATALINA_TMPDIR=/tmp which translates to "-Djava.io.tmpdir=/tmp" and after restarting the Tomcat process you should see Tomcat's data as "/tmp/hsperfdata_/" and Jps will most likely work again as well.

这篇关于Jstack和Jstat停止了升级到JDK6u23的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆