Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

Tomcat for EasyApache 4

Discussion in 'EasyApache' started by cachout58, May 15, 2017.

Tags:
  1. cachout58

    cachout58 Member

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

    We could create a small module which allows Tomcat work with easyapache 4. It works in production servers too. However there are couple of issues that we face

    1. We believe cpanel uses jsvc for tomcat. May we know how it is done or benifits of it. [ Very rarely we have tomcat restarting frequently when faulty classes or jar files are uploaded ]
    2. We followed the same method as easyapache 3 where a conf file for enabling jsp support for a domain and jk.conf file where worker properties are configured. When we rebuild httpdconf we get the following error

    The “/usr/sbin/httpd” command (process 12001) reported error number 1 when it ended.
    Configuration problem detected on line 1 of file /etc/apache2/conf.modules.d/jk.conf: JkWorkersFile only allowed once

    Any suggestions
     
  2. Eminds

    Eminds Well-Known Member

    Joined:
    Nov 10, 2016
    Messages:
    211
    Likes Received:
    13
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
  3. Anoop P Alias

    Anoop P Alias Well-Known Member

    Joined:
    Mar 31, 2015
    Messages:
    76
    Likes Received:
    10
    Trophy Points:
    8
    Location:
    Kochi,Kerala,India
    cPanel Access Level:
    Root Administrator
  4. cachout58

    cachout58 Member

    Joined:
    Aug 10, 2016
    Messages:
    21
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Dl
    cPanel Access Level:
    Root Administrator
    Thank you guys for your replies.

    I believe those plugins work only in easy apache 3 and not in 4.

    We are working for a module with easy apache 4.

    Any idea on how to avoid the error mentioned and how to make use of jsvc
     
  5. Anoop P Alias

    Anoop P Alias Well-Known Member

    Joined:
    Mar 31, 2015
    Messages:
    76
    Likes Received:
    10
    Trophy Points:
    8
    Location:
    Kochi,Kerala,India
    cPanel Access Level:
    Root Administrator
    The plugin works with EA4 too as it simply proxies to tomcat on the http port . cPanel use ajp and its a binary protocol and needs additional module support from apache httpd end .It probably might be more advanced than http . But you can easily implement a reverse proxy to tomcat (over http protocol) with mod_proxy which is standard in httpd. The plugin I mention is a nginx plugin and it simply reverse proxies to tomcat just like it does to apache httpd
     
  6. cachout58

    cachout58 Member

    Joined:
    Aug 10, 2016
    Messages:
    21
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Dl
    cPanel Access Level:
    Root Administrator
    The part that deals with apxs and ajp is over. We have crossed that bridge. We have some 10 % work left out which involves jsvc and fixing that error during a rare case of httpdconf rebuild. The reverse proxy method which you suggested has some limitations when deployed in a high availability environment. Thats why the cpanel method of apxs and ajp is best suited for cpanel servers. Any help from cpanel developers ?
     
  7. cPanelJasonT

    cPanelJasonT Level 2 Technical Analyst
    Staff Member

    Joined:
    Oct 21, 2014
    Messages:
    55
    Likes Received:
    6
    Trophy Points:
    83
    cPanel Access Level:
    Root Administrator
    Hello,
    The suggestions provided here are good. I'd also recommend voting up support for this in the following feature request:
    Tomcat Support in EasyApache 4
     
  8. cachout58

    cachout58 Member

    Joined:
    Aug 10, 2016
    Messages:
    21
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    Dl
    cPanel Access Level:
    Root Administrator
    We have already voted there. We were asked to raise this issue in the forum for any help in jsvc. Thats why we created this thread. Any help in jsvc implementation ?
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm not aware of any additional workarounds that would address the issue with EasyApache 4. You may want to consult with a system administrator to see if custom work could be completed to get it working. You can find a list of system admin services on the following URL:

    System Administration Services | cPanel Forums

    Thank you.
     
  10. MarcoP

    MarcoP Member

    Joined:
    Nov 17, 2006
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    153
    cPanel Access Level:
    Root Administrator
    Last month I was able for the first time to upgrade from EasyApache 3 to EasyApache 4 and still keeping, in that case, Confluence working.

    - If you use MPM ITK, build a new profile using a different MPM and if you need to, at the very end, return to your preferred profile.

    - Upgrade EasyApache.

    - Handpick your Tomcat proxies from /usr/local/apache.ea3/conf/userdata/... and copy them to /etc/apaches/conf.d/userdata/...

    - Copy and rename jk.conf
    Code:
    cp /usr/local/apache.ea3/conf/jk.conf /etc/apache2/conf.modules.d/991_mod_jk.conf
    - Load the module
    Code:
    ex -sc '1i|LoadModule jk_module modules/mod_jk.so' -cx /etc/apache2/conf.modules.d/991_mod_jk.conf
    - Create mod_jk.so softlink
    Code:
    ln -s -t /etc/apache2/modules /usr/local/apache.ea3/modules/mod_jk.so
    - Check and if all good reload Apache config
    Code:
    apachectl -t
    service httpd graceful
    Done! All should be working now.

    Return to MPM ITK if you need to.

    Hope it helps, cheers.
     
    #10 MarcoP, May 30, 2017
    Last edited: May 30, 2017
    cPanelMichael likes this.
  11. jndawson

    jndawson Well-Known Member

    Joined:
    Aug 27, 2014
    Messages:
    169
    Likes Received:
    18
    Trophy Points:
    18
    Location:
    Western US
    cPanel Access Level:
    DataCenter Provider
    Do you have any suggestions for new installs with EA4 since EA3 isn't provided/supported in new releases?
     
  12. MarcoP

    MarcoP Member

    Joined:
    Nov 17, 2006
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    153
    cPanel Access Level:
    Root Administrator
    I don't have a box where to test in advance, but i guess installing easy-tomcat7 is a start.

    I'm not even sure how long easy-tomcat7 will stll be available and or if updates will be pushed into repos... my main concern would be either choose the EasyApache way or yours, after all you need Apache+Connector+Tomcat.
     
    #12 MarcoP, Jun 1, 2017
    Last edited: Jun 1, 2017
  13. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    418
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
  14. MarcoP

    MarcoP Member

    Joined:
    Nov 17, 2006
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    153
    cPanel Access Level:
    Root Administrator
    Hello,

    I'd like to follow-up my tweaks and let you know everything is still up and running smoothly even after last updates.

    One think I've modified from the above guide is moving, instead of soft-linking, mod_jk.so.

    Cheers.
     
  15. cachout58

    cachout58 Member

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

    Have you tried your steps in fresh easyapache 4 servers yet ?

    Because the jsvc issue which we are facing is in easyapache 4 servers [ basically a new server with easy apache 4 direct ]

    We could re-create 95% of the features as in cpanel. Only big issue is jsvc, other than small issues.
     
  16. MarcoP

    MarcoP Member

    Joined:
    Nov 17, 2006
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    153
    cPanel Access Level:
    Root Administrator
    This weekend I'll come back from my long deserved holiday trip, get a cPanel trial licence and test on a CentOS 7 vm as I will need my self to move on from CentOS 6.

    I will keep you updated as I'll be facing the same issue.
     
Loading...

Share This Page