部署war文件并重新启动服务器时tomcat挂起 [英] tomcat hangs when deploying war file and restarting server

查看:61
本文介绍了部署war文件并重新启动服务器时tomcat挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我构建一个.war文件并部署到tomcat时,重启服务器时tomcat会挂掉.我无法通过 SSH 登录并检查正在发生的过程.这里的管理员不得不强制重启 tomcat 来解决问题,之后一切正常.这是第二次发生这种情况.有人能指出我正确的方向来解决这个问题吗?我检查了所有的 tomcats 日志,但找不到任何有用的信息.

When I build a .war file and deploy it to tomcat, tomcat will hang when I restart the server. I'm unable to SSH in and check the processes taking place. The admin here had to force reboot tomcat to solve the problem, and everything works great after that. This is the second time this has happened. Could someone point me in the right direction to troubleshoot this problem? I've checked all of tomcats logs, and I couldn't find anything helpful.

推荐答案

我们始终进行 grails 部署的方式是:

The way we always do our grails deploys is:

  • 停止 tomcat(并等到它真正停止)
  • 删除旧的 .war 文件(可能还有扩展目录:如果 tomcat 将 ROOT.war 扩展到 ./ROOT )
  • 可选:删除/移动旧日志文件
  • 将新的 .war 文件复制到 webapps 文件夹中
  • 启动tomcat

原因是如果你之前不停止tomcat,你很容易遇到内存泄漏,例如当某些类无法卸载等时.

The reason is that you can easily run into memory leaks if you don't stop tomcat before, e.g. when certain classes cannot be unloaded etc.

这篇关于部署war文件并重新启动服务器时tomcat挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆