Mod_Jk and Tomcat Workaround for Easyapache4

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello,

Information about the end of Tomcat support in cPanel on CentOS 7 is available on the following thread:

Tomcat 8 and Java 8 support

I'm not aware of a workaround or plugin to allow for Tomcat to function with EasyApache 4 at this time, however feel free to reach out to a developer or system administrator for additional assistance. You can find a list of system administration services at:

System Administration Services

Thank you.
 

cachout58

Member
Aug 10, 2016
22
2
3
Dl
cPanel Access Level
Root Administrator
Hi,

We were trying to develop a module where in we can implement Mod_Jk and Tomcat in Centos 6.x with Easy Apache 4. The key areas to work would be

1. Creating mod_jk.so by installing tomcat connector
2. Loading mod_jk module in httpd.conf
3. Configuring jk.conf with path to worker.properties and jk log
4. Configuring cp_jkmount.conf
5. Configuring worker.properties
6. Installing and Configuring Tomcat
7. Tomcat options for startup configuration
8. Tomcat host template configuration
9. Creating Tomcat as service and init files
10.Commandliners for tomcat restart, add servlets, remove servlets

We are stuck in mod_jk.so creation, because we tried with every version of tomcat connector available from 1.2.37 to 1.2.41

we get the error

httpd: Syntax error on line 27 of /etc/apache2/conf/httpd.conf: Syntax error on line 1 of /etc/apache2/conf.modules.d/555_mod_jk.conf: Cannot load modules/mod_jk.so into server: /etc/apache2/modules/mod_jk.so: undefined symbol: ap_get_server_version
httpd could not be started

Can you help us in fixing this issue. Fixing this could make other steps easier to complete.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello,

It looks like you have made some progress on this based on your post at:

Request to keep EasyApache 3

We have been working non stop for past two weeks to get Apache2 [ EasyApache 4 ] + Mod_JK + Tomcat 7.x + Centos 6.x
We could successfully get it up and running with the present cpanel set up itself [ We dont know how stable it would be as cPanel builds are removing tomcat related options ]. I strongly advise cPanel to atleast keep [ EasyApache 4 ] + Mod_JK + Tomcat 7.x + Centos 6.x intact with future version. cPanel's point on integratin Tomcat Centos7 is understandable. However in Centos 6.x we do not see any issues. We already see "Install servlets" is not available in WHM 58.0 (build 20).

We even tried moving few servers to other control panel platforms, but developers had to do loads of work. Hope good sense prevails and cpanel listens to this issue.
Could you let us know the specific Tomcat related options are overwritten? Keep in mind this is unsupported, so while we can help with information about cPanel configurations and paths, we won't be able to directly support issues with Tomcat that could arise after using a custom workaround.

Thank you.
 

cachout58

Member
Aug 10, 2016
22
2
3
Dl
cPanel Access Level
Root Administrator
Hi,

Let me explain what we have done and then the issue we face

1. Installed jdk and sdk
2. Installed jsvc
3. Installed Tomcat with paths same as how cpanel does [ as in /usr/local/easy ]
4. We could not get apxs complied with easyapache 4 and hence as a work around got mod_jk.so from another server and placed it in /etc/apache2 modules
5. Created necessary conf files to be included for apache
6. When we start tomcat , it works [ We used few of the cpanel scripts in /etc/init.d for start and restart ]

Now the issue is when we update cpanel we get the following error. We are having 58.0.2 build

[2016-09-14 01:08:36 +0530] jakarta-commons-collections is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-dbcp is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-pool is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] W Exit Code: 18
[2016-09-14 01:08:36 +0530] ***** FATAL: Test install failed: error: Failed dependencies:
[2016-09-14 01:08:36 +0530] jakarta-commons-logging is needed by easy-tomcat7-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-collections is needed by easy-tomcat7-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-dbcp is needed by easy-tomcat7-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-pool is needed by easy-tomcat7-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] log4j is needed by easy-tomcat7-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-taglibs-standard >= 0:1.1 is needed by easy-tomcat7-webapps-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] ecj >= 4.2.1 is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-collections is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-dbcp is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-pool is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] The Administrator will be notified to review this output when this script completes
[2016-09-14 01:08:36 +0530] ***** FATAL: Error testing if the RPMs will install: Test install failed: error: Failed dependencies:
[2016-09-14 01:08:36 +0530] jakarta-commons-logging is needed by easy-tomcat7-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-collections is needed by easy-tomcat7-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-dbcp is needed by easy-tomcat7-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-pool is needed by easy-tomcat7-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] log4j is needed by easy-tomcat7-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-taglibs-standard >= 0:1.1 is needed by easy-tomcat7-webapps-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] ecj >= 4.2.1 is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-collections is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-dbcp is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] jakarta-commons-pool is needed by easy-tomcat7-lib-0:7.0.42-3.noarch
[2016-09-14 01:08:36 +0530] see https://go.cpanel.net/rpmcheckfailed for more information
[2016-09-14 01:08:36 +0530] The Administrator will be notified to review this output when this script completes
=> Log closed Wed Sep 14 01:08:36 2016
[2016-09-14 01:08:36 +0530] 17% complete

Update gets failed
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello,

Are those dependencies already installed under different package names? EX:

Code:
rpm -qa|grep jakarta
If not, are you able to install those packages on your system via YUM?

Thank you.