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 ...
随机推荐
- volatile引发的一系列血案
最早读<深入理解java虚拟机>对于volatile部分就没有读明白,最近重新拿来研究并记录一些理解 理解volatile前需要把以下这些概念或内容理解: 1.JMM内存模型 2.并发编程 ...
- 实验1 c语言最基本内容
part 1 验证性内容 总结:经受了数组和结构体的双重折磨后,发现这部分好简单...现在没啥问题了... part 2 补全程序 1.判断奇偶 // 程序功能: // 要求用户从键盘输入一个整数 ...
- 如何下载js类库
https://bower.io/ 这个已经淘汰 https://learn.jquery.com/jquery-ui/environments/bower/ Web sites are made ...
- Luogu P1666 前缀单词
校内资格赛题目,差点高一就要\(\tt{AFO}\)了 30分思路 对30%的数据,满足$1≤n≤10 $ 所以我们可以子集枚举,实际得分40pts #include<iostream> ...
- jquerymobi总结
http://app-framework-software.intel.com/ http://app-framework-software.intel.com/api2/#$_proxy
- [vijos]P1979 NOIP2015 信息传递
描述 有 n 个同学(编号为 1 到 n)正在玩一个信息传递的游戏.在游戏里每人都有一个固定的信息传递对象,其中,编号为 i 的同学的信息传递对象是编号为 TiTi 的同学. 游戏开始时,每人都只知道 ...
- 【前端_js】Json对象和Json字符串的区别
转载1: Json对象和Json字符串的区别 转载2: JSON字符串与JSON对象的区别
- Golang 谷歌搜索api 实现搜索引擎(前端 bootstrap + jquery)
Golang 谷歌搜索api 实现搜索引擎(前端 bootstrap + jquery) 体验 冒号搜索 1. 获取谷歌搜索api 谷歌搜索api教程 2. 后台调用 程序入口 main.go // ...
- MyBatis逆向工程中的Mapper接口以及Example的实例函数及详解
一.mapper接口中的方法解析 mapper接口中的函数及方法 方法 功能说明 int countByExample(UserExample example) thorws SQLException ...
- 【android】签署应用采用相同证书的用处
在应用的预期生命周期内,您应使用相同证书签署所有 APK 应用升级:当系统安装应用的更新时,它会比较新版本和现有版本中的证书.如果证书匹配,则系统允许更新.如果您使用不同的证书签署新版本,则必须为应用 ...