Most linux systems (probably *nix in general) store the pid in a file named after the service in /var/run. Your restart script could pick up that pid and then loop through checking for it's existance about once a second until it's gone before continuing with a new startup. That at least is dynamic enough to accommodate long and short shutdown times. Keep track of the wait and if it takes too long, log an error.

--David

Manivannan Palanichamy wrote:
On 8/11/07, Susan Richards <[EMAIL PROTECTED]> wrote:
First, I just want to say that I sure appreciate all the help I am getting
on this list and I don't deserve to even associate with highly intelligent
beings such as yourselves.

We shutdown and restart our tomcat 5.5.23 server nightly.  Initially, a
maintenance page for system backup gets copied and then it gets bounced with
the shutdown.sh and startup.sh scripts.  Since we upgraded last Friday,
it's not always starting up.  I see this message in the log:

SEVERE: Error initializing endpoint
java.net.BindException: Address already in use (errno:226):80

I've checked server.xml and I only have one connector using this
port.  Perhaps all the connections are not getting terminated when it shuts
down?  How do I fix this problem?  How do I figure out what is the cause?


Sometimes, I too faced this prob. I did a work around. Just grep for the
tomcat process id. some thing like,
ps -ax | grep 'endorsed'  //an ugly grep to fetch tomcat process
as you have got the process id now, kill the tomcat as,
kill -9 [pid]

Now start the tomcat.
[also, make sure, you are not running a webserver already on port 80. if you
are running any oracle server, probably it might be starting a apache
webserver on 80, pl check]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to