Service Status doesn't show Bind or Tomcat! How do you get t

nitromax

Well-Known Member
Feb 12, 2002
189
0
316
When I click on the Service Status link in WHM it doesn't show Bind or Tomcat! How do you get those to appear on there???

I saw Tomcat in there before and can't understand why it disappeared.
 
O

ozzi4648

Guest
I already posted about this http://forums.cpanel.net/read.php?TID=5463, as yet no fixes.
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
It shows what chkservd is told to show. For example in /etc/chkserv.d I have bind which looks like this;

#SERVICE = PORT, SEND, RESPONSE, RESTART COMMAND
service[bind]=x,x,x,/scripts/restartsrv bind,named,named

In the Service Status screen it shows up. You can tell what is suppossed to be there by also checking /var/run/chkservd directory this is where the service check files are held and is what the servicestatus screen is reading.

In order to get tomcat there you would need to create a tomcat chkservd file similar to the one above. Then put it in the /etc/chkserv.d directory and restart chkservd and voila it is now showing on the servicestatus screen.
 
Last edited:

nitromax

Well-Known Member
Feb 12, 2002
189
0
316
Thanks man! That works perfectly!

Only problem is with tomcat. It is showing as failed. It is probably due to something in the chkservd file I created. Here is what I have...

#SERVICE = PORT, SEND, RESPONSE, RESTART COMMAND
service[tomcat]=x,x,x,/scripts/restartsrv tomcat


Does anyone know what should be in this file???
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
Okay for tomcat I think I got it working.

1. Modify server.xml

&!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --&
to -1 --&
&Connector className=&org.apache.catalina.connector.http.HttpConnector&
port=&8080& minProcessors=&5& maxProcessors=&75&
enableLookups=&true& redirectPort=&8443&
acceptCount=&10& debug=&0& connectionTimeout=&60000&/&

2. restart tomcat
3. goto port 8080 in your browser from the main server domain

4. create tomcat script in /etc/chkserv.d

#SERVICE = PORT, SEND, RESPONSE, RESTART COMMAND
service[tomcat]=8080,GET / HTTP/1.0,HTTP/1..,/usr/sbin/starttomcat

5. restart chkservd /etc/init.d/chkservd restart

6. Check service status screen :)
 

haze

Well-Known Member
Dec 21, 2001
1,550
3
318
[quote:a017cac43f][i:a017cac43f]Originally posted by dgbaker[/i:a017cac43f]

Also for PostGreSQL

#SERVICE = PORT, SEND, RESPONSE, RESTART COMMAND

service[PostGreSQL]=5432,GET / HTTP/1.0,EFATAL..,/etc/init.d/postgresql restart[/quote:a017cac43f]

This seems to keep reporting postgres as failing ( tho it isn't ) and it restarts it.. Any ideas?
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
If you goto port 5432 in your browser do you see the EFATAL msg?

It could be that it's on a different port, in your postgresql.conf file for port is it 5432?

I would check that first. Also, the usual techy stuff, syntax, extra space, yada yada yada....
 

haze

Well-Known Member
Dec 21, 2001
1,550
3
318
not getting the EFATAL message in browser.. just getting &The page cannot be displayed&. There are no errors durring start up.. perhaps this is a config problem? any ideas what might cause this?
 

nitromax

Well-Known Member
Feb 12, 2002
189
0
316
Hey David,

My server.xml file looks like this:

&!-- ==================== Connectors ==================== --&

&!-- Normal HTTP
&Connector className=&org.apache.tomcat.service.PoolTcpConnector&&
&Parameter name=&handler&
value=&org.apache.tomcat.service.http.HttpConnectionHandler&/&
&Parameter name=&port&
value=&8080&/&
&/Connector&
--&

&!--
Uncomment this for SSL support.
You _need_ to set up a server certificate if you want this
to work, and you need JSSE.
1. Add JSSE jars to CLASSPATH
2. Edit java.home/jre/lib/security/java.security
Add:
security.provider.2=com.sun.net.ssl.internal.ssl.Provider
3. Do: keytool -genkey -alias tomcat -keyalg RSA
RSA is essential to work with Netscape and IIS.
Use &changeit& as password. ( or add keypass attribute )
You don't need to sign the certificate.

You can set parameter keystore and keypass if you want
to change the default ( user.home/.keystore with changeit )
--&
&!--
&Connector className=&org.apache.tomcat.service.PoolTcpConnector&&
&Parameter name=&handler&
value=&org.apache.tomcat.service.http.HttpConnectionHandler&/&
&Parameter name=&port&
value=&8443&/&
&Parameter name=&socketFactory&
value=&org.apache.tomcat.net.SSLSocketFactory& /&
&/Connector&
--&



Do I basically need to replace all of that with the connector statement you showed?
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
No, if you search the server.xml file there should be a line that looks like;
&!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --&
to -1 --&

This is where you add in the lines I listed.
 

nitromax

Well-Known Member
Feb 12, 2002
189
0
316
Hi David,

I can't find that line in my server.xml file. We are running tomcat v3. Is your's version 4 by chance? Maybe that is why I can't find it. I have tried adding it in the &!-- HTTP Normal section, but can't get it to work.

Any ideas? Sorry to keep bothering you with this, and thanks in advance if you can help!

I'm not that familar with Tomcat. The guy that installed this for me has it rigged so that you don't have to use the :8080 in the URL. I'm not sure if that's helpful or not. I have asked the Cpanel folks this about this, so if I hear from them about it I'll post it here. :)
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
Hey Nitromax - It's never a bother for giving help :).

We are using tomcat 4. That may be why it's not working with yours. You are correct though, 8080 is not required for tomcat to function/work, we use it strictly as a quick check for tomcat engine.

One thing you can try is in the conf directory see if there is a example server.xml file and if so see if it has a similar string.
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
[quote:69903af4b7][i:69903af4b7]Originally posted by iminteractive[/i:69903af4b7]

not getting the EFATAL message in browser.. just getting &The page cannot be displayed&. There are no errors durring start up.. perhaps this is a config problem? any ideas what might cause this?[/quote:69903af4b7]

iminteractive - Hmmm. Tricky one. I take that in your postgresql.conf file that it has port 5432 ? I did notice that it will not work though if in the browser it is not the main server domain.

For example: on ours, if I put http://clientdomain:5432 it fails, BUT if I use http://serverxx.server.ca:5432 it works serverxx.server being the true server name.

Now for the stupid question does PostgreSQL work on your server?
 

nitromax

Well-Known Member
Feb 12, 2002
189
0
316
Hi David,

In doing some very light research (and I do mean light) it looks like Tomcat 4 is a bit different. Perhaps those statments in the code sample you gave just don't work under the version 3 code base.

How hard is it to upgrade to from the cpanel tomcat 3 to cpanel tomcat 4? I'm not sure if I could pull it off on my own, but it looks like version 4 uses the cpu and memory more efficiently.

Do you know if the Latest Tomcat 4 installer sets everything up so it works &out the box& when you run the install.sh command, or is there a lot of manual configuration?

Thanks again!
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
Hi nitromax;

I'm not to sure about the upgrading portion as I started with 4.

Can anyone else comment on upgrading?

As for installing, we didn't find it to difficult, but if you want I can offer assisted install for you. PM me and we can discuss.
 

haze

Well-Known Member
Dec 21, 2001
1,550
3
318
[quote:c026d3f83d][i:c026d3f83d]Originally posted by dgbaker[/i:c026d3f83d]

[quote:c026d3f83d][i:c026d3f83d]Originally posted by iminteractive[/i:c026d3f83d]

not getting the EFATAL message in browser.. just getting &The page cannot be displayed&. There are no errors durring start up.. perhaps this is a config problem? any ideas what might cause this?[/quote:c026d3f83d]

iminteractive - Hmmm. Tricky one. I take that in your postgresql.conf file that it has port 5432 ? I did notice that it will not work though if in the browser it is not the main server domain.

For example: on ours, if I put http://clientdomain:5432 it fails, BUT if I use http://serverxx.server.ca:5432 it works serverxx.server being the true server name.

Now for the stupid question does PostgreSQL work on your server? [/quote:c026d3f83d]

I just tried your suggestion and it still didn't work. I've only got postgre up currently in test mode.. ill have to see if I can get any scripts working with her.. thanks.