如何使用catalina-ant连接到Tomcat7 JMX over SSL?

时间:2015-04-26 15:18:13

标签: ant tomcat7 jmx

我已经通过SSL配置了Tomcat JMX(类似于此Getting JMX working under Tomcat 7 with SSL and a self-signed cert

现在我正在尝试根据以下文档执行jmx:openjmx:get

https://tomcat.apache.org/tomcat-7.0-doc/monitoring.html

不幸的是,我无法指定信任存储,因此我得到以下异常:

sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

如何使用catalina-ant连接到Tomcat JMX?

1 个答案:

答案 0 :(得分:0)

我在ANT_OPTS命令执行之前配置ant时能够在Centos上运行它:

export ANT_OPTS="-Djavax.net.ssl.trustStore=<path to trust store> -Djavax.net.ssl.trustStorePassword=<trust store password>"

请查看如何在Windows中配置ANT_OPTS的示例 http://ant.apache.org/manual/install.html#proxy