tomcat Enabling JMX Remote
wiki 利用JMX做存活监控
cat /opt/wiki/work/bin/setenv.sh | grep jmxremote
CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8410 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Duser.timezone=Asia/Shanghai ${CATALINA_OPTS}"
关于如何Enabling JMX Remote,参考如下:
http://tomcat.apache.org/tomcat-5.5-doc/monitoring.html#Enabling_JMX_Remote
The Sun website includes the list of options and how to configure JMX Remote on Java 5:http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html.
For quick installation you find here a short installation guide:
Add the following parameters to your Tomcat startup script:
set CATALINA_OPTS=-Dcom.sun.management.jmxremote \ |
||
- When you think authorization is a good, add and change this :
-Dcom.sun.management.jmxremote.authenticate=true \
-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password \
-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access \ - edit the access allow file $CATALINA_BASE/conf/jmxremote.access :
monitorRole readonly
controlRole readwrite - edit the password file $CATALINA_BASE/conf/jmxremote.password :
monitorRole tomcat
controlRole tomcatTip: Password File must be readonly and not accessible from every other user! Remove all other users under windows to access this file.
Note:The JSR 160 JMX-Adaptor opens a second data protocol port. That is a problem when you have installed a local firewall. However, there is at least one possible workaround: using a custom JMXConnectorServer.
Start a JMX Adaptor with fix data port is supported with Tomcat 5.5.25 src release:
<Server ...> |
||
You can use all JMX system properties (com.sun.management.jmxremote.xxx) to configure the adaptor :-)
At your remote jconsole call the jmx adaptor with following command
jconsole service:jmx:rmi://myhost:8084/jndi/rmi://myhost:8083/server
Activate JMX MX4J Http Adaptor with Java 1.4:
- Install the tomcat compat package
- Install the mx4j-tools.jar at common/lib. Please, use the same MX4j version as your Tomcat release
- Configure a MX4J JMX HTTP Adaptor at your AJP Connector
<Connector port="${AJP.PORT}"
handler.list="mx"
mx.enabled="true"
mx.httpHost="${JMX.HOST}"
mx.httpPort="${JMX.PORT}"
protocol="AJP/1.3" />Tip: With ${AJP.PORT}=0 no ajp connection where started.
Note: MX4J JSR 160 RMI Adaptor to support JDK 1.4 currently not integrated.
- Start your Tomcat and look with a browser at http://${JMX.HOST}:${JMX.PORT}
- With the mx connector parameter
mx.authMode="basic" mx.authUser="tomcat" mx.authPassword="strange"
you can control the access! - A complete list of all Tomcat core MBeans can you find at http://tomcat.apache.org/tomcat-5.5-doc/catalina/funcspecs/mbean-names.html.
tomcat Enabling JMX Remote的更多相关文章
- connect to tomcat with JMX
Answering my own question; turned out to be easier than i thought. Following needs to be done, for e ...
- Tomcat配置JMX远程监控(Windown7 Linxu)
一:Window7下配置方式. 1.配置catalina.bat 在第一行加入下面配置 注意下面这些配置要在一行,注意包含空格. set JAVA_OPTS=-Dcom.sun.management. ...
- Tomcat开启JMX监控
搭建模拟环境: 操作系统:centos7内存:1Gjdk:1.8.0_131tomcat:8.0.48 环境准备我们这里就不直接演示了,直接配置tomcat的jmx 1.进入到tomcat的bin目录 ...
- Tomcat 打开jmx
jmx 配置后可以通过windows java客户端自带的jconsole.exe配置登陆,直观的查看jvm的情况及系统的各项指标: 一.配置linux下tomcat的jmx 具体配置如下,如果生产环 ...
- Tomcat开启JMX监控 visualvm
Tomcat开启JMX监控 https://blog.csdn.net/dongdong2980/article/details/78476393
- tomcat配置JMX
最近看JDK的命令行工具,使用Java VisualVM和Jconsole工具都可以监控java程序的运行情况(包括CUP和内存等的使用情况,线程的运行状态等) 在Java VisualVM 工具里可 ...
- zabbix监控tomcat(使用jmx监控,但不使用系统自带模版)
一,zabbx使用jmx监控tomcat的原理分析 1.Zabbix-Server找Zabbix-Java-Gateway获取Java数据 2.Zabbix-Java-Gateway找Java程序(j ...
- 排障利器之远程调试与监控 --jmx & remote debug
监控和调试功能是应用必备的属性之一,其手段也是多种多样. 一般地,我们可以通过:线上日志, zabbix, grafana, cat 等待系统做一问题留底,有问题及时报警,从而达到监控效果. 而对于应 ...
- linux 下idea 启动tomcat报JMX 1099错误解决办法
开始使用linux开发环境,在配置idea 下tomcat 启动时报错,提示错误为unable to ping server at localhost:1099. 解决办法: 修改/etc/hosts ...
随机推荐
- sessionStorage对象
sessStorage对象是一个会话形式的数据存储,当用户关闭浏览器的窗口后,数据就会被删除. 实例: <!DOCTYPE html><html><head> &l ...
- STL 之 sort 函数使用方法
关于Sort Sort函数是C++ STL(Standard Template Library / 标准函数库) <algorithm>头文件中的一个排序函数,作用是将一系列数进行排序,因 ...
- manjaro(arch)里的vbox 安装centos7后,centos无法联网的解决办法
第一步,在VirtualBox中设置网卡连接方式:点“设置”,在弹出的界面中点“网络”,最后选择“连接方式”为“桥接网卡”. 回到centOS中,进入终端,输入命令:ip addr,查看网络配置文件的 ...
- FIFO buffer 和普通buffer区别
1.FIFO可以说一块具体的硬件存储设备,也可以说程序在内存中开辟的一段内存区域.而buffer往往就是一段缓冲的数据区域 2.FIFO的数据是先进先出的,而buffer没有这个限制,可以全局访问 3 ...
- poj-3009 curling2.0(搜索)
Curling 2.0 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 26408 Accepted: 10546 Des ...
- linux用户和用户组管理详解
Linux 用户和用户组管理 Linux系统是一个多用户多任务的分时操作系统,任何一个要使用系统资源的用户,都必须首先向系统管理员申请一个账号,然后以这个账号的身份进入系统. 用户的账号一方面可以帮助 ...
- emacs设置字体
* C-h f set-default-font set-default-font is an alias for `set-frame-font' in `frame.el'. (set-defau ...
- CodeForces 8D Two Friends 判断三个圆相交
题意: 有两个人\(Alan\)和\(Bob\),他们现在都在\(A\)点,现在\(Bob\)想去\(B\)点,\(Alan\)想先到\(C\)点再去\(B\)点. \(Alan\)所走的总路程不能超 ...
- Python虚拟机之异常控制流(四)
Python虚拟机中的异常控制流 先前,我们分别介绍了Python虚拟机之if控制流(一).Python虚拟机之for循环控制流(二)和Python虚拟机之while循环控制结构(三).这一章,我们来 ...
- apache php 多站点配置 重新整理
需要下载的东东:apache_2.0.59-win32-x86-no_ssl.msi (服务器软件,用来编译PHP的) php-5.1.5-Win32.zip (PHP的主文件) 第一步:1.安装 ...