bind problem w/Apache 1.2.6 on HP-UX

bind problem w/Apache 1.2.6 on HP-UX

Post by Chris Gold » Fri, 12 Feb 1999 04:00:00



We're running Apache 1.2.6 on HP-UX. Each night we stop the server
(by killing the parent process's PID), rotate the logs, sleep for
5 seconds to make sure all of the children are gone, and start
the server again. This usually works fine, but occassionally, when
the server tries to restart, it fails with the following message:

   bind: Address already in use
   httpd: could not bind to port 80

According to ps, there are no httpd processes to be found. Waiting
a bit and trying to start the server results in the same error message.
I haven't found a way to solve the problem short of a reboot.

Has anyone encountered and solved this problem? An explanation of why
it restarts most days, but not others would be of great help.

Thanks in advance.
--Chris

 
 
 

bind problem w/Apache 1.2.6 on HP-UX

Post by Richard Llo » Mon, 15 Feb 1999 04:00:00




> We're running Apache 1.2.6 on HP-UX.

We're running Apache 1.3.4 on HP-UX 11.0.

Quote:> Each night we stop the server
> (by killing the parent process's PID), rotate the logs, sleep for
> 5 seconds to make sure all of the children are gone, and start
> the server again.

We used to do this, but also added:

* A "ps -ef | grep httpd | grep -v grep" to find anything that was still
  running after 5 seconds sleep.
then:
* A "lsof -i :80" to find out any remaining processes left that are holding
  onto port 80 (lsof is a third-party program - you can find an HP-UX port
  here: http://hpux.csc.liv.ac.uk/hppd/hpux/Sysadmin/lsof-4.40/ )

Quote:> This usually works fine, but occassionally, when
> the server tries to restart, it fails with the following message:
>    bind: Address already in use
>    httpd: could not bind to port 80

Yep, we get *exactly* the same thing with Apache and HP-UX - intermittently
failing to bind to port 80 on a stop/start.

Quote:> According to ps, there are no httpd processes to be found.

Yep and "lsof -i :80" also reports no processes holding onto port 80.

Quote:> Waiting
> a bit and trying to start the server results in the same error message.
> I haven't found a way to solve the problem short of a reboot.

Ditto - I think it's a kernel bug, but we've patched the kernel with anything
to do with TCP and the network, but to no avail.

Quote:> Has anyone encountered and solved this problem?

The solution is to change your scripts to use the "graceful restart" signal
instead - this is "kill -s SIGUSR1" to the parent httpd process rather than
doing a full stop and start. I've been using this for a while now and
it works fine.

It is an extremely serious problem for HP-UX users of Apache who rotate their
logs daily via a stop/start like we do - since the rotation's done at
midnight and no amount of process killing will fix it, you end up with
a Web server that can be dead to the world until it's rebooted (either
remotely or from the console).

Quote:> An explanation of why
> it restarts most days, but not others would be of great help.

I think it's just some freaky conditions in the kernel (perhaps triggered
by Apache) that cause it. Unfortunately, HP don't seem to have any patch for
it yet.


Connect,                     WWW: http://www.connect.org.uk/
Liverpool University,  
Merseyside, England,
Great Britain.

 
 
 

1. Difference between HP-UX 10.10 and HP-UX 10.20

Hello,

what are the differences between HP-UX 10.10 and HP-UX 10.20?

I ask because one of our customers want to evalute our software
(which was developed on 10.10) on HP-UX 10.20. Is there full
backward compatibility?

Thanks for your helps

        Rainer

--
--
Rainer Freis    -       Systemadministrator

santix software GmbH
Max-Planck-Str. 7
D-85716 Unterschleissheim

Phone: (+49) 89 321506-24
Fax  : (+49) 89 321506-99

You don't know what real time-critical software is until
you're responsible for the paychecks of a battalion of
heavily armed Marines.

        (somebody in alt.sysadmin.recovery)

2. linux & ntfs

3. problem compiling apache on HP-UX

4. Strange Net Setup problem

5. problems running Apache on HP-UX 10.20

6. What's the scoop on the new KDE gui?

7. Using Translations to bind keys in HP-UX

8. imternal compiler error!

9. NIS Binding in HP-UX 9.x

10. Problems with Apache 1.3 on HP-UX 10.20

11. compiling bind 834 on hp-ux 11.11

12. Revised Sec. Vulnerability BIND on HP-UX

13. Problems while compiling Apache with linux and HP-UX 10.x