Error while Install Servlets for one account

simonlee

Active Member
Jan 19, 2003
37
0
156
I got error message while enabling the servlets in WHM:
"Catalina.stop: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused";

and when I try using http://domainname.com/servlets/IsItWorking to test, got the "404 Not Found error":
"Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request"

The version of installed Tomcat is cptomcat4.0.3.

Anybody can give some suggestion? Thanks in advance.

Scanning httpd.conf.Scanning httpd.conf..X..X..X..X..X...X.X..X..X..X..X..X..X..X..X..X..X..X..X..X..X..XUsing CATALINA_BASE: /usr/local/jakarta/jakarta-tomcat-4.0.3-src/build
Using CATALINA_HOME: /usr/local/jakarta/jakarta-tomcat-4.0.3-src/build
Using CATALINA_TMPDIR: /usr/local/jakarta/jakarta-tomcat-4.0.3-src/build/temp
Using JAVA_HOME: /usr/local/jdk
Catalina.stop: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at java.net.Socket.(Socket.java:290)
at java.net.Socket.(Socket.java:118)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:831)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:683)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]
Using CATALINA_BASE: /usr/local/jakarta/jakarta-tomcat-4.0.3-src/build
Using CATALINA_HOME: /usr/local/jakarta/jakarta-tomcat-4.0.3-src/build
Using CATALINA_TMPDIR: /usr/local/jakarta/jakarta-tomcat-4.0.3-src/build/temp
Using JAVA_HOME: /usr/local/jdk
.jsp support installed!

cPanel.net Support Ticket Number:
 

simonlee

Active Member
Jan 19, 2003
37
0
156
and I always see "Tomcat_JSP failed" in Service Status of WHM, even after I restart the service. What's the problem?

cPanel.net Support Ticket Number:
 

dgbaker

Well-Known Member
PartnerNOC
Sep 20, 2002
2,576
9
343
Toronto, Ontario Canada
cPanel Access Level
DataCenter Provider
From SSH, do the following;

cd /usr/sbin
./stoptomcat

ps -ef |grep java <-- should show no processes.

./starttomcat

wait 1 minute then try site again.

The connection refused in the error says the the port(s) that tomcat needs are in use or not closed properly before the start.

cPanel.net Support Ticket Number:
 

simonlee

Active Member
Jan 19, 2003
37
0
156
Thanks dgbaker.
When I tried to stop tomcat: /usr/sbin/stoptomcat, got such message:
=============================================
Using CATALINA_BASE: /usr/local/jakarta/jakarta-tomcat-4.0.3-src/build
Using CATALINA_HOME: /usr/local/jakarta/jakarta-tomcat-4.0.3-src/build
Using CATALINA_TMPDIR: /usr/local/jakarta/jakarta-tomcat-4.0.3-src/build/temp
Using JAVA_HOME: /usr/local/jdk
Catalina.stop: java.net.ConnectException: Connection refused
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:295)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:161)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:148)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at java.net.Socket.<init>(Socket.java:290)
at java.net.Socket.<init>(Socket.java:118)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:831)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:683)
at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l
[sigspec]
=============================================
Then I used "ps -ef |grep java", got one process:
root 27942 12051 0 14:12 pts/1 00:00:00 grep java

After ran "/usr/sbin/starttomcat", site still not working


Any further advise?

cPanel.net Support Ticket Number: