Configuring VisualVM with tomcat + linux

VisualVM is a tool that provides a visual interface for viewing detailed information about Java applications while they are running on a Java Virtual Machine (JVM), and for troubleshooting and profiling these applications.
Firs of all you need to configure JMX. For tomcat you need to perform this:

  1. In folder %CATALINA_HOME%/conf need to create remote.users with content: USER_1 PASSWORD_2
    USER_2 PASSWORD_2
  2. In folder %CATALINA_HOME%/conf need to create remote.acl with content: USER_1 PERMISSION_1
    USER_2 PERMISSION_2
    where permissions: readonly, readwrite 
  3. chmod 400 remote.users
  4. chmod 400 remote.acl
  5. chown tomcat:tomcat remote.users
  6. chown tomcat:tomcat remote.acl
  7. In tomcat %CATALINA_HOME%/bin/catalina.sh need to add:   CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote.password.file=/opt/tomcat/conf/remote.users
    -Dcom.sun.management.jmxremote.access.file=/opt/tomcat/conf/remote.acl -Dcom.sun.management.jmxremote
    -Dcom.sun.management.jmxremote.port=7777
    -Dcom.sun.management.jmxremote.ssl=false
    -Djava.rmi.server.hostname=1.1.1.1"
    where hostname - is tomcat server ip, and port - any not used port
  8. Restart Tomcat
  9. Visual VM comes with JDK from 6u7, run it on your local machine $JAVA_HOME/bin/jvisualvm 
  10. Click File->Add JMX connection use user, password, host and port
  11. Will appear new perspective whith your server connection

Sursa
2012-07-24 15:10:00



Comenteaza





Ultimele 25 posturi adăugate

16:33:06 —» Путепроводные Заметки
16:09:38 —» Путепроводные Заметки
15:01:29 —» Путепроводные Заметки
22:18:28 —» Путепроводные Заметки
20:20:34 —» Путепроводные Заметки
18:42:49 —» Путепроводные Заметки
14:45:02 —» Путепроводные Заметки
12:30:52Vizavi, vizavi de sau referitor la – cum este corect? —» Moldova Creștină
07:18:00GHILOTINA —» Leo Butnaru
18:46:05 —» Путепроводные Заметки
17:13:0075 de ani// Leo Botnaru, „Poetul cu aripile în lumină” —» Leo Butnaru
16:25:34 —» Путепроводные Заметки
15:26:15 —» Путепроводные Заметки
06:50:00PSALM —» Leo Butnaru
01:03:51 —» Путепроводные Заметки
16:18:08 —» Путепроводные Заметки
14:06:59 —» Путепроводные Заметки
11:04:36Emilia Perez —» APort | "Pentru un român care știe citi, cel mai greu lucru e să nu scrie." I.L. Carag
21:31:38 —» Путепроводные Заметки
17:12:31 —» Путепроводные Заметки
14:42:08 —» Путепроводные Заметки
09:34:43Consilieră independentă hărțuită de primar —» Curaj.TV | Media alternativă
09:34:43Consilieră independentă hărțuită de primar —» Curaj.TV | Media alternativă
08:35:00POEM MOBIL —» Andrei LANGA. Blogul personal
08:35:00Avertisment —» Andrei LANGA. Blogul personal