Gentoo Archives: gentoo-user

From: Adam Carter <Adam.Carter@×××××××××.au>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: RE: [gentoo-user] /etc/init.d/apache2 fails, but apache will run
Date: Mon, 29 Sep 2008 02:18:51
Message-Id: 707E41AE68E444499861C6B248AB868453A857ECC4@excprdmbxw002.optus.com.au
In Reply to: Re: [gentoo-user] /etc/init.d/apache2 fails, but apache will run by Jerry McBride
1 > On Sunday 28 September 2008 09:26:06 pm Adam Carter wrote:
2 > > rix adam # /etc/init.d/apache2 start
3 > > * Starting apache2 ...
4 > > (98)Address already in use: make_sock: could not bind to
5 > address 0.0.0.0:80
6 > > no listening sockets available, shutting down
7 > > Unable to open logs
8 > [
9 > > ok ] rix adam #
10 > >
11 > > The socket is not in use and log dir perms are ok, and;
12 > >
13 > > rix adam # apache2 -f /etc/apache2/httpd.conf
14 > > rix adam # pgrep -lf apach
15 > > 17740 apache2 -f /etc/apache2/httpd.conf
16 > > 17741 apache2 -f /etc/apache2/httpd.conf
17 > > 17744 apache2 -f /etc/apache2/httpd.conf
18 > > 17772 apache2 -f /etc/apache2/httpd.conf
19 > > rix adam #
20 > >
21 > > So, how do I troubleshoot this?
22 >
23 > I just did a google search
24 <SNIP> something else is bound to port 80.
25
26 As stated above - socket 80 is not in use (according to netstat). If there was, "apache2 -f /etc/apache2/httpd.conf" would also fail, would it not?
27
28 > Do a "ps -A | grep apache" and see if a stray daemon is
29 > running around... I
30
31 I did that, there were no apache processes running.
32
33 > not then go to /etc/apache2/vhosts.d and make sure both config files
34 > are "pointing" to the same host that apache is running on...
35
36 Again, if the config was broken then I'd expect # apache2 -f /etc/apache2/httpd.conf to also fail.
37
38 I'd say the problem is related to how the gentoo stuff starts the daemon, or maybe conf.d/apache2, but nothing below looks unusual to me;
39
40 rix apache2 # grep ^[^#] /etc/conf.d/apache2
41 APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D PHP5"
42 CONFIGFILE=/etc/apache2/httpd.conf

Replies

Subject Author
Re: [gentoo-user] /etc/init.d/apache2 fails, but apache will run Xav' <xp@××××××××.fr>