LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-02-2005, 04:25 PM   #1
mikecrowe
LQ Newbie
 
Registered: Nov 2004
Posts: 17

Rep: Reputation: 0
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
 
Old 05-02-2005, 04:34 PM   #2
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
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?
 
Old 05-02-2005, 04:38 PM   #3
mikecrowe
LQ Newbie
 
Registered: Nov 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Did that. Recreates with 0 size. Brand new installation, so it should be straight forward.
 
Old 05-02-2005, 04:41 PM   #4
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
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.
 
Old 05-02-2005, 08:55 PM   #5
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
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...
 
Old 05-02-2005, 08:59 PM   #6
mikecrowe
LQ Newbie
 
Registered: Nov 2004
Posts: 17

Original Poster
Rep: Reputation: 0
To the earlier recommendation to try acctail (great program!):

Code:
[email protected] acctail-1.3 # acctail
acctail v1.3, (C) [email protected]

COMMAND          FLGS UID     .GID      EXIT    UTIME   STIME   ETIME   MEM
-------------------------------------------------------------------------------
[email protected] acctail-1.3 # yast
[email protected] acctail-1.3 # man screen
Reformatting screen(1), please wait...
[email protected] 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
 
Old 05-02-2005, 09:03 PM   #7
mikecrowe
LQ Newbie
 
Registered: Nov 2004
Posts: 17

Original Poster
Rep: Reputation: 0
Checked. No stale PID file.
 
Old 05-02-2005, 09:10 PM   #8
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
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...
 
Old 05-02-2005, 09:17 PM   #9
mikecrowe
LQ Newbie
 
Registered: Nov 2004
Posts: 17

Original Poster
Rep: Reputation: 0
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)                           = ?
 
Old 05-02-2005, 09:28 PM   #10
zeos
Member
 
Registered: Aug 2003
Posts: 150

Rep: Reputation: 15
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 .....


Last edited by zeos; 05-02-2005 at 09:33 PM.
 
Old 05-04-2005, 11:50 PM   #11
mrhatken
LQ Newbie
 
Registered: May 2005
Location: Perth, Western Australia
Posts: 1

Rep: Reputation: 0
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.
 
Old 09-19-2010, 03:48 PM   #12
pehden
LQ Newbie
 
Registered: Sep 2010
Posts: 5

Rep: Reputation: 0
Having this issue with ubuntu

Just happened after a reboot!
 
Old 09-19-2010, 04:46 PM   #13
pehden
LQ Newbie
 
Registered: Sep 2010
Posts: 5

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 (re)start problem X-DraGoN Debian 1 11-08-2005 03:09 PM
How to start Apache2 Rodotheos Linux - Software 4 10-01-2005 06:21 AM
apache2 won't start atheist Linux - Software 1 10-23-2004 04:14 PM
Apache2 won't start sasklinuxuser Linux - General 4 09-22-2004 02:33 PM
apache2 fails to start Nickelaway Linux - Software 3 07-23-2004 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration