Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / June 2005

Tip: Looking for answers? Try searching our database.

Problems starting jakarta-tomcat 5.5

Thread view: 
SQ - 23 Jun 2005 22:39 GMT
I am trying to run jakarta-tomcat 5.5.

I installed jre1.5.0_03 and also jdk1.5.0_03.

I tried setting my JAVA_HOME variable to both
/usr/local/re1.5.0_03 and also /usr/local/jdk1.5.0_03
and then running the /usr/local/jakarta-tomcat-5.5.9/bin/startup.sh
script.

# ./startup.sh
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-5.5.9/
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-5.5.9/
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-5.5.9//temp
Using JRE_HOME:       /usr/local/jdk1.5.0_03

# ps -fela | grep -i java | grep -v grep
8 R     root  9665     1 16  59 20        ?  11500          17:11:23
pts/11   0:05 /usr/local/jdk1.5.0_03/bin/java -Dj
8 R     root  9510     1  0  50 20        ?  11906          16:22:41
pts/11   0:15 /usr/local/jdk1.5.0_03/bin/java -Dj

# echo $JAVA_HOME
/usr/local/jdk1.5.0_03

Here is where I set JAVA_HOME to jre:

# export JAVA_HOME=/usr/local/jre1.5.0_03/
# ./startup.sh
Using CATALINA_BASE:   /usr/local/jakarta-tomcat-5.5.9/
Using CATALINA_HOME:   /usr/local/jakarta-tomcat-5.5.9/
Using CATALINA_TMPDIR: /usr/local/jakarta-tomcat-5.5.9//temp
Using JRE_HOME:       /usr/local/jre1.5.0_03/

# ps -fela | grep -i java | grep -v grep
8 R     root  9665     1  0  50 20        ?  12294          17:11:23
pts/11   0:13 /usr/local/jdk1.5.0_03/bin/java -Dj
8 R     root  9510     1  0  50 20        ?  11906          16:22:41
pts/11   0:15 /usr/local/jdk1.5.0_03/bin/java -Dj
8 R     root  9682     1 25  99 20        ?  11267          17:12:04
pts/11   0:09 /usr/local/jre1.5.0_03//bin/java -D

Now looking at nestat info, I get listening on port 8080 but going to a
browser and http://localhost:8080 produces nothing. jakarta process is
not running.

# netstat -an | grep 8080
     *.8080               *.*                0      0 24576      0
LISTEN
127.0.0.1.33149      127.0.0.1.8080       32768      0 32768      0
TIME_WAIT
172.18.5.91.33156    172.18.5.95.8080         0      0 24820      0
SYN_SENT
#

Why is this happening, what can I do about it?
SMC - 23 Jun 2005 23:41 GMT
> I am trying to run jakarta-tomcat 5.5.

<snip>

> Now looking at nestat info, I get listening on port 8080 but going to a
> browser and http://localhost:8080 produces nothing.

Nothing as in blank page? Nothing as in connection refused? What's the
HTTP response code (if any)? Have you checked the tomcat logs?

Signature

Sean

A sarcasm detector, that's a REAL useful invention. (BOOM) --Comic Book
Guy

SQ - 24 Jun 2005 16:11 GMT
tail -5 /usr/local/jakarta-tomcat-5.5.9/logs/localhost.2005-06-23.log

INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
Jun 23, 2005 5:11:34 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]
Jun 23, 2005 5:12:14 PM org.apache.catalina.core.ApplicationContext log
INFO: org.apache.webapp.balancer.BalancerFilter: init(): ruleChain:
[org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string:
News / Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param
name: paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL:
http://jakarta.apache.org]]

tail -5 catalina.out

    at
org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:629)
Jun 23, 2005 5:12:17 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Jun 23, 2005 5:12:17 PM org.apache.catalina.connector.Connector stop
SEVERE: Coyote connector has not been started

tail -5 catalina.2005-06-23.log

    at
org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:209)
    at org.apache.catalina.connector.Connector.pause(Connector.java:943)
    at
org.apache.catalina.core.StandardService.stop(StandardService.java:491)
    at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:717)
    at org.apache.catalina.startup.Catalina.stop(Catalina.java:586)
    at
org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:629)
Jun 23, 2005 5:15:22 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Jun 23, 2005 5:15:22 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080

>From the browser:

It hangs a long time, saying: Connecting.... then:

A network error occurred while Netscape was receiving data.
(Network Error: Connection reset by peer)

Try connecting again.
SMC - 28 Jun 2005 03:35 GMT
Need more context than that, which unfortunately would be a very long
post. Starting from the bottom of the logs, search upwards for something
like "root cause".

I use the Firefox browser with the Live HTTP Headers plugin to check the
request/response codes from requests. Gives you a better idea of the
responses from your web server (if any). See

http://livehttpheaders.mozdev.org/

You could also try telnet localhost 8080. If you get connection refused
then Tomcat isn't running (but from the looks of your logs, it isn't).

Post the root cause lines from your logs (if you can find them).

> tail -5 /usr/local/jakarta-tomcat-5.5.9/logs/localhost.2005-06-23.log
>
[quoted text clipped - 60 lines]
>
> Try connecting again.


Signature

Sean

The only weapon of mass destruction is nuclear. In all others, mass is
conserved.

SQ - 28 Jun 2005 13:56 GMT
I found out what the problem was - Tomcat took about 1-2  minutes to
start. It doesn't start instantly like Apache.
The platform is Solaris 8, the Tomcat version is 5.5 and the browser is
Netscape that came with Solaris 8.
Everything is fine now. When I first start it, the Tomcat's CPU goes to
33% or so then once it comes down to 0.7%, it's ready to start serving
requests.
Alan Krueger - 29 Jun 2005 01:17 GMT
> I found out what the problem was - Tomcat took about 1-2  minutes to
> start. It doesn't start instantly like Apache.
[quoted text clipped - 3 lines]
> 33% or so then once it comes down to 0.7%, it's ready to start serving
> requests.

You can configure webapps in Tomcat to not load at startup.  That will
delay loading them until the first request.  On a system with a lot of
webapps, this greatly speeds up startup but slows down the initial
requests of the webapps.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.