Bug 431808 - Tomcat5 Does Not Start After Recent Update
Tomcat5 Does Not Start After Recent Update
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: tomcat5 (Show other bugs)
8
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Vivek Lakshmanan
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-06 21:11 EST by Bob Cochran
Modified: 2008-02-09 07:59 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-09 00:05:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
catalina.out file (19.47 KB, application/octet-stream)
2008-02-07 18:33 EST, Bob Cochran
no flags Details
tomcat5.conf (1.78 KB, application/octet-stream)
2008-02-08 22:24 EST, Bob Cochran
no flags Details
tomcat5 server.xml (19.17 KB, text/xml)
2008-02-08 22:28 EST, Bob Cochran
no flags Details

  None (edit)
Description Bob Cochran 2008-02-06 21:11:02 EST
Description of problem:

tomcat5 does not start. That is, entering http://localhost:8080/ results in an
Error 404:

Error 404 - Not Found.
No context on this server matched or handled this request.
Contexts known to this server are:

The links above may not work if a virtual host is configured

I believe that when I tested Tomcat5 in the same way last December, the Tomcat
welcome screen did show up in Firefox, and I'm aware that a relatively recent
update of tomcat was done for Fedora 8. 

Version-Release number of selected component (if applicable):

Please note, I am not very skilled in tomcat so I may be guessing the wrong
component name. 

tomcat5-5.5.25-3jpp.1.fc8

How reproducible:

Always

Steps to Reproduce:
1. Start Firefox.
2. enter http://localhost:8080/ in address bar.
3. Press [enter]
  
Actual results:

The 404 message noted above results on the web page.

Expected results:

The tomcat welcome page should show up. I believe it did in the packaged release
as of last December.


Additional info:

The tomcat5 service is turned on for runlevel 5. The firewall is disabled for
purposes of testing tomcat. Both IcedTea and the Sun Java JDK 1.6.0_03 are
installed, but the alternatives switching is currently pointing to the IcedTea.

I am not experienced in Java or JSP; in fact the reason for turning on tomcat5
is to learn JSP.

Here is the text of two /var/log/tomcat5 files:

[root@deafeng3 tomcat5]# cat localhost.2008-02-06.log
Feb 6, 2008 8:30:21 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]]
Feb 6, 2008 8:30:22 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Feb 6, 2008 8:30:22 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Feb 6, 2008 8:30:22 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Feb 6, 2008 8:30:22 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
[root@deafeng3 tomcat5]# cat catalina.2008-02-06.log
Feb 6, 2008 8:30:16 PM org.apache.coyote.http11.Http11AprProtocol init
SEVERE: Error initializing endpoint
java.lang.Exception: Socket bind failed: [98] Address already in use
        at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)
        at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.java:116)
        at org.apache.catalina.connector.Connector.initialize(Connector.java:1017)
        at
org.apache.catalina.core.StandardService.initialize(StandardService.java:578)
        at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:623)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Feb 6, 2008 8:30:16 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed:
java.lang.Exception: Socket bind failed: [98] Address already in use
        at org.apache.catalina.connector.Connector.initialize(Connector.java:1019)
        at
org.apache.catalina.core.StandardService.initialize(StandardService.java:578)
        at
org.apache.catalina.core.StandardServer.initialize(StandardServer.java:782)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:504)
        at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:623)
        at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:267)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Feb 6, 2008 8:30:16 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 4548 ms
Feb 6, 2008 8:30:17 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Feb 6, 2008 8:30:17 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.25
Feb 6, 2008 8:30:17 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Feb 6, 2008 8:30:22 PM org.apache.coyote.http11.Http11AprProtocol start
SEVERE: Error starting endpoint
java.lang.Exception: Socket bind failed: [98] Address already in use
        at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:576)
        at org.apache.tomcat.util.net.AprEndpoint.start(AprEndpoint.java:686)
        at
org.apache.coyote.http11.Http11AprProtocol.start(Http11AprProtocol.java:146)
        at org.apache.catalina.connector.Connector.start(Connector.java:1090)
        at org.apache.catalina.core.StandardService.start(StandardService.java:457)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:623)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Feb 6, 2008 8:30:22 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start: 
LifecycleException:  service.getName(): "Catalina";  Protocol handler start
failed: java.lang.Exception: Socket bind failed: [98] Address already in use
        at org.apache.catalina.connector.Connector.start(Connector.java:1097)
        at org.apache.catalina.core.StandardService.start(StandardService.java:457)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:623)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Feb 6, 2008 8:30:22 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6118 ms
Comment 1 Bob Cochran 2008-02-07 18:33:06 EST
Created attachment 294289 [details]
catalina.out file
Comment 2 Bob Cochran 2008-02-07 18:34:33 EST
Result of `netstat`

netstat results for port 8080

[root@deafeng3 tomcat5]# netstat -an | grep '8080'
tcp        0      0 :::8080                     :::*                        LISTEN 

Note: the above looks like an IPv6 listener


[root@deafeng3 tomcat5]# netstat -an | grep '80'
tcp        0      0 127.0.0.1:8000              0.0.0.0:*                  
LISTEN      
tcp        0      0 :::8009                     :::*                       
LISTEN      
tcp        0      0 :::8080                     :::*                       
LISTEN      
tcp        0      0 :::80                       :::*                       
LISTEN      
udp        0      0 fe80::218:deff:fe21:123     :::*                           
        
unix  2      [ ACC ]     STREAM     LISTENING     8067   /tmp/keyring-qviH4s/socket
unix  2      [ ACC ]     STREAM     LISTENING     21132 
/tmp/orbit-rlc/linc-e6b-0-13880f44e735
unix  2      [ ACC ]     STREAM     LISTENING     21140 
/tmp/orbit-rlc/linc-e69-0-13880f441e498
unix  2      [ ACC ]     STREAM     LISTENING     21408 
/tmp/orbit-rlc/linc-e96-0-378cc180e6ad8
unix  2      [ ACC ]     STREAM     LISTENING     6807  
@/var/run/hald/dbus-slz7r1Gdz1
unix  3      [ ]         STREAM     CONNECTED     21680 
/tmp/orbit-rlc/linc-e41-0-6953386bc62c3
unix  3      [ ]         STREAM     CONNECTED     21425 
/tmp/orbit-rlc/linc-e96-0-378cc180e6ad8
unix  3      [ ]         STREAM     CONNECTED     21415 
/tmp/orbit-rlc/linc-e96-0-378cc180e6ad8
unix  3      [ ]         STREAM     CONNECTED     21411 
/tmp/orbit-rlc/linc-e96-0-378cc180e6ad8
unix  3      [ ]         STREAM     CONNECTED     21345 
/tmp/orbit-rlc/linc-e69-0-13880f441e498
unix  3      [ ]         STREAM     CONNECTED     21280 
/tmp/orbit-rlc/linc-e30-0-19331ff06ff67
unix  3      [ ]         STREAM     CONNECTED     21269 
/tmp/orbit-rlc/linc-e6b-0-13880f44e735
unix  3      [ ]         STREAM     CONNECTED     21222 
/tmp/orbit-rlc/linc-e69-0-13880f441e498
unix  3      [ ]         STREAM     CONNECTED     21218 
/tmp/orbit-rlc/linc-e6b-0-13880f44e735
unix  3      [ ]         STREAM     CONNECTED     21143 
/tmp/orbit-rlc/linc-e69-0-13880f441e498
unix  3      [ ]         STREAM     CONNECTED     21135 
/tmp/orbit-rlc/linc-e6b-0-13880f44e735
unix  3      [ ]         STREAM     CONNECTED     8093  
/var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     8092   
unix  3      [ ]         STREAM     CONNECTED     6809  
/var/run/dbus/system_bus_socket
unix  3      [ ]         STREAM     CONNECTED     6808   
Comment 3 Vivek Lakshmanan 2008-02-07 19:24:49 EST
Are you sure that you have installed the tomcat5-webapps application? That is
the one that will give you the tomcat5 splash screen when you visit
http://localhost:8080... There is clearly something listening on your port 8080.
Kill that process, restart tomcat5 and report back. 

I just installed tomcat5 and tomcat5-webapps on an up-to-date vanilla fedora 8
i386 box and the splash screen comes up fine...
Comment 4 Bob Cochran 2008-02-07 23:01:05 EST
Thanks for the feedback and also for your work in attempting to reproduce this
problem. Here is some extra information. Another person suggested running lsof
and netstat -talpen and here are the results:

[root@deafeng3 ~]# lsof -i :8080
COMMAND  PID  USER   FD   TYPE DEVICE SIZE NODE NAME
java    2548 jetty   24u  IPv6   6817       TCP *:webcache (LISTEN)
[root@deafeng3 ~]# netstat -talpen | grep ':8080'
tcp        0      0 :::8080                     :::*                       
LISTEN      496        6817       2548/java

However, I don't understand how to interpret the above. I do have the Sun JDK
1.6 installed, but my Java Alternatives are pointing at IcedTea 1.7.0 . Can you
suggest the culprit here?
 
Below is a list of my installed tomcat-related applications. As you can see,
tomcat5-webapps is included. Do you see anything that might be problematic?
          
[root@deafeng3 ~]# rpm -qa | egrep 'tomcat'
jakarta-commons-dbcp-tomcat5-1.2.1-10jpp.2.fc8
tomcat5-webapps-5.5.25-3jpp.1.fc8
jakarta-commons-pool-tomcat5-1.3-9jpp.3.fc8
tomcat-native-1.1.10-1.fc8
tomcat5-common-lib-5.5.25-3jpp.1.fc8
tomcat5-5.5.25-3jpp.1.fc8
tomcat5-server-lib-5.5.25-3jpp.1.fc8
tomcat5-servlet-2.4-api-5.5.25-3jpp.1.fc8
tomcat5-jsp-2.0-api-5.5.25-3jpp.1.fc8
jakarta-commons-collections-tomcat5-3.1-9jpp.2.fc7.1
tomcat5-jasper-5.5.25-3jpp.1.fc8
tomcat5-admin-webapps-5.5.25-3jpp.1.fc8
tomcat5-jasper-eclipse-5.5.25-3jpp.1.fc8

Bob
Comment 5 Vivek Lakshmanan 2008-02-08 18:26:35 EST
(In reply to comment #4)
> Thanks for the feedback and also for your work in attempting to reproduce this
> problem. Here is some extra information. Another person suggested running lsof
> and netstat -talpen and here are the results:
> 
> [root@deafeng3 ~]# lsof -i :8080
> COMMAND  PID  USER   FD   TYPE DEVICE SIZE NODE NAME
> java    2548 jetty   24u  IPv6   6817       TCP *:webcache (LISTEN)
> 

Well looks like you have jetty installed and it would not surprise me if both
Jetty and tomcat listen on the same port by default . Please kill that
process/shut Jetty down and try again. Otherwise, edit /etc/tomcat5/tomcat5.conf
to uncomment the following line - #CONNECTOR_PORT=8080
and change it to something you know is not being used and restart tomcat. It
should come up with the right splash screen at localhost:<your_new_port>


Comment 6 Bob Cochran 2008-02-08 22:19:35 EST
Thanks for your help, things are a bit clearer to me now. Jetty is running on
port 8080 because it is needed by Fedora Eclipse, which I did install but have
not yet used. 

I uncommented and then changed CONNECTOR_PORT in /etc/tomcat5/tomcat5.conf from
8080 to 8081 and restarted tomcat. Visiting http://localhost:8081/ still did not
bring up the splash screen. Then I edited the /etc/tomcat5/server.xml file to
change the connector port from 8080 to 8081. I ran 'service stop tomcat5',
waited 60 seconds, ran 'service start tomcat5', and again visited
http://localhost:8081/. Success! So I guess changes to the tomcat5.conf file are
not being applied as expected. I'm attaching both files for your convenience. 

Also it seems to me that either the Jetty, or the Tomcat5 packages should be
changed so each product runs on separate ports by default. Until now, I didn't
customize Tomcat5 in any way. I just wanted it to run so I can get started
learning how to code servlets.
 
Thank you for your help. Now I realize I can learn not only about using Tomcat,
but also Jetty (assuming I can use it for something other than Eclipse.)

Bob
Comment 7 Bob Cochran 2008-02-08 22:24:01 EST
Created attachment 294445 [details]
tomcat5.conf

Edited to change CONNECTOR_PORT from 8080 to 8081, but has no effect after
restarting tomcat5 service.
Comment 8 Bob Cochran 2008-02-08 22:28:11 EST
Created attachment 294446 [details]
tomcat5 server.xml

Changing the connector port in this file from 8080 to 8081 and restarting the
tomcat5 service does bring up the expected splash screen when visiting
http://localhost:8081/.
Comment 9 Devrim GUNDUZ 2008-02-09 00:05:27 EST
Sorry, but this is not a support forum. Since this is not a *bug*, I'm closing
this bug. If you want to get familiar with Tomcat5, please join relevant mailing
lists, etc.

Regards, Devrim
Comment 10 Bob Cochran 2008-02-09 07:59:04 EST
Please don't misunderstand what I am saying here. You do indeed have a bug: two
packages, which by default are listening on the same port. That is the issue
here. You are free to do what you wish with this. 

Thanks, 

Bob

Note You need to log in before you can comment on or make changes to this bug.