官术网_书友最值得收藏!

Common issues in deployment, configuration, and their troubleshooting

There are multiple issues which may arise after the deployment and configuration on Tomcat. Let's discuss the different issues:

Scenario 1:

Issue: Users complain that after the deployment, they can still view the old code.

Troubleshooting steps:

  • Check if the latest file is present on the doc base.
  • Check the catalina.out in the logs directory of Tomcat 7 and whether the WAR filename is deployed or not.
  • If both are checked and the issue still persists, then stop the Tomcat service and clear the content of the temp directory under the work/Catalina/localhost using the following command:
cd /opt/apache-tomcat-7.0.12/temp/ rm -rf ../temp/* cd /opt/apache-tomcat-7.0.12/work/Catalina/localhost/ rm -rf ../localhost/*
  • Restart the Tomcat service and ask the user to test the application.

Scenario 2:

Issue: Users complaining that they can view the current deployed code on one node and the other node still displays the previous version of the code.

Troubleshooting steps:

  • Check if the latest file is present on the doc base.
  • Check the catalina.out in the logs directory of Tomcat 7 and whether the WAR filename is deployed or not.

    If both are checked and the issue still persists, then stop the Tomcat service on node2. Replicate the code from node1 and clear the content of the temp directory under the work/Catalina/localhost using the following command:

cd /opt/apache-tomcat-7.0.12/temp/ rm -rf ../temp/* cd /opt/apache-tomcat-7.0.12/work/Catalina/localhost/ rm -rf ../localhost/*
  • Restart the Tomcat service and ask the user to test the application. Also, check the database status on node1 and node2, if they are in replication.
  • Connect the database from both the nodes.

Scenario 3:

Issue: The Tomcat instance is not coming up after the changes made to server.xml.

Troubleshooting steps:

  • Go to the Tomcat bin directory.
  • Then, run the configtest.sh. It will give you the following output:
[root@localhost ~]# cd /opt/apache-tomcat-7.0.12/bin/ [root@localhost bin]# ./configtest.sh Using CATALINA_BASE: /opt/apache-tomcat-7.0.12 Using CATALINA_HOME: /opt/apache-tomcat-7.0.12 Using CATALINA_TMPDIR: /opt/apache-tomcat-7.0.12/temp Using JRE_HOME: /opt/jdk1.6.0_24 Using CLASSPATH: /opt/apache-tomcat-7.0.12/bin/bootstrap.jar:/opt/apache-tomcat-7.0.12/bin/tomcat-juli.jar Error:- org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:435) Caused by: java.net.BindException: Address already in use at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:383) at java.net.ServerSocket.bind(ServerSocket.java:328) at java.net.ServerSocket.<init>(ServerSocket.java:194) at java.net.ServerSocket.<init>(ServerSocket.java:150)
  • It means that Tomcat is already running. Then, stop the web server and clear the temp directory.
  • Restart the services again.
主站蜘蛛池模板: 铜山县| 昌邑市| 卓尼县| 舟山市| 广昌县| 吕梁市| 聂拉木县| 鹤峰县| 青冈县| 中江县| 苏尼特右旗| 林西县| 宜都市| 宜兰县| 绥化市| 隆安县| 南充市| 陆良县| 汽车| 大悟县| 茌平县| 津市市| 墨竹工卡县| 利津县| 五指山市| 唐山市| 瑞金市| 凤阳县| 庆安县| 宝清县| 同江市| 丰镇市| 永平县| 华宁县| 肃宁县| 澄迈县| 吴江市| 湖北省| 铜梁县| 资源县| 台前县|