The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Mod_Jk and Tomcat Workaround for Easyapache4

Discussion in 'Workarounds and Optimization' started by cachout58, Aug 12, 2016.

Tags:
  1. cachout58

    cachout58 Member

    Joined:
    Aug 10, 2016
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Dl
    cPanel Access Level:
    Root Administrator
    Hi,

    Can any one suggest a workaround for Easyapache 4 and Mod_Jk, Tomcat 7.x in Centos 6.x
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. cachout58

    cachout58 Member

    Joined:
    Aug 10, 2016
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

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

    Request to keep EasyApache 3

    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.
     
  5. cachout58

    cachout58 Member

    Joined:
    Aug 10, 2016
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     

Share This Page