Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520918 - www-servers/apache - /etc/init.d/apache2 incorrectly warns apache failed to start
Summary: www-servers/apache - /etc/init.d/apache2 incorrectly warns apache failed to s...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-26 04:55 UTC by dE
Modified: 2019-04-20 14:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
init script (apache2,4.88 KB, text/plain)
2015-09-14 09:14 UTC, Robert Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dE 2014-08-26 04:55:11 UTC
Regardless of what the configuration is, and even if apache can be started directly and successfully, the init scripts always complain that apache2 failed to start, even though it does start the process successfully and pages are being hosted.

Apache2 was build without any modules.

/etc/apache2/httpd.conf -- 

Listen [::1]:8080
Listen 127.0.0.1:8080
ErrorLog /var/log/apache2/error.log
User de
Group de
DocumentRoot "/home/de/small/docs/Knowledge base/Complete knowledge(books and all)/Software"
<directory "/httpd">
  Options +Indexes
</directory>
DefaultType text/html
gracefulshutdowntimeout 30
ServerName localhost.localdomain

Apache error logs -- 

[Tue Aug 26 09:46:44 2014] [notice] caught SIGTERM, shutting down
[Tue Aug 26 09:46:49 2014] [notice] Apache/2.2.27 (Unix) configured -- resuming normal operations
[Tue Aug 26 09:47:41 2014] [notice] caught SIGTERM, shutting down
[Tue Aug 26 09:47:46 2014] [notice] Apache/2.2.27 (Unix) configured -- resuming normal operations
[Tue Aug 26 09:48:11 2014] [notice] caught SIGTERM, shutting down
[Tue Aug 26 09:48:16 2014] [notice] Apache/2.2.27 (Unix) configured -- resuming normal operations
[Tue Aug 26 09:48:29 2014] [notice] caught SIGTERM, shutting down

Reproducible: Always




Portage 2.2.11 (python 3.3.3-final-0, default/linux/amd64/13.0/desktop/kde, gcc-4.8.3, glibc-2.19-r1, 3.14.8-gentoo x86_64)
=================================================================
System uname: Linux-3.14.8-gentoo-x86_64-Intel-R-_Core-TM-_i3-2120_CPU_@_3.30GHz-with-gentoo-2.2
KiB Mem:     8117728 total,    483384 free
KiB Swap:   17825788 total,  17730336 free
Timestamp of tree: Fri, 01 Aug 2014 04:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.3.3
dev-util/ccache:          3.1.9-r3
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.8.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.14 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo x11 sunrise wish mistafunk bitcoin my-tree
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -fomit-frame-pointer -flto -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-march=native -O2 -fomit-frame-pointer -flto -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=n --complete-graph --binpkg-respect-use=y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy ccache config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/x11 /var/lib/layman/sunrise /var/lib/layman/wish /var/lib/layman/mistafunk /var/lib/layman/bitcoin /home/de/dev-tree"
USE="X a52 a53 aac aalib acc acpi adns alsa amd64 amr atm audiofile branding bzip2 cdda cdr cli consolekit cracklib css custom-cflags custom-optimization dbus dbx declarative dga dirac dri dts dv dvd dvdr emboss encode enscript exif ffmpeg firefox flac fortran gdu gif gles glut gmp gsm gstreamer gzip iconv imlib ipc jit jpeg jpeg2k kde ladspa lame lcms libedit libnotify libsamplerate libwww lzma lzo mad matroska matrox mikmod mime minimal mmap mmx mng modules mozilla mp3 mp4 mpeg mplayer mudflap multilib musepack networkmanager nntp nocd nptl nptlonly nsplugin offensive ogg openal opencl openexr opengl openmp optimization orc osc pam pango pdf phonon plasma png policykit posix ppds pppd qt3support qt4 quicktime raw readline schroedinger sharedmem shorten smp sndfile sockets socks5 speex spell sse sse2 sse3 sse4 sse4_1 sse4_2 ssse3 startup-notification strong-optimization svg symlink sysfs taglib tcpd theora threads tiff toolame truetype twolame udev udisks unicode upower usb vaapi vcd vhosts vorbis wavpack win32codecs wmf wxwidgets x264 xcb xcomposite xine xinerama xml xorg xpm xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver pdfimport" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="arm" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="intel i965 i915" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-08-26 07:20:43 UTC
Please post the output of `/etc/init.d/apache2 restart' in a comment.
Comment 2 dE 2014-08-26 16:23:21 UTC
/etc/init.d/apache2 restart
apache2          | * Caching service dependencies ...                                                               [ ok ]
apache2          | * Starting apache2 ...                                                                           [ !! ]
apache2          | * ERROR: apache2 failed to start
DESKTOP_MINER linux-3.14.8-gentoo # pgrep apache
32574
32575
32576
32577
DESKTOP_MINER linux-3.14.8-gentoo # apache2 -k graceful-stop
DESKTOP_MINER linux-3.14.8-gentoo # pgrep apache
DESKTOP_MINER linux-3.14.8-gentoo #


This's apache 2.4.10-r1
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2015-04-01 13:10:42 UTC
In case this is still an issue, please attach your /etc/init.d/apache2 init script to this bug.
Comment 4 dE 2015-09-13 09:16:23 UTC
Migrated to system.

Works with it.
Comment 5 Robert Förster 2015-09-14 09:14:51 UTC
Created attachment 411880 [details]
init script

i missed the last comment so here is the script. (using systemd isn't really an option here)

note that i cannot reproduce it; it just randomly happens
Comment 6 dE 2015-09-17 09:13:28 UTC
Did you try that minimal config?

Listen [::1]:8080
Listen 127.0.0.1:8080
ErrorLog /var/log/apache2/error.log
User de
Group de
DocumentRoot "/home/de/small/docs/Knowledge base/Complete knowledge(books and all)/Software"
<directory "/httpd">
  Options +Indexes
</directory>
DefaultType text/html
gracefulshutdowntimeout 30
ServerName localhost.localdomain
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-04-20 14:52:09 UTC
In case this is sthill an issue, please try with recent apache versions and make sure to update the init script with etc-update