PDA

View Full Version : Apache Not Starting



alpha
12-22-2003, 01:12 AM
Okay, I've been trying to troubleshoot this issue for about 2 hours and I'm stumped.

Everything is running as it should be except Apache. I click the restart link, Apache seem to start up but it's not up.

I've checked /var/log/httpd/error_log and it doesn't show any recent errors.

I've done /usr/local/etc/rc.d/httpd start
and it shows Starting httpd: [Ok] except when you check again, apache isn't running at all.

Any ideas? :confused:

alpha
12-22-2003, 07:11 AM
snip of /var/log/messages:
Dec 22 23:06:02 summer kernel: pid 48622 (httpd), uid 0: exited on signal 11 (core dumped)
Dec 22 23:06:06 summer kernel: pid 48835 (httpd), uid 0: exited on signal 11 (core dumped)
Dec 22 23:07:02 summer kernel: pid 53684 (httpd), uid 0: exited on signal 11 (core dumped)
Dec 22 23:07:06 summer kernel: pid 54944 (httpd), uid 0: exited on signal 11 (core dumped)
Dec 22 23:08:05 summer kernel: pid 62580 (httpd), uid 0: exited on signal 11 (core dumped)
Dec 22 23:08:27 summer kernel: pid 62669 (httpd), uid 0: exited on signal 11 (core dumped)

and sure enough:

-bash-2.05b# ls -l /| grep core
-rw------- 1 root wheel 2719744 Dec 22 23:11 httpd.core

DirectAdmin Support
12-22-2003, 08:30 AM
Hello,

I'm pretty sure Frontpage is to blame for this one. Try removing the patch commands and then re-extracting / recompiling apache.



cd /usr/local/directadmin/customapache
vi build
# find and remove from "doApache()
patch -p0 < ../fp-patch-apache_1.3.22
patch -p0 < ../fp-patch-suexec
# save
./build clean
./build apache_mod_ssl


This will probably throw a wrench in Frontpage.. Hopefully we can figure out why it's doing that.

John

alpha
12-22-2003, 12:19 PM
--add-module=mod_frontpage.c \

I also took off that line in configure.apache_ssl because it would't compile since we don't want frontpage in this case.

but unfortunately, Apache is still failing to load and is still core'ing

alpha
12-22-2003, 12:21 PM
I sent you guys the access information again (because of password change) through the safesubmit form if you guys want to take a gander at this issue.

DirectAdmin Support
12-23-2003, 09:25 AM
Hello,

Alright, I'll take a look when Mark forwards me the info.

John

alpha
12-23-2003, 12:13 PM
John,

You should take a break for Christmas sometime soon and worry about 5.1 afterwards ;)

Merry Christmas to the DA staff :D

The Prohacker
12-24-2003, 12:19 AM
I've actually had this happen.. But not on a DA server.. It was a version of phpIonEncoder.. But is prolly differnt.. You might run gdb on the core dump...

alpha
12-24-2003, 01:49 PM
here's a snippet of gdb's reports:
Loaded symbols for /usr/lib/libz.so.2
Reading symbols from /etc/httpd/modules/libssl.so...done.
Loaded symbols for /etc/httpd/modules/libssl.so
Reading symbols from /usr/local/Zend/lib/ZendExtensionManager.so...done.
Loaded symbols for /usr/local/Zend/lib/ZendExtensionManager.so
Reading symbols from /usr/local/Zend/lib/Optimizer-2.1.0/php-4.3.x/ZendOptimizer.so...done.
Loaded symbols for /usr/local/Zend/lib/Optimizer-2.1.0/php-4.3.x/ZendOptimizer.so
Reading symbols from /usr/libexec/ld-elf.so.1...done.
Loaded symbols for /usr/libexec/ld-elf.so.1
#0 0x0804fdd2 in ap_clear_pool ()

alpha
12-26-2003, 09:10 PM
Okay - I've basically tried many different debugging methods to try to get httpd to stay up but without much success.

I am completely lost in this Apache problem.

Hopefully, you guys will be able to find out what the problem is...

DirectAdmin Support
12-27-2003, 10:19 AM
Hello,

Send your IP and root login information and we'll have a look.

John

alpha
12-27-2003, 11:53 AM
I've already sent this using the safe submit form :)

DirectAdmin Support
12-28-2003, 12:13 PM
I'll check and see if I can find it. If not I'll let you know.

John

existenz
12-29-2003, 12:57 PM
I think I am having the same problem in 5.1. Apache would not start after a fresh install. I get core dumps also.

I was reading and it seems that possibly some versions of OpenSSL and Frontpage are not getting along with 5.x?

DirectAdmin Support
12-30-2003, 10:16 AM
Hello,

I know on the build system here, frontpage refused to work, but Im not sure about the OpenSSL issue.. where did you read it? I've got apache working on alpha's system using the ports collection of apache13-modssl, without frontpage..just modified the makefile. I'll just have to figure out what they do differently. I'll attach the Makefile I used:




# New ports collection makefile for: Apache + mod_ssl
# Date created: Sat Aug 22 12:00:00 CDT 1998
# Whom: rse@engelschall.com
#
# $FreeBSD: ports/www/apache13-modssl/Makefile,v 1.121 2003/04/16 14:17:06 dinoex Exp $
#

PORTNAME= apache+mod_ssl
PORTVERSION= ${VERSION_APACHE}+${VERSION_MODSSL}
CATEGORIES= www security
MASTER_SITES= ${MASTER_SITE_APACHE_HTTPD} \
${MASTER_SITES_MODSSL:S/$/:modssl/}
DISTNAME= apache_${VERSION_APACHE}
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
mod_ssl-${VERSION_MODSSL}-${VERSION_APACHE}${EXTRACT_SUFX}:modssl

MAINTAINER= ports@FreeBSD.org
COMMENT= The Apache 1.3 webserver with SSL/TLS functionality

LIB_DEPENDS= mm.12:${PORTSDIR}/devel/mm

MASTER_SITES_MODSSL= http://www.modssl.org/source/ \
ftp://ftp.modssl.org/source/ \
ftp://ftp.pca.dfn.de/pub/tools/net/mod_ssl/ \
ftp://ftp.ecrc.net/pub/security/mod_ssl/ \
ftp://ftp.nvg.ntnu.no/pub/unix/mod_ssl/ \
ftp://ftp.ulpgc.es/pub/mod_ssl/ \
ftp://glock.missouri.edu/pub/mod_ssl/ \
ftp://ftp.infoscience.co.jp/pub/Crypto/SSL/mod_ssl/ \
ftp://ftp.uni-trier.de/pub/unix/security/mod_ssl/ \
ftp://ftp.blatzheim.com/pub/mod_ssl/ \
ftp://ftp.fu-berlin.de/unix/security/mod_ssl/ \
ftp://ftp.ntrl.net/pub/mirror/ralfsw/mod_ssl/ \
${MASTER_SITE_RINGSERVER:S,%SUBDIR%,net/www/mod_ssl/source,}
USE_OPENSSL= YES

.include <bsd.port.pre.mk>

VERSION_APACHE= 1.3.29

VERSION_MODSSL= 2.8.16

DATADIR= /var/www
DOCUMENT_ROOT= ${DATADIR}/html
DEFAULT_PATH=/bin:/usr/bin:${PREFIX}/bin

.if defined(WITH_APACHE_SUEXEC) && ${WITH_APACHE_SUEXEC} == yes

APACHE_SUEXEC_DOCROOT?=/
APACHE_SUEXEC_USERDIR?=public_html

SUEXEC_CONF=\
--enable-suexec \
--suexec-docroot=${APACHE_SUEXEC_DOCROOT} \
--suexec-caller=apache \
--suexec-uidmin=1000 \
--suexec-gidmin=1000 \
--suexec-logfile=/var/log/httpd/suexec_log \
--suexec-userdir=${APACHE_SUEXEC_USERDIR}

.if defined(APACHE_SUEXEC_UMASK)
SUEXEC_CONF+=\
--suexec-umask=${APACHE_SUEXEC_UMASK}
.endif

PLIST_SUB+= SUB_SUEXEC=""
SUEXEC_MAN= suexec.8

.else # !SUEXEC

SUEXEC_CONF=
PLIST_SUB+= SUB_SUEXEC="@comment "
SUEXEC_MAN=

.endif # !SUEXEC

USE_PERL5= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS+=--prefix=/etc/httpd \
--exec-prefix=/etc/httpd \
--server-uid=apache \
--server-gid=apache \
--with-perl=/usr/bin/perl \
--enable-module=all \
--disable-module=auth_db --disable-module=auth_dbm \
--enable-shared=max \
--enable-module=ssl \
--sysconfdir=/etc/httpd/conf \
--sbindir=/usr/sbin \
--bindir=/usr/bin \
${SUEXEC_CONF}

OPTIM= -DHARD_SERVER_LIMIT=512 \
-DDOCUMENT_LOCATION=\\"${PREFIX}/www/data/\\" \
-DDEFAULT_PATH=\\"${PREFIX}/bin:/bin:/usr/bin\\" \
-DACCEPT_FILTER_NAME=\\"httpready\\"

.if defined(WITH_APACHE_PERF_TUNING) && ${WITH_APACHE_PERF_TUNING} == YES
OPTIM+= -DBUFFERED_LOGS -DFD_SETSIZE=1024
CFLAGS+= -O6 -funroll-loops -fstrength-reduce -fomit-frame-pointer \
-fexpensive-optimizations -ffast-math
.endif

.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"

CONFIGURE_ENV= CFLAGS='${CFLAGS}' \
OPTIM='${OPTIM}' \
SSL_BASE='${OPENSSLBASE}' \
EAPI_MM='SYSTEM' \
PATH="${PREFIX}/bin:${PATH}"

INSTALL_TARGET= install-quiet

MAN1= dbmmanage.1 htdigest.1 htpasswd.1
MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 \
${SUEXEC_MAN}

TYPE= test
CRT=
KEY=

post-extract:
@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/apache.sh \
> ${WRKSRC}/apache.sh

pre-patch:
@cd ${WRKDIR}/mod_ssl-${VERSION_MODSSL}-${VERSION_APACHE} \
&& ${ECHO_MSG} "===> Applying mod_ssl-${VERSION_MODSSL} extension" \
&& ./configure --with-apache=../${DISTNAME} --expert

post-patch:
@${PERL} -pi -e 's|-print|-print0|;s|xargs|xargs -0|' \
${WRKSRC}/Makefile.tmpl
@${PERL} -pi -e "s|SSL_LDFLAGS=''|SSL_LDFLAGS='${OPENSSL_LDFLAGS}'|" \
${WRKSRC}/src/modules/ssl/libssl.module
@cd ${WRKSRC} \
&& ${FIND} . -type f -name "*.orig" -print | ${XARGS} ${RM} -f

post-build:
@cd ${WRKSRC} \
&& ${ECHO_MSG} "===> Creating Dummy Certificate for Server (SnakeOil)" \
&& ${ECHO_MSG} " [use 'make certificate' to create a real one]" \
&& ${MAKE} certificate TYPE=dummy >/dev/null 2>&1

certificate:
@cd ${WRKSRC} \
&& ${ECHO_MSG} "===> Creating Test Certificate for Server" \
&& ${MAKE} certificate TYPE=${TYPE} CRT=${CRT} KEY=${KEY}

pre-install:
@${PKGINSTALL} ${PKGNAME} PRE-INSTALL

post-install:
${INSTALL_DATA} ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh-dist
@if [ ! -f ${PREFIX}/etc/rc.d/apache.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/apache.sh startup file."; \
${INSTALL_SCRIPT} ${WRKSRC}/apache.sh ${PREFIX}/etc/rc.d/apache.sh; \
fi

.include <bsd.port.post.mk>
Just throw that into /usr/ports/www/apache13-modssl/Makefile and run "make install"

John