Vixiecron not working all the sudden

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Vixiecron not working all the sudden

Daevid Vincent
Recently, around October 23rd, I've noticed that my cron.daily stuff isn't
running. I've tried to 'restart' vixiecron and it complains that it's
already started (duh). So I'll killall cron, rm the pid, etc. and then start
it again and it works for a while then dies again. I made a simple script
that emails me and put it in cron.hourly... Sure enough after a while it
just stops working. WTF.

I haven't updated vixiecron in a very long time...

# genlop -l | grep cron
     Fri Jul 23 04:23:37 2004 >>> sys-apps/cronbase-0.3
     Sun Nov  7 10:54:47 2004 >>> sys-apps/vixie-cron-4.1-r2
     Sun Nov  7 21:54:46 2004 >>> sys-apps/cronbase-0.3.1
     Mon Nov 29 03:50:10 2004 >>> sys-apps/vixie-cron-4.1-r4
     Mon Apr 25 04:21:06 2005 >>> sys-process/vixie-cron-4.1-r7
     Sat May  7 20:28:31 2005 >>> sys-process/cronbase-0.3.2
     Thu Aug 11 06:22:34 2005 >>> sys-process/vixie-cron-4.1-r8

# genlop -l --date 4 weeks ago
 * app-admin/gnome-system-tools

[I removed some kde/gnome stuff, as that should have no effect]

     Wed Oct 19 12:51:38 2005 >>> [some stuff, but cron worked after this
point]

     Mon Oct 31 17:33:17 2005 >>> app-shells/bash-3.0-r13
     Mon Oct 31 20:48:56 2005 >>> dev-libs/openssl-0.9.7e-r2
     Mon Oct 31 23:23:51 2005 >>> dev-lang/python-2.4.2
     Mon Oct 31 23:36:04 2005 >>> sys-apps/sysvinit-2.86-r2
     Tue Nov  1 00:29:48 2005 >>> net-misc/rsync-2.6.6-r1
     Tue Nov  1 01:11:06 2005 >>> net-misc/wget-1.10.2
     Tue Nov  1 01:45:29 2005 >>> sys-apps/man-pages-2.09
     Tue Nov  1 03:00:18 2005 >>> sys-devel/libtool-1.5.20
     Tue Nov  1 17:22:28 2005 >>> sys-fs/udev-070-r1
     Tue Nov  1 19:48:17 2005 >>> sys-libs/pam-0.78-r3
     Tue Nov  1 21:29:46 2005 >>> net-misc/openssh-4.2_p1
     Wed Nov  2 01:18:33 2005 >>> dev-perl/DBD-mysql-2.9007
     Wed Nov  2 01:22:39 2005 >>> media-sound/alsa-headers-1.0.10_rc2
     Wed Nov  2 01:32:16 2005 >>> media-libs/alsa-lib-1.0.10_rc2
     Wed Nov  2 01:32:51 2005 >>> app-admin/localepurge-0.2-r2
     Wed Nov  2 01:37:12 2005 >>> mail-mta/exim-4.54
     Wed Nov  2 01:42:49 2005 >>> dev-libs/glib-2.8.3
     Wed Nov  2 11:25:22 2005 >>> app-crypt/gpgme-1.1.0
     Thu Nov  3 01:24:42 2005 >>> media-libs/taglib-1.4
     Thu Nov  3 08:53:06 2005 >>> net-misc/curl-7.15.0
     Thu Nov  3 08:57:10 2005 >>> gnome-base/librsvg-2.12.7
     Thu Nov  3 08:58:36 2005 >>> app-text/gnome-doc-utils-0.4.3
     Thu Nov  3 09:01:17 2005 >>> media-sound/sound-juicer-2.12.2-r1
     Thu Nov  3 09:31:07 2005 >>> dev-python/pygtk-2.8.2
     Thu Nov  3 09:34:29 2005 >>> app-portage/gentoolkit-0.2.0-r2
     Thu Nov  3 09:37:48 2005 >>> dev-db/phpmyadmin-2.6.4_p3
     Thu Nov  3 09:38:29 2005 >>> net-www/mod_auth_mysql-3.0.0
     Thu Nov  3 09:48:29 2005 >>> media-sound/beep-media-player-0.9.7-r8
     Thu Nov  3 09:51:51 2005 >>> media-libs/imlib2-1.2.1.009
     Thu Nov  3 09:52:48 2005 >>> net-ftp/vsftpd-2.0.3-r2
     Thu Nov  3 10:26:21 2005 >>> media-gfx/imagemagick-6.2.4.2-r1
     Thu Nov  3 23:31:26 2005 >>> sys-devel/gcc-config-1.3.12-r3
     Thu Nov  3 23:42:31 2005 >>> sys-kernel/gentoo-sources-2.6.13-r5
     Thu Nov  3 23:51:59 2005 >>> media-libs/netpbm-10.29
     Thu Nov  3 23:52:43 2005 >>> app-admin/eselect-1.0_rc1
     Thu Nov  3 23:53:21 2005 >>> app-admin/eselect-opengl-1.0.3
     Fri Nov  4 00:05:30 2005 >>> media-gfx/xloadimage-4.1-r4
     Fri Nov  4 00:10:50 2005 >>> dev-libs/liboil-0.3.3
     Fri Nov  4 00:26:44 2005 >>> net-libs/libwww-5.4.0-r4
     Fri Nov  4 00:32:55 2005 >>> x11-libs/fltk-1.1.6
     Fri Nov  4 00:41:16 2005 >>> media-video/totem-1.2.0-r2
     Sat Nov  5 20:04:15 2005 >>> sys-apps/man-pages-2.11
     Sat Nov  5 23:21:51 2005 >>> media-libs/giflib-4.1.4
     Thu Nov 10 22:13:58 2005 >>> sys-apps/attr-2.4.19-r1
     Thu Nov 10 22:16:32 2005 >>> sys-apps/acl-2.2.27
     Thu Nov 10 22:38:35 2005 >>> media-sound/alsa-headers-1.0.10_rc3
     Thu Nov 10 22:46:57 2005 >>> media-libs/alsa-lib-1.0.10_rc3
     Thu Nov 10 22:47:27 2005 >>> app-portage/mirrorselect-1.2
     Thu Nov 10 23:27:17 2005 >>> dev-util/desktop-file-utils-0.10-r1
     Thu Nov 10 23:34:36 2005 >>> x11-libs/vte-0.11.15-r1
     Thu Nov 10 23:35:17 2005 >>> app-portage/gentoolkit-0.2.0-r3
     Thu Nov 10 23:38:35 2005 >>> dev-db/phpmyadmin-2.7.0_beta1


The cron man page states:
"In  this  version  of cron, /etc/crontab must not be readable or writable
by any user other than root. In other words, it should be mode 0600."

# ll /etc/crontab
-rw-r--r--  1 root root 2477 Aug 11 06:22 /etc/crontab
# chmod 600 /etc/crontab
# ll /etc/crontab
-rw-------  1 root root 2477 Aug 11 06:22 /etc/crontab
# /etc/init.d/vixie-cron restart

But I don't think that will slove it, as the date of the file his Aug
11th... So that means it was running fine for several months with the wrong
perms...

--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: Vixiecron not working all the sudden

Arturo 'Buanzo' Busleiman
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daevid Vincent wrote:
> But I don't think that will slove it, as the date of the file his Aug
> 11th... So that means it was running fine for several months with the wrong
> perms...

is it running? I mean, ps ax shows it?

- --
Arturo "Buanzo" Busleiman - www.buanzo.com.ar
Consultor en Seguridad Informatica / Dominio Digital TV - Da FOSS man!
KTP Consultores - info AT ktpconsultores.com.ar

Romper un sistema de seguridad los acerca tanto a ser hackers como el
encender autos puenteando los convierte en ingenieros automotrices.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDezCLAlpOsGhXcE0RAlJmAJ9l9tsXRvXtx4cpTJ+712CexG/U4QCbBPjR
EUUyEVXom7VQT8wrYkk26p0=
=2ejn
-----END PGP SIGNATURE-----
--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

RE: Vixiecron not working all the sudden

Daevid Vincent
> -----Original Message-----
> From: Arturo 'Buanzo' Busleiman [mailto:[hidden email]]
> Sent: Wednesday, November 16, 2005 5:14 AM
>
> Daevid Vincent wrote:
> > But I don't think that will slove it, as the date of the
> file his Aug
> > 11th... So that means it was running fine for several
> months with the wrong
> > perms...
>
> is it running? I mean, ps ax shows it?

Yes, it is running.

Is there supposed to be more than one running? I haven't done anything with
the server since last night's post (when I restared vixiecron after killing
all the processes manually)

daevid ~ # ps ax | grep cron
13415 ?        Ss     0:00 /usr/sbin/cron
15019 ?        S      0:00 /usr/sbin/cron
15023 ?        Ss     0:00 /bin/bash -c test -x /usr/sbin/run-crons &&
/usr/sbin/run-crons
15030 ?        S      0:00 /bin/bash /usr/sbin/run-crons
26879 ?        S      0:00 /bin/sh /etc/cron.daily/slocate
28850 pts/1    S+     0:00 grep cron

My 'hourly email' script mailed me at 12:10, 1:10, 2:10 and 3:10 am and it's
now noon and I've not received any others.

I don't notice anything standing out in the logs...

ipTeller.sh runs every 15 minutes and lets me know if my dynamic IP changed.


crond # cat current | grep -v ipTeller | grep -v gate_news | grep -v 'test
-x'

Nov 16 00:00:01 [cron] (root) CMD (/etc/init.d/ntp-client restart >
/dev/null)
Nov 16 00:00:01 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
Nov 16 00:09:29 [cron] (root) CMD (/sbin/hwclock --systohc > /dev/null)
Nov 16 00:10:01 [cron] (CRON) STARTUP (V5.0)
                - Last output repeated twice -
Nov 16 01:00:02 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
Nov 16 02:00:01 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
                - Last output repeated twice -
                - Last output repeated twice -
Nov 16 03:00:01 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
Nov 16 03:01:01 [cron] (root) CMD (rm -f /var/spool/cron/lastrun/cron.daily)
Nov 16 03:27:01 [cron] (mailman) CMD (/usr/bin/python -S
/usr/local/mailman/cron/nightly_gzip)
                - Last output repeated twice -
                - Last output repeated twice -
Nov 16 04:00:01 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
                - Last output repeated twice -
                - Last output repeated twice -
Nov 16 05:00:01 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
Nov 16 06:00:01 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
Nov 16 07:00:01 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
Nov 16 08:00:01 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
Nov 16 08:00:03 [cron] (mailman) CMD (/usr/bin/python -S
/usr/local/mailman/cron/checkdbs)
                - Last output repeated twice -
                - Last output repeated twice -
Nov 16 09:00:01 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
Nov 16 09:00:02 [cron] (mailman) CMD (/usr/bin/python -S
/usr/local/mailman/cron/disabled)
                - Last output repeated twice -
Nov 16 10:00:01 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
                - Last output repeated twice -
                - Last output repeated twice -
Nov 16 11:00:02 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
Nov 16 12:00:02 [cron] (root) CMD (rm -f
/var/spool/cron/lastrun/cron.hourly)
Nov 16 12:00:02 [cron] (mailman) CMD (/usr/bin/python -S
/usr/local/mailman/cron/senddigests)

"You had me at EHLO" --E.Webb (10.04.05)  


--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

RE: Vixiecron not working all the sudden

Daevid Vincent
Okay I'm beyond annoyed.

Every day at around 3:00AM is when cron stops working until I reset it
manually.

What actually causes the cron.daily stuff to run?! How can I disable it
temporarily??

/etc/crontab only removes some touched files it looks like

"You had me at EHLO" --E.Webb (10.04.05)  

> -----Original Message-----
> From: Daevid Vincent [mailto:[hidden email]]
> Sent: Wednesday, November 16, 2005 12:18 PM
> To: [hidden email]
> Subject: RE: [gentoo-user] Vixiecron not working all the sudden
>
> > -----Original Message-----
> > From: Arturo 'Buanzo' Busleiman [mailto:[hidden email]]
> > Sent: Wednesday, November 16, 2005 5:14 AM
> >
> > Daevid Vincent wrote:
> > > But I don't think that will slove it, as the date of the
> > file his Aug
> > > 11th... So that means it was running fine for several
> > months with the wrong
> > > perms...
> >
> > is it running? I mean, ps ax shows it?
>
> Yes, it is running.
>
> Is there supposed to be more than one running? I haven't done
> anything with
> the server since last night's post (when I restared vixiecron
> after killing
> all the processes manually)
>
> daevid ~ # ps ax | grep cron
> 13415 ?        Ss     0:00 /usr/sbin/cron
> 15019 ?        S      0:00 /usr/sbin/cron
> 15023 ?        Ss     0:00 /bin/bash -c test -x /usr/sbin/run-crons &&
> /usr/sbin/run-crons
> 15030 ?        S      0:00 /bin/bash /usr/sbin/run-crons
> 26879 ?        S      0:00 /bin/sh /etc/cron.daily/slocate
> 28850 pts/1    S+     0:00 grep cron
>
> My 'hourly email' script mailed me at 12:10, 1:10, 2:10 and
> 3:10 am and it's
> now noon and I've not received any others.
>
> I don't notice anything standing out in the logs...
>
> ipTeller.sh runs every 15 minutes and lets me know if my
> dynamic IP changed.
>
>
> crond # cat current | grep -v ipTeller | grep -v gate_news |
> grep -v 'test
> -x'
>
> Nov 16 00:00:01 [cron] (root) CMD (/etc/init.d/ntp-client restart >
> /dev/null)
> Nov 16 00:00:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
> Nov 16 00:09:29 [cron] (root) CMD (/sbin/hwclock --systohc >
> /dev/null)
> Nov 16 00:10:01 [cron] (CRON) STARTUP (V5.0)
>                 - Last output repeated twice -
> Nov 16 01:00:02 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
> Nov 16 02:00:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
>                 - Last output repeated twice -
>                 - Last output repeated twice -
> Nov 16 03:00:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
> Nov 16 03:01:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.daily)
> Nov 16 03:27:01 [cron] (mailman) CMD (/usr/bin/python -S
> /usr/local/mailman/cron/nightly_gzip)
>                 - Last output repeated twice -
>                 - Last output repeated twice -
> Nov 16 04:00:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
>                 - Last output repeated twice -
>                 - Last output repeated twice -
> Nov 16 05:00:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
> Nov 16 06:00:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
> Nov 16 07:00:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
> Nov 16 08:00:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
> Nov 16 08:00:03 [cron] (mailman) CMD (/usr/bin/python -S
> /usr/local/mailman/cron/checkdbs)
>                 - Last output repeated twice -
>                 - Last output repeated twice -
> Nov 16 09:00:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
> Nov 16 09:00:02 [cron] (mailman) CMD (/usr/bin/python -S
> /usr/local/mailman/cron/disabled)
>                 - Last output repeated twice -
> Nov 16 10:00:01 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
>                 - Last output repeated twice -
>                 - Last output repeated twice -
> Nov 16 11:00:02 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
> Nov 16 12:00:02 [cron] (root) CMD (rm -f
> /var/spool/cron/lastrun/cron.hourly)
> Nov 16 12:00:02 [cron] (mailman) CMD (/usr/bin/python -S
> /usr/local/mailman/cron/senddigests)
>
> "You had me at EHLO" --E.Webb (10.04.05)  
>
>
> --
> [hidden email] mailing list
>
>

--
[hidden email] mailing list

Reply | Threaded
Open this post in threaded view
|

Re: Vixiecron not working all the sudden

Roy Wright
Daevid Vincent wrote:

>Okay I'm beyond annoyed.
>
>Every day at around 3:00AM is when cron stops working until I reset it
>manually.
>
>What actually causes the cron.daily stuff to run?! How can I disable it
>temporarily??
>
>/etc/crontab only removes some touched files it looks like
>
>"You had me at EHLO" --E.Webb (10.04.05)  
>  
>
Here's what I understand.  You should have something like the
following in /etc/crontabs:

# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
0     *  * * *  root    rm -f /var/spool/cron/lastrun/cron.hourly
1     3  * * *  root    rm -f /var/spool/cron/lastrun/cron.daily
15    4  * * 6  root    rm -f /var/spool/cron/lastrun/cron.weekly
30    5  1 * *  root    rm -f /var/spool/cron/lastrun/cron.monthly
*/10  *  * * *  root    test -x /usr/sbin/run-crons && /usr/sbin/run-crons

The last line above is the key.

Take a look at /usr/sbin/run-crons (it's just a script).

Overly simplified, run-crons looks for touch files
(/var/spool/cron/lastrun/cron.*).
If the touch file doesn't exist, it creates it, then runs any scripts
found in the
coresponding directory (/etc/cron.*).

So, using my above crontab, let's say that 03:01 rolls around.
/var/spool/cron/lastrun/cron.daily is deleted.
Next time that run-crons is ran, it notices that
/var/spool/cron/lastrun/cron.daily
is missing, then so a new one and then looks in /etc/cron.daily and runs any
scripts it finds there.

What might be happening is one of you scripts in /etc/cron.daily is hanging.
Try running each one from the command line.

HTH,
Roy
--
[hidden email] mailing list