paul
paul

Reputation: 303

tomcat hangs when deploying war file and restarting server

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.

Upvotes: 2

Views: 3850

Answers (1)

NoUsername
NoUsername

Reputation: 733

The way we always do our grails deploys is:

  • stop tomcat (and wait until it actually stopped)
  • delete the old .war file (and possibly the expanded directory: if tomcat expands ROOT.war to ./ROOT )
  • optional: delete/move old log files
  • copy the new .war file into the webapps folder
  • start 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.

Upvotes: 7

Related Questions