In the default merge of vcron, syslog-ng and logrotate the syslog-ng service is restarted when the logrotate cron.daily job is run in accordance with the /etc/logrotate.d/syslog-ng config file. Because syslog-ng depends on the cron service, the process looks like this: stop vcron stop syslog-ng start syslog-ng start vcron However, at the point when we want to restart vcron, /usr/sbin/cron is still running, presumably because there are other cron.daily jobs running at the same time. /sbin/start-stop-daemon sees the other cron running and refuses to start /usr/sbin/cron again. There is really no reason to re-start syslog-ng for log rotation since syslog-ng is quite happy to receive SIGHUP to reopen the log files which is why logrotate is messing with it at all. By simply sending SIGHUP to syslog-ng we avoid the whole issue of stopping and restarting vcron via vcron. The solution to this issue is the add a custom function to /etc/init.d/syslog-ng (reload() ala xinetd) and change /etc/logrotate.d/syslog-ng to call this function instead of restarting the service. I'll attach patches. A big thanks to agriffis who had to listen to me whine about this for some time and came through in the end with the fix and the pointer to /etc/init.d/xinetd which I stole from with abandon. Reproducible: Always Steps to Reproduce: 1. install vcron, syslog-ng and logrotate 2. wait for run-crons to run the logrotate job in cron.daily 3. see that vcron isn't restarted properly Actual Results: vcron wasn't restarted. Expected Results: vcron should have been restarted. Portage 2.0.47-r2 (default-1.0, gcc-2.95.3, glibc-2.2.5-r2,2.2.5-r7) ================================================================= System uname: 2.4.19-gentoo-r7 i586 Pentium MMX GENTOO_MIRRORS="http://csociety-ftp.ecn.purdue.edu/pub/gentoo http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb" CONFIG_PROTECT_MASK="/etc/bash_completion /etc/sound/events /etc/X11/rstart /etc/X11/xdm /etc/pango /etc/gconf /etc/env.d" PORTDIR="/usr/portage" DISTDIR="/usr/portage/distfiles" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR_OVERLAY="/usr/local/portage" USE="x86 oss 3dnow apm avi crypt cups encode jpeg libg++ mikmod mmx mpeg ncurses pdflib qtmt sdl spell truetype xml2 xmms xv berkdb esd gdbm gif gnome gnome-libs gtk guile java libwww oggvorbis opengl pam perl png python readline slang snmp ssl tcpd tetex tiff X -quicktime -svga -motif -nls -imlib -kde -qt -arts gpm mozilla" COMPILER="" CHOST="i586-pc-linux-gnu" CFLAGS="-march=i586 -O3 -pipe" CXXFLAGS="-march=i586 -O3 -pipe" ACCEPT_KEYWORDS="x86" MAKEOPTS="-j2" AUTOCLEAN="yes" SYNC="rsync://rsync.gentoo.org/gentoo-portage" FEATURES="sandbox ccache userpriv"
Created attachment 8692 [details, diff] patch to add opts and reload function to /etc/init.d/syslog-ng This patch adds opts and a reload function to /etc/init.d/syslog-ng The reload function allows us to get syslog-ng to reopen its logfiles without having to call restart() which will shutdown the cron service as well.
Fixed in 1.5.26-r1 (presently ~ masked). Thanks!