View previous topic :: View next topic |
Author |
Message |
tecknojunky Veteran


Joined: 19 Oct 2002 Posts: 1937 Location: Montréal
|
Posted: Sat Aug 16, 2003 8:58 am Post subject: apache fails to start but yeilds a 0 exit code. |
|
|
After I emerged the latest stable apache1, it would not star altough the init script claimed [OK].
After the second run, it started to gives errors. So I tried manual starts:
Code: | # /usr/sbin/apache -D PHP4 -D GZIP -D SSL
[Thu Aug 14 20:00:26 2003] [warn] module ssl_module is already loaded, skipping
[Thu Aug 14 20:00:26 2003] [warn] module mod_ssl.c is already added, skipping
[Thu Aug 14 20:00:26 2003] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
|
So I guess the merge messed up my confs file and I'll fix it.
The point is... Code: | popa root # /usr/sbin/apache -D PHP4 -D GZIP -D SSL && echo I am so dumb
[Thu Aug 14 20:02:56 2003] [warn] module ssl_module is already loaded, skipping
[Thu Aug 14 20:02:56 2003] [warn] module mod_ssl.c is already added, skipping
[Thu Aug 14 20:02:56 2003] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
I am so dumb
popa root # ps waux | grep apache
root 20352 0.0 0.3 1320 396 pts/0 S 20:03 0:00 grep apache
popa root # /usr/sbin/apache && echo ...soooooo dumb
...soooooo dumb
popa root # ps waux | grep apache
root 20355 6.2 1.6 5332 2036 ? S 20:03 0:00 /usr/sbin/apache
apache 20356 0.3 1.6 5348 2024 ? S 20:03 0:00 [apache]
apache 20357 0.3 1.6 5348 2024 ? S 20:03 0:00 [apache]
apache 20358 0.0 1.6 5348 2024 ? S 20:03 0:00 [apache]
apache 20359 0.3 1.6 5348 2024 ? S 20:03 0:00 [apache]
root 20364 0.0 0.3 1320 396 pts/0 S 20:04 0:00 grep apache
| So apache return a 0 code even if it fails to start. No way to know if it faild or not. Unless I'm missing something?
Can someone verify that the previous version dont behave this way. Code: | # apache -v
Server version: Apache/1.3.28 (Unix) (Gentoo/Linux)
Server built: Aug 14 2003 18:43:52
|
_________________ (7 of 9) Installing star-trek/species-8.4.7.2::talax. |
|
Back to top |
|
 |
rojaro l33t

Joined: 06 May 2002 Posts: 732
|
Posted: Sat Aug 16, 2003 3:50 pm Post subject: |
|
|
check the error_log ... the're for sure some error messages in it _________________ A mathematician is a machine for turning coffee into theorems. ~ Alfred Renyi (*1921 - †1970) |
|
Back to top |
|
 |
tecknojunky Veteran


Joined: 19 Oct 2002 Posts: 1937 Location: Montréal
|
Posted: Sat Aug 16, 2003 9:03 pm Post subject: |
|
|
Yes, there is: "[crit] (98)Address already in use: make_sock: could not bind to port 443". And I've fixed it. But that's beside the point.
The point is that you can't detect this error unless you check the pid file: if it exists, is the number in it a running process? Is it really Apache? If not, does ps aux | grep apache yield a result? Is it the grep process itself? Is it an apache process? Yes? Then Apache is running. It's messy stuff that never execute fast.
The point is that init scripts will report a success status when, in fact, it failed to start. Not Gentoo's fault, Apache's own apachectl fails too.
That's all. _________________ (7 of 9) Installing star-trek/species-8.4.7.2::talax. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|