I've had trouble with this, and found that it's because Tomcat doesn't
shutdown properly. I'm getting an exception when I run the shutdown.sh
script.

I get around this problem for now by getting the process id of the first
java thread in the process list, which you can get with the 'ps ax' command.

--- Partial output from ps ax --
8546 pts/2    S      0:07 /usr/java/jdk1.3/bin/i386/native_threads/java -
8591 pts/2    S      0:00 /usr/java/jdk1.3/bin/i386/native_threads/java -
8592 pts/2    S      0:00 /usr/java/jdk1.3/bin/i386/native_threads/java -
---

and then issuing a 'kill 8546' command. You would substitute the process id
of your topmost java thread.

This kills all of the Java threads, which will then allow Tomcat to startup
properly.

Regards
Stephen.


----- Original Message -----
From: "David Cummins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 20, 2001 12:17 AM
Subject: Re: problem running tomcat -- a newbie's question


It's trying to bind a port that already exists on your machine. Do you
already have a web server or java server running? Changing the ports in
server.xml file in your conf directory.

Cheers,
Dave
  ----- Original Message -----
  From: Xiaofeng Chen
  To: [EMAIL PROTECTED]
  Sent: Friday, April 20, 2001 12:10 AM
  Subject: problem running tomcat -- a newbie's question


  I have a tomcat 3.1 installed on Red Hat 6.1. When I try to start tomcat,
I got
  "Address already in use" and java IOException. The following are the
output from execute the startup.sh.
  Please help, thanks.

  Guessing TOMCAT_HOME from tomcat.sh to ./..
  Setting TOMCAT_HOME to ./..
  Using classpath:
.:./../lib/ant.jar:./../lib/jasper.jar:./../lib/servlet.jar:./../lib/tes
  t:./../lib/webserver.jar:./../lib/xml.jar
  [root@swdev3 bin]# Context log: path="/examples" Adding context
path="/examples"  docBase
  ="webapps/examples"
  Context log: path="" Adding context path=""  docBase="webapps/ROOT"
  Context log: path="/test" Adding context path="/test"
docBase="webapps/test"
  Starting tomcat. Check logs/tomcat.log for error messages
  Starting tomcat install="./.." home="/export/jakarta-tomcat/bin/./.."
classPath=".:./../l

ib/ant.jar:./../lib/jasper.jar:./../lib/servlet.jar:./../lib/test:./../lib/w
ebserver.jar:

./../lib/xml.jar:/usr/share/kaffe/Klasses.jar:/usr/share/kaffe/comm.jar:/usr
/share/kaffe/
  pjava.jar:/usr/share/kaffe/servlet.jar:/usr/share/kaffe/pizza.jar"
  Context log: path="/admin" Automatic context load
docBase="/export/jakarta-tomcat/bin/./.
  ./webapps/admin"
  Context log: path="/admin" Adding context path="/admin"
docBase="/export/jakarta-tomcat/
  bin/./../webapps/admin"
  FATAL:java.io.IOException: Address already in use
  java.io.IOException: Address already in use
          at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:42)
          at java.net.ServerSocket.<init>(ServerSocket.java:53)
          at java.net.ServerSocket.<init>(ServerSocket.java:30)
          at
org.apache.tomcat.net.DefaultServerSocketFactory.createSocket(DefaultServerS
oc
  ketFactory.java:97)
          at
org.apache.tomcat.service.SimpleTcpEndpoint.startEndpoint(SimpleTcpEndpoint.
ja
  va:186)
          at
org.apache.tomcat.service.SimpleTcpConnector.start(SimpleTcpConnector.java:1
42
  )
          at
org.apache.tomcat.core.ContextManager.start(ContextManager.java:253)
          at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:157)
          at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:163)

  -------------
  Xiaofeng Chen
  Software Development Engineer/Analyst
  Interactive Media Group, Nebraska Educational Telecommunications
  1800 N. 33rd, Lincoln, NE68583
  (402) - 472-9333, ext. 569(voice); (402) - 472-3815(fax)
  [EMAIL PROTECTED], [EMAIL PROTECTED]




Reply via email to