LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   apache2 won't start, no error given (https://www.linuxquestions.org/questions/linux-networking-3/apache2-wont-start-no-error-given-319479/)

mikecrowe 05-02-2005 04:25 PM

apache2 won't start, no error given
 
Hi folks,

I'm pretty well versed in using apache, so this is really bugging me. I've googled and searched here. Can't find anything.

Using Suse 9.1, and have installed as typical web server (apache2 2.0.49, php4 4.3.4, mysql 4.0.18). Everything seemed to install fine.

However, when I do a /etc/init.d/apache2 start, it fails.
Further, /var/log/apache2 has 3 files, error and access files are 0 length. rcapache2.out only contains "Syntax OK".

Even if I manually enter:
/usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf
(which is the cmdline that is executed from /etc/init.d/apache2), exits with error code 0 and no httpd daemon. Same with apache2ctl.

How can I get some diagnostics to see what is wrong? I can't even get an exit code to debug.

TIA
Mike

Artanicus 05-02-2005 04:34 PM

I had a similar situation when my error_log had bloated to over 3 gigs in size. If the logs are of 0 size, id say theres definately something wrong with them. Perhaps try deleting them, and let apache re-create?

mikecrowe 05-02-2005 04:38 PM

Did that. Recreates with 0 size. Brand new installation, so it should be straight forward.

Artanicus 05-02-2005 04:41 PM

a possible method to take a closer look to what might fail, would be to monitor 'acctail' while attempting to start apache. Its not standar software, but a helluve nice tool. It monitors all exiting processes and their exit status.

zeos 05-02-2005 08:55 PM

Any chance you've got a pid file hanging around that didn't get cleaned up? I've had similar things happen on my servers.....

check /var/run/httpd2.pid

If it's there and you're certain (seems so lol) it's not running, delete it and attempt a start...

mikecrowe 05-02-2005 08:59 PM

To the earlier recommendation to try acctail (great program!):

Code:

root@CRMServer acctail-1.3 # acctail
acctail v1.3, (C) folkert@vanheusden.com

COMMAND          FLGS UID    .GID      EXIT    UTIME  STIME  ETIME  MEM
-------------------------------------------------------------------------------
root@CRMServer acctail-1.3 # yast
root@CRMServer acctail-1.3 # man screen
Reformatting screen(1), please wait...
root@CRMServer acctail-1.3 # screen
find_mpm        U    root    .root    0        0.00  70.00  170.00  2544
apache2          FU  root    .root    0        0.00  20.00  200.00  2544
which            U    root    .root    0        0.00  20.00  50.00  1368
perl            U    root    .root    0        0.00  70.00  100.00  3276
ln              U    root    .root    0        0.00  20.00  40.00  1604
find_mpm        U    root    .root    0      10.00  60.00  150.00  2544
get_includes    FU  root    .root    0        0.00  10.00  180.00  2544
get_includes    U    root    .root    0        0.00  60.00  280.00  2544
apache2          FU  root    .root    0        0.00    0.00  20.00  2544
httpd2-prefork  U    root    .root    0      60.00  160.00  280.00  4104
apache2          U    root    .root    0      20.00  160.00 1290.00  2544
ln              U    root    .root    0        0.00  20.00  40.00  1604
find_mpm        U    root    .root    0        0.00  60.00  150.00  2544
apache2          FU  root    .root    0        0.00  20.00  190.00  2544
which            U    root    .root    0        0.00  30.00  50.00  1368
perl            U    root    .root    0        0.00  80.00  100.00  3276
apache2          U    root    .root    768    20.00  100.00  520.00  2544
stty            U    root    .root    0        0.00  30.00  40.00  1612
apache2          FU  root    .root    0        0.00  10.00  10.00  2544
apache2          FU  root    .root    0        0.00  10.00  20.00  2544
apache2          FU  root    .root    0        0.00  10.00  20.00  2544
ln              U    root    .root    0        0.00  20.00  40.00  1604
find_mpm        U    root    .root    0        0.00  60.00  120.00  2544
apache2          FU  root    .root    0        0.00  10.00  150.00  2544
which            U    root    .root    0        0.00  20.00  50.00  1368
perl            U    root    .root    0        0.00  90.00  130.00  3276
ln              U    root    .root    0        0.00  30.00  50.00  1604
find_mpm        U    root    .root    0        0.00  60.00  160.00  2544
get_includes    FU  root    .root    0        0.00  10.00  180.00  2544
get_includes    U    root    .root    0        0.00  60.00  300.00  2544
apache2          FU  root    .root    0        0.00  10.00  20.00  2544
httpd2-prefork  U    root    .root    0      40.00  140.00  260.00  4104
httpd2-prefork  U    root    .root    0      100.00  200.00  400.00  7280
httpd2-prefork  FUS  root    .root    11    500.00  710.00 1660.00  61352
startproc        U    root    .root    1792    0.00  60.00 2230.00  1388
stty            U    root    .root    0        0.00  30.00  60.00  1612
grep            U    root    .root    256      0.00  30.00  80.00  1692
apache2          U    root    .root    1792    40.00  210.00 3660.00  2544
apache2          U    root    .root    1792    20.00  170.00 6930.00  2540
ifconfig        U    root    .root    0        0.00  30.00  90.00  1400
grep            U    root    .root    0        0.00  30.00  100.00  1460
sh              U    root    .root    0        0.00  60.00  190.00  2316


mikecrowe 05-02-2005 09:03 PM

Checked. No stale PID file.

zeos 05-02-2005 09:10 PM

you could always try strace to see if it gives you any indication of when in the process it's dying....

Code:

strace httpd2-prefork -f /etc/apache2/httpd.conf
or simply run httpd2-prefork through an strace without specifying the conf file...

mikecrowe 05-02-2005 09:17 PM

Wow. I learned something today. Here's the tail of strace:

Code:

lstat64("/etc/apache2/conf.d", {st_mode=S_IFDIR|0755, st_size=120, ...}) = 0
open("/etc/apache2/conf.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 8
fstat64(8, {st_mode=S_IFDIR|0755, st_size=120, ...}) = 0
fcntl64(8, F_SETFD, FD_CLOEXEC)        = 0
getdents(8, /* 4 entries */, 4096)      = 88
getdents(8, /* 0 entries */, 4096)      = 0
close(8)                                = 0
lstat64("/etc/apache2/conf.d/apache2-manual.conf", {st_mode=S_IFREG|0644, st_size=905, ...}) = 0
open("/etc/apache2/conf.d/apache2-manual.conf", O_RDONLY) = 8
fstat64(8, {st_mode=S_IFREG|0644, st_size=905, ...}) = 0
read(8, "#\n# This configuration file belo"..., 4096) = 905
read(8, "", 4096)                      = 0
close(8)                                = 0
read(5, "", 4096)                      = 0
close(5)                                = 0
lstat64("/etc/apache2/sysconfig.d/include.conf", {st_mode=S_IFREG|0644, st_size=150, ...}) = 0
open("/etc/apache2/sysconfig.d/include.conf", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=150, ...}) = 0
read(5, "#\n# This file is created at apac"..., 4096) = 150
read(5, "", 4096)                      = 0
close(5)                                = 0
lstat64("/etc/apache2/vhosts.d", {st_mode=S_IFDIR|0755, st_size=120, ...}) = 0
open("/etc/apache2/vhosts.d", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 5
fstat64(5, {st_mode=S_IFDIR|0755, st_size=120, ...}) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC)        = 0
getdents(5, /* 4 entries */, 4096)      = 92
getdents(5, /* 0 entries */, 4096)      = 0
close(5)                                = 0
read(4, "", 4096)                      = 0
close(4)                                = 0
chdir("/")                              = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x402fa908) = 17569
exit_group(0)                          = ?


zeos 05-02-2005 09:28 PM

Nothing telling there, I just compared the trace output to one of my suse box's (default apache install) and got identical output with a fully running process resulting....Appears as thought it's starting, then dying after sucessful start...

Have you made any changes to the default config's? if so, what?
I'll think on it some more and post back if anything comes to me .....


mrhatken 05-04-2005 11:50 PM

Any progress?
 
Howdy All,

Any progress on this problem?

We're seeing the same thing with Apache2 on Solaris ...

Thanks in advance for any information.

Cheers,
Ashley.

pehden 09-19-2010 03:48 PM

Having this issue with ubuntu
 
Just happened after a reboot!

pehden 09-19-2010 04:46 PM

Fixed my error.
 
OK WTF Happened I dont know but im guessing there was an update the wiped the apache2 exec file and renamed it apache2.1 I removed apache2 and renamed apache2.1 to apache2 and its up again.


All times are GMT -5. The time now is 01:35 AM.