Programming/JAVA2014. 7. 31. 16:06

서버 환경

CentOS 6.5


java version "1.7.0_55"

1. 간단하게 vi 또는 vi 설정함




2. 인증 방식 넣기 (설정시 access,password파일 추가등록)




※ 계정등록 ( 구글링해보니까 LDAP 연동 방법도 있는 듯 필요시 구글링해볼것!! )

vi jmxremote.access ( 계정에 맞게 readonly 또는 readwrite )


admin readwrite \

      create*,* \



vi jmxremote.password


admin password


3. 에러발생시 처리 방안

※ Error: Exception thrown by the agent : Local host name unknown: dev-was01: dev-was01: Name or service not known

 => vi /etc/hosts 아래 host 추가하면됨   localhost dev-was01

※ shutdown시 Error: Exception thrown by the agent : java.lang.NullPointerException

 => CATALINA_OPTS 아닌 JAVA_OPTS 에 넣으면 Exception 에러발생

※ catalina-jmx-remote.jar 필요시 톰캣사이트에서 다운르도 후 lib폴더에 넣기!


4. Apache 메뉴얼 listener was configured in server.xml 추가하는 방법



The port to be used by the JMX/RMI registry for the Platform MBeans. This replaces the use of system property that should not be set when using this listener.


The port to be used by the Platform JMX/RMI server.


The address of the interface to be used by JMX/RMI server. This option is incompatible with setting the system to true.


Should any clients using these ports be forced to use local ports to connect to the the JMX/RMI server. This is useful when tunnelling connections over SSH or similar. Defaults to false.

Using file-based Authentication and Authorisation

If this listener was configured in server.xml as:

  <Listener className="org.apache.catalina.mbeans.JmxRemoteLifecycleListener"
          rmiRegistryPortPlatform="10001" rmiServerPortPlatform="10002" />

with the following system properties set (e.g. in$CATALINA_BASE/conf/jmxremote.password$CATALINA_BASE/conf/jmxremote.access

$CATALINA_BASE/conf/jmxremote.password containing:

admin letmein

$CATALINA_BASE/conf/jmxremote.access containing:

admin readwrite

then opening ports 10001 (RMI Registry) and 10002 (JMX/RMI Server) in your firewall would enable jconsole to connect to a Tomcat instance running behind a firewall using a connection string of the form:


with a user name of admin and a password of letmein.

Posted by 시니^^

댓글을 달아 주세요