Troubleshotting: Tomcat installation bugs

From CPWiki

Jump to: navigation, search

Note: these instructions is provided according cPanel Tomcat Installer bugs on versions near WHM 10.6.0 cPanel 10.8.0-S21.


Contents

Note: first try to reinstall Tomcat by WHM

On WHM Addon Modules, click on uninstall tomcat. Wait WHM finish uninstall and click on Addon Modules again. Check "Install and Keep Updated" on Tomcat and click on Save button.

If it does not solve problem, go ahead and follow this workaround. My experience is that after any new domain I add Servlets I need to do following steps too.



Let's remove Tomcat and install it again.


Checking everything is clean

/scripts/upcp --force
cd /usr/local/apache/conf/
mv workers2.properties workers2.properties.old
mv workers.properties  workers.properties.old
cd /usr/local/cpanel/modules-install/tomcat-Linux-i686
./uninstall
rm -rf /usr/local/jdk1.5.0_02

Installing tomcat

cd /usr/local/cpanel/modules-install/tomcat-Linux-i686
./install

Copy and past tomcat root password.

If it fail while installing Tomcat on WHM: install hangs after license

Remove file installed is trying to replace:

rm -rf /usr/local/jdk1.5.0_02
cd /usr/local/cpanel/modules-install/tomcat-Linux-i686
./install

Fixing jsvc

We need to compile manually jsvc since Cpanel Tomcat installer are bugged while trying to compile it.

cd /usr/local/jakarta/tomcat/bin
cd jsvc-src/
./configure
make
killall jsvc
cp jsvc ../

Making sure Tomcat is running and apache is restarted

/scripts/restartsrv_tomcat
service httpd restart

Each time you install Servlet on a domain

After installing Servlet on WHM on some domain, if Tomcat doesn't open, try to restart it again.

Sometimes Tomcat can broke install after adding Servlet on a domain by WHM. If it happen, just follow these instructions again - probably it will work.

Preparing Struts: Mapping .do

If you need .do: Edit /usr/local/apache/conf/httpd.conf and add a line inside domain VirtualHost:


<IfModule mod_jk.c>
   JkMount /*.do  ajp13
</IfModule>


Restart apache:

service httpd restart
Personal tools