Tomcat doesn't show a page nor does it shut down properly

Bug #115852 reported by Sorsis
4
Affects Status Importance Assigned to Milestone
tomcat5.5 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: tomcat5.5

shutdown script produces this kind of error.

Using CATALINA_BASE: /usr/share/tomcat5.5
Using CATALINA_HOME: /usr/share/tomcat5.5
Using CATALINA_TMPDIR: /usr/share/tomcat5.5/temp
Using JRE_HOME: /usr/lib/jvm/java-1.5.0-sun
17.5.2007 18:23:06 org.apache.catalina.startup.Catalina stopServer
SEVERE: Catalina.stop:
java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at java.net.Socket.<init>(Socket.java:366)
        at java.net.Socket.<init>(Socket.java:179)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:394)
        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:585)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:343)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:434)

Revision history for this message
Sorsis (mikael-haapakoski) wrote :

I allso got this while installing tomcat

Säädän asetukset: tomcat5.5-webapps (5.5.20-4ubuntu1) ...
invoke-rc.d: initscript tomcat5.5, action "status" failed.

Revision history for this message
Sorsis (mikael-haapakoski) wrote :

Found this kind of information about installation. I didn't find this kind of groups from my comp. Could this be the reason?

4. Installing Tomcat

Download a binary distribution of Tomcat from the Apache Jakarta website:

  http://jakarta.apache.org/tomcat/

If you don't want to run the Tomcat daemon as root, create a new user/group tomcat (first make sure that the UID and GID you use are still available by checking the files /etc/passwd and /etc/group):

  groupadd -g 220 tomcat
  useradd -u 220 -g tomcat -c "Tomcat" -r -d /usr/local/tomcat -s "/sbin/nologin" tomcat

Warning

You really should not use the root account to run the Tomcat daemon; (using Tomcat version 4.1.27) we found out that this allows the MMBase admin user to write backup dumps of his sites anywhere on the system.

<TODO: better solution available?>

Extract the Tomcat distribution in a new directory:

  cd /usr/local/
  tar -zxvf .../jakarta-tomcat-xxx.tar.gz

Note

Version 4.1.27 came with a hot-fix:

  cd /usr/local/jakarta-tomcat-xxx/
  tar -zxvf .../xxx-hotfix-xxx.tar.gz

Change the ownership of the Tomcat directory and make it available as /usr/local/tomcat/:

  chown -R tomcat:tomcat /usr/local/jakarta-tomcat-xxx
  ln -s /usr/local/jakarta-tomcat-xxx /usr/local/tomcat

Open up the firewall for web access to the Tomcat server by adding to the file /etc/sysconfig/iptables:

  -A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 8080 --syn -j ACCEPT

You need to reboot your system to make this rule effective or restart the iptables firewall:

  service iptables restart

Tip

Since (for some odd reason) some network managers allow outgoing web connections only to TCP port 80, there might be people around that cannot access your Tomcat (and MMBase) server through port 8080. Further below we will explain how to install a JK 2 mapping or a reverse proxy in Apache, so Tomcat and MMBase can be accessed through the Apache web server at port 80. Apart from the port issue, this has the advantage that you can use Apache to manage you SSL connections and use your existing Apache logs and statistics facilities for Tomcat and MMBase as well.

If you decide to use Apache as a front-end to your Tomcat and MMBase server, there's no need to open up port 8080 in your firewall.

To run Tomcat, set the $CATALINA_HOME environment variable:

Revision history for this message
Sorsis (mikael-haapakoski) wrote :

Maybe i should also mention that i'm using 64bit AMD system.

Sam (sam-halliday)
Changed in tomcat5.5:
status: New → Invalid
Revision history for this message
feanor (manuel-gaus) wrote :

I have a similar problem here:

after installing and starting tomcat5.5 a 'sudo netstat -l -p' should come up with some ports on tcp6, listening to port 8080 and belonging to java-processes. But acutally there are no such ports.
When starting the tomcat service from /etc/init.d/tomcat5.5 a 'ps aux' shows an entry for the tomcat daemon.
When issuing a '/etc/init.d/tomcat5.5 stop' this entry should disappear, but actually it doesn't.

A fixed this issue for me by running tomcat5.5 from the original distribution, that can be found at apache.org.
Not nice, but it works for development.

Thanks a lot for tackling this problem,

Greetings,

Manuel

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.