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.

chkservd and Tomcat

Discussion in 'General Discussion' started by Sash, Feb 28, 2003.

  1. Sash

    Sash Well-Known Member

    Joined:
    Feb 18, 2003
    Messages:
    252
    Likes Received:
    0
    Trophy Points:
    16
    Has anyone been able to get chkservd to monitor Tomcat?

    Thanks
    Mike
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    You need to enable a port in server.xml like the 8082 test connector

    <!-- Define a non-SSL HTTP/1.0 Test Connector on port 8082 -->
    <Connector className="org.apache.catalina.connector.http10.HttpConnector"
    port="8082" minProcessors="1" maxProcessors="1"
    enableLookups="true" redirectPort="8443"
    acceptCount="1" debug="0"/>

    and then put this in a tomcat file in /etc/chkserv.d

    #SERVICE = PORT, SEND, RESPONSE, RESTART COMMAND
    service[Tomcat_JSP]=8082,GET / HTTP/1.0,HTTP/1..,/usr/sbin/stoptomcat;/usr/sbin/starttomcat
     
    #2 dgbaker, Feb 28, 2003
    Last edited: Feb 28, 2003
  3. Sash

    Sash Well-Known Member

    Joined:
    Feb 18, 2003
    Messages:
    252
    Likes Received:
    0
    Trophy Points:
    16
    Hello

    Thanks that worked great, until we installed JSPs on a site and then the added text got deleted from the server.xml file.

    Is there a specific place that the text should go in the file? We have it listed under the line " <!-- Define a non-SSL HTTP/1.0 Test Connector on port 8082 -->"

    MIke
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    That is the correct spot. But check if there is a server.xml.in file. If there is make the same change in there as well. Reason being is that the .in file is what cpanel uses when adding servlets, it regenerates the server.xml from scratch.

    Hope that helps.
     
  5. Sash

    Sash Well-Known Member

    Joined:
    Feb 18, 2003
    Messages:
    252
    Likes Received:
    0
    Trophy Points:
    16
    I was editing the server.xml file and not the server.xml.in file.

    Thanks,
    Mike
     
  6. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    You need to edit both files.
     
  7. oderland

    oderland Well-Known Member
    PartnerNOC

    Joined:
    Dec 30, 2002
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Kungsbacka, Sweden
    Tomcat_JSP failed

    Hi

    After upgrading to tomcaty 4.1.2 we get the service monitor message about : Tomcat_JSP failed

    Jsp is woking fine the servlets aswel. Any clue what to change so status monitor will monitor the new installation?

    We had 4.0.3 installed bofore
     
  8. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    In 4.1.2 you need to go back and enable a listen port as listed above. Make sure the port matches what chkservd is looking for.
     
  9. oderland

    oderland Well-Known Member
    PartnerNOC

    Joined:
    Dec 30, 2002
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Kungsbacka, Sweden
    thanks. btw where do I find server.xml :)
     
Loading...

Share This Page