OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
/bin/sh on /etc/rc terminated - pipes in httpd.conf?

axax-im.com
Date: Fri Aug 20 2004 - 03:57:11 CDT


Hello all. Requesting your indulgence. I've googled until I can google
no more. I think I've found the problem too, but I don't know what to
do about it.

I'm on a recently updated stable build of 3.5...
OpenBSD 3.5-stable (GENERIC) #1: Sun Aug 8 16:22:22 PDT 2004
    [userhost]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) 4 CPU 2.40GHz ("GenuineIntel" 686-class) 2.42
GHz

I am running into a problem with a server which won't boot cleanly. It
gets to " httpd" then " inetd" then immediately says "[date] [host]
init: /bin/sh on /etc/rc terminated abnormally, going to single user
mode". Well, turns out that httpd's the likely culprit. I've tried
rearranging things in /etc/rc (e.g. to start sshd sooner so I can reach
my server to fix things), and I've tried removing the httpd startup bit
and using "apachectl startssl" in rc.local instead, and it does the same
thing.

Actually, apache + ssl starts up fine, but the default apache error_log
file begins with "Terminated", repeated 34 times. Well, I have 17
virtual hosts, all piping logs to cronolog (my favorite rotation
device), both access & error. That's 34.

The only google result which seemed even vaguely similar to mine
(http://monkey.org/openbsd/archive/misc/0109/msg00584.html) exhibited
one thing in common -- he was also using pipes in his log rotation,
although he was using rotatelogs. Nobody who replied suggested this as
a possible culprit.

I should repeat that apache in fact works perfectly on boot -- it's just
that /etc/rc can't seem to proceed past it. I.e. it's not an apache
configuration issue -- I've had this configuration with logs piped to
cronolog working for years, and I have a nearly identical apache setup
on another server running the exact same build of 3.5-stable which boots
perfectly, the only difference being that there are no piped logs in its
httpd.conf.

I've worked out a temporary solution for the moment by putting every
essential service before apache, but I'd really like to have it work
cleanly. How can I attack this? What additional info can I provide?

Thanks much...
Alex Fordyce
axax-im.com