> -----Original Message-----
> From: Joachim Breuer [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 23, 2002 4:48 PM
> To: [EMAIL PROTECTED]
> Subject: Re: RH7.3 and Apache... problem with it not starting
> 
> 
> Ward William E DLDN <[EMAIL PROTECTED]> writes:
> 
> > The error message I'm getting is in /var/logs/httpd/error_logs
> >
> > [Tue Jul 23 12:43:43 2002] [crit] (98)Address already in 
> use: make_sock:
> > could not bind to port 80
> >
> > which is NOT helpful, since it comes up even AFTER a reboot.
> 
> Two things come to mind:
> 
> 1. The IP address apache tries to bind to does not exist - that
> happens when you have IP Addresses explicitly listed with
> 'BindAddress' or 'Listen', and this address does not exist when apache
> comes up. Might even happen after reboot, if the interface in question
> is initialized "later" than apache - should not happen, but who
> knows. Not sure why this should give "address already in use", but I
> think I've yet seen that effect.

I >THINK< this is indeed what happened.  I think my listen addresses
were hosed.  Regardless, as of >TEN< minutes ago, I got EVERYTHING
working... YEE-HAH!

> 2. "Something" really is using the port; you can easily find out with 
>    lsof -i :http
> This will list all processes having connections on port 80 (http). You
> could repeat this like "lsof -i :81" etc. for the other ports. (Has to
> be run as root to work correctly.) In case lsof is not installed, on
> my 7.3 the package is called 'lsof-4.51-2', on one of the CDs. - lsof
> might not show programs that "grab" ports by "unholy" means, such as
> the already mentioned portscan, or firewall settings.

That's what I was looking for, to tell me what had bound to the ports...
couldn't think of what was the problem.

> Btw, unix/linux is not the kind of system where rebooting fixes
> things. Finding out what's wrong and setting it right usually gets you
> there faster, once you have a little bit of practice.

Normally, I'd agree... I've been a Unix admin on and off for 6 years,
so I (normally) know my way around... but sometimes, you get the brain
freezes, like last night at 11:45 when I was trying to remember how
to restart the httpd (/etc/init.d/httpd restart) and it took me twenty
frustrating minutes to remember... I needed caffeine.

In this case, though, it looked to me (by the error) as if perhaps
a zombie process was holding the port in the kernel's port map.
Since I couldn't FIND a zombie process, I decided (when all else
fails) restart (init 1;init 3) or reboot (init 6)
 
> In this case: Strip down the httpd.conf (using the comment sign) to
> the bare functional minimum, especially remove all references to your
> specific hostname/IP address/etc. (I can send you a vanilla httpd.conf
> by mail). Restart httpd ("service httpd restart"); look around - what
> does it say?

That was just it; I was getting failed on shutting down, ok on startup,
but the process was dead in the water.  httpd -t, httpd -S, and httpd -T
all reported the syntax was fine, no warning, no errors (which is better
than the default; httpd -S will always produce a warning about having
to bind to localhost IIRC, and by the httpd.conf files I have).

> If it works, try to piecewise add functionality by removing comment
> signs, until you happen upon the directive/block where apache no
> longer starts. If it does not work, you should try stripping even more
> settings.

That's what finally got me going...  I put in an (almost) virgin httpd.conf
file, and started slowly adding the functionality.  What I ended up with
to get it to work is this:

Listen 81
Listen 82
NameVirtualHost www.raku.dyndns.biz:82
NameVirtualHost www.troop14.homeip.net:81
<VirtualHost www.troop14.homeip.net:81>
    DocumentRoot /var/www/html/troop14/
</VirtualHost>
<VirtualHost www.raku.dyndns.biz:82>
    DocumentRoot /var/www/html/raku/
</VirtualHost>
<VirtualHost _default_:*>
    DocumentRoot    /var/www/html
</VirtualHost>

(Note, I had to also edit my /etc/hosts file, to add aliases for the
two virtual hosts shown on the IP of the machine).

BTW, those links won't work; the machine is behind a NAT firewall,
and I'm forwarding ports>1024... the raku site, if anyone is in the
least interested, is at www.raku.dyndns.biz:8080

> So long,
>    Joe

Thanks to EVERYONE who helped.

Bill Ward



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to