title: Problem getting tomcat to start up on reboot
body: <p>I'm having trouble getting tomcat to start</p>
  
  <p>I followed these instructions to get tomcat / apache2 running:</p>
  
  <pre><code>http://www.mogilowski.net/?p=121
  </code></pre>
  
  <p>...but tomcat fails to start on reboot. Here's the message from the log:</p>
  
  <pre><code>Nov 30, 2009 6:59:53 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 13009 ms
  Nov 30, 2009 6:59:53 PM org.apache.catalina.core.StandardServer await
  SEVERE: StandardServer.await: create[8005]:
  java.net.BindException: Address already in use
          at java.net.PlainSocketImpl.socketBind(Native Method)
          at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
          at java.net.ServerSocket.bind(ServerSocket.java:319)
          at java.net.ServerSocket.&lt;init&gt;(ServerSocket.java:185)
          at org.apache.catalina.core.StandardServer.await(StandardServer.java:373)
          at org.apache.catalina.startup.Catalina.await(Catalina.java:647)        at org.apache.catalina.startup.Catalina.start(Catalina.java:607)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2
  5)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
  Nov 30, 2009 6:59:53 PM org.apache.coyote.http11.Http11Pro
  </code></pre>
  
  <p>It says that [8005] is already in use, however a netstat -napa shows nobody has that port.</p>
  
  <p>I can start it manually by running</p>
  
  <pre><code>/etc/init.d/tomcat stop
  </code></pre>
  
  <p>and then doing a netstat and killing the process that has port 8080 and doing an </p>
  
  <pre><code>/etc/init.d/tomcat start
  </code></pre>
  
  <p>tried removing the init.d tomcat script, booting the system, and running a netstat -napa to see if anyone has port 8080, or 8000 through 8009 and nobody does. A "telnet" to this port upon a fresh boot gives me</p>
  
  <pre><code>root@domU-12-31-39-00-A1-C4:/usr/local/tomcat/logs# telnet localhost 8005
  Trying 127.0.0.1...
  telnet: Unable to connect to remote host: Connection refused
  </code></pre>
  
  <p>..but if I try to start up tomcat, either by hand or via init.d script, it will fail the first time, complaining about the "Address already in use"</p>
  
  <p>any ideas?</p>