Reputation: 391
I want to build an automatic script or something equivalent to auto-deploy war-files to a tomcat-server via jenkins. The tomcat manager is not enabled, so the "Deploy to container Plugin" is pretty much a miss, since it needs the manager to be active. At the moment I'm pushing the war files to the tomcat via scp, however the tomcat seems to crash on every other try. I also tried the maven-tomcat-deploy alternative, which also needs the tomcat's manager to be active. Is there another way to auto-deploy the war files to my tomcat?
Upvotes: 3
Views: 1240
Reputation: 195
As far as I know you either need the manager to upload the war or copy it.
If Tomcat crashes after redeployment I'd check if there's no reference from an instance with its class loaded by the Tomcat classloader to an instance with its class loaded by your application classloader. When the GC kicks in the reference to your application loaded instance leads to the class which in turn leads to the classloader which references all the classes. So the GC can't clear the memory they take.
Most, if not all, of the issues I encountered with Tomcat failing redeployment have been caused by this kind of referencing issue. Because of this the old deployment will stay in memory though nothing will happen with it. You can increase the allocated memory but this will only postpone the crash.
Upvotes: 2