As far as I googled lightly, I could not find a way to set remote debugging on tomcat under multi-instance operation, so it also serves as a reminder.
Version |
---|
CentOS |
Tomcat |
--Usually, remote debug setting of tomcat is done by enabling jpda (Java Platform Debugger Architecture) from catalina.sh.
catalina.sh jpda start
--But when you install tomcat7 with yum on CentOS7, catalina.sh is not generated. In other words, this method cannot be used ヽ (´ ー `) ノ
--Ports should be available in advance
--Assuming this content (especially [Manage tomcat service]). It is explained in great detail
Reference memo / Note about Apache Tomcat package of CentOS 7
bash:/etc/sysconfig/EnviromentFile[1...n]
JAVA_OPTS = '[Original content] -agentlib:jdwp=transport=dt_socket,address=[port number],server=y,suspend=n'
JPDA_SUSPEND=y
JPDA_ADDRESS=[IP of this host]:[port number]
When operating with multiple instances, there should be multiple files, so add them to all files. Be careful of duplicate port numbers
systemctl restart [[email protected]]
telnet [IP set earlier] [The port number you set earlier]
--What you are doing is just adding the debug setting option string added in catalina.sh to the option setting part of EnviromentFile.
――As mentioned on the above page, I was disappointed because the environment is very different from other distributions.
-Allow remote debugging of Tomcat8
-Sun VM calling options (Oracle official)
Recommended Posts