Showing posts with label tomcat. Show all posts
Showing posts with label tomcat. Show all posts

Friday, 17 February 2012

How to enable jmx on tomcat in linux

create setenv.sh in $CATALINA_HOME/bin, add following lines to here

CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8086 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=192.168.4.38"


Important!: don't forget to give quote(")

Thursday, 16 February 2012

Tomcat: “java.lang.OutOfMemoryError: PermGen space” error

solution:

create setenv.sh as follow and put it into $CANTLINA_HOME/bin

#!/bin/sh
JAVA_OPTS="-Xms256m -Xmx512m -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m"