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 ...
随机推荐
- Spring boot 配置异步处理执行器
示例如下: 1. 新建Maven 项目 async-executor 2.pom.xml <project xmlns="http://maven.apache.org/POM/4.0 ...
- 中英文字符串截取函数msubstr
Thinkphp内置了一个可以媲美smarty的模板引擎,给我们带来了很大的方便.调用函数也一样,可以和smarty一样调用自己需要的函数,而官方也内置了一些常用的函数供大家调用. 比如今天我们说的截 ...
- Nginx: ubuntu系统上如何判断是否安装了Nginx?
问题描述:ubuntu系统上,如何查看是否安装了Nginx? 解决方法:输入命令行:ps -ef | grep nginx master process后面就是Nginx的安装目录. 延伸:1. 如何 ...
- 【线性基合并 树链剖分】bzoj4568: [Scoi2016]幸运数字
板子题 Description A 国共有 n 座城市,这些城市由 n-1 条道路相连,使得任意两座城市可以互达,且路径唯一.每座城市都有一个 幸运数字,以纪念碑的形式矗立在这座城市的正中心,作为城市 ...
- php读取不到https的域名
因测试环境php遇到无法正常读取到https的域名,但是域名配置了ssl证书,故做如下排查. php测试代码如下 $config['base_url'] = ''; #开启调试模式 #echo &qu ...
- Goroutine 中执行匿名函数 坑
//相对应for 循环 goroutine跑到慢 所以这里很大概率只会打印最后一条数据 func goRun() { values := []int{1, 2, 3} for _, v := rang ...
- 在ArchLinux、manjaro中安装MySql(mariaDB)
安装MySql数据库.但是在MySql被Oracle收购之后,很多开源支持者就转而使用MariaDb了.不过MariaDb也和MySql兼容的,所以基本不用有什么担心.由于ArchLinux只带了Ma ...
- 有限状态机(FSM)的设计与实现
有限状态机(FSM)是表示有限个状态及在这些状态之间的转移和动作等行为的数学模型,在计算机领域有着广泛的应用.通常FSM包含几个要素:状态的管理.状态的监控.状态的触发.状态触发后引发的动作.本文主要 ...
- luogu2577 [ZJOI2005]午餐
dp[i]表示第一队打饭时间i的最优解 #include <algorithm> #include <iostream> #include <cstring> #i ...
- Apache不能启动: Unable to open logs
日志名称: Application来源: Apache Service日期: 2014/3/12 14:43:21事件 ID: ...