无法将JConsole与作为Windows服务运行的Tomcat一起使用 [英] Unable to use JConsole with Tomcat running as windows service

查看:159
本文介绍了无法将JConsole与作为Windows服务运行的Tomcat一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将tomcat 6.0.18作为Windows服务运行.在服务小程序中,jvm默认配置为使用JRE的jvm.dll.

I am running tomcat 6.0.18 as a windows service. In the service applet the jvm is configured default, i.e. it is using jvm.dll of the JRE.

我正在尝试使用JConsole监视此应用程序,但无法在本地连接到它.我添加了参数-Dcom.sun.management.jmxremote(在使用start.bat脚本启动tomcat时有效).但是jvm似乎没有选择该参数.

I am trying to monitor this application with JConsole but cannot connect to it locally. I added the parameter -Dcom.sun.management.jmxremote (which works when starting tomcat with the start.bat script). But the jvm does not seem to pick up the parameter.

推荐答案

有一个不错的GUI来编辑选项,无需在注册表中随意修改.

There's a nice GUI to edit the options, no need to muck around in the registry.

打开C:\ Program Files \ Apache Software Foundation \ Tomcat 6.0 \ bin \ tomcat6.exe(或双击任务栏中的监视器图标).转到Java窗格,将以下内容添加到参数列表中,然后重新启动Tomcat.

Open up the C:\Program Files\Apache Software Foundation\Tomcat 6.0\bin\tomcat6.exe (or just double-click on the monitor icon in the task bar). Go to the Java pane, add the following to the list of arguments, and restart Tomcat.


-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8086
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

然后,您可以连接JConsole或更新的VisualVM.

Then you can connect with JConsole or the newer VisualVM.

这篇关于无法将JConsole与作为Windows服务运行的Tomcat一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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