JConsole tomcat 连接在 Windows Server 2008 R2 上不起作用
我在连接到 Windows Server 2008 R2 上作为服务运行的 Tomcat 6 时遇到问题。这是我的设置的详细信息。
32 位 JDK 1.6._23 64 位 Windows Server 2008 R2
我的 jakarta 服务日志显示我正在设置 jvm 属性以打开对 JVM 的 jmx 远程访问
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[6] -Dcom.sun.management.jmxremote
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[7] -Dcom.sun.management.jmxremote.port=8999
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[8] -Dcom.sun.management.jmxremote.ssl=false
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[9] -Dcom.sun.management.jmxremote.authenticate=false
我在运行 tomcat 的同一台计算机上运行 jconsole,所以我不尝试远程连接,应该 端口没有任何问题我什至关闭了机器上的 Windows 防火墙以确保它没有收到 systernals tcpview显示
tomact6.exe 正在侦听端口 8999
我正在以用户 pmtomact 身份运行 tomact6 服务
我正在 jconsole 上以用户管理员身份运行 jconsole
我尝试了 localhost:8999 ,它尝试连接一段时间然后报告无法连接。
我尝试以用户管理员身份从startup.bat 开始使用正确的jmx 参数运行tomcat,但它也不起作用。
我尝试以 pmtomcat 用户身份运行 jconsole 仍然无法连接
我尝试在 C:\Users\pmtomcat\AppData\Local\Temp\hsperfdata_pmtomcat 下创建一个目录,并检查该目录是否可由 pmtomcat 用户写入,但它仍然不起作用。
关于如何解决这个问题的任何想法,它让我发疯?
I am having a problem connecting to Tomcat 6 running as a service on Windows Server 2008 R2. Here are the details of my setup.
32 Bit JDK 1.6._23
64 Bit Windows Server 2008 R2
My jakarta service log shows that I am setting the jvm properties to turn on jmx remote access to the JVM
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[6] -Dcom.sun.management.jmxremote
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[7] -Dcom.sun.management.jmxremote.port=8999
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[8] -Dcom.sun.management.jmxremote.ssl=false
[2010-12-22 23:22:21] [447 javajni.c] [debug] Jvm Option[9] -Dcom.sun.management.jmxremote.authenticate=false
I am running jconsole on the same machine that is running tomcat so I am not trying to connect remotely and should
not have any problems with ports I even turned off the windows firewall on the machine to make sure it was not getting
in the way
systernals tcpview shows that tomact6.exe is listening on port 8999
I am running tomact6 service as the user pmtomact
I am running jconsole as the user Administrator
on the jconsole I tried localhost:8999 and it tries to connect for a while then reports that it can can not connect.
I tried running tomcat as user administrator just starting from the startup.bat with the proper jmx paramters and it does not work either.
I tried running jconsole as pmtomcat user still no luck connecting
I tried creating a directory under C:\Users\pmtomcat\AppData\Local\Temp\hsperfdata_pmtomcat and checked that the directory was writable by the pmtomcat user still it does not work.
Any ideas of how I can troubleshoot this problem, it is driving me crazy?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
更多的谷歌搜索让我发现了这个问题报告http://tai-dev.blog.co.uk /2010/03/26/glassfish-jmx-and-windows-web-server-2008-can-play-together-with-a-few-tweaks-here-s-how-plus-bonus-jconsole-config-info -8251001/
修复方法是将 -Djava.rmi.server.hostname=127.0.0.1 添加到该服务的命令行选项中。我不知道为什么这个设置可以解决问题,但确实如此。
A bit more googling led me this problem repot http://tai-dev.blog.co.uk/2010/03/26/glassfish-jmx-and-windows-web-server-2008-can-play-together-with-a-few-tweaks-here-s-how-plus-bonus-jconsole-config-info-8251001/
and the fix was to add -Djava.rmi.server.hostname=127.0.0.1 to my command line options for the service. I have no idea why this setting fixes the problem but it does.