Posts

Showing posts from February, 2014

Remote Debugging Tomcat 6 using SSH tunnel

Image
My current IDE is Intellij Idea 12 and it is running on Windows 7 machine. However, server exist on one of the RedHat Enterprise machines. The main challenge is to debug the remote tomcat server via SSH port 22 only because that is the only allowed path. Even I cannot ping the server. Instead of catalina.sh, I have to always run the "sudo service tomcatx start|stop" because tomcat is installed as a service using redhat yum. From this blog I found the details to setup the tomcat. I changed the TOMCAT_HOME/conf/tomcat6.conf file to have the following JAVA_OPTS JAVA_OPTS="${JAVA_OPTS} -Xdebug -Xrunjdwp:transport=dt_socket,address=15005,server=y,suspend=n" This is just a one line. As shown in the above, the port is address that is 15005. Now I have to create the SSH connection using Putty as shown in the below source port: 15005 Destination:  localhost:15005 After add as shown in the above screenshot, you have to start the session.  Now yo