LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-08-2014, 07:28 AM   #1
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Rep: Reputation: Disabled
Cron


None of my Cron jobs are running and when I looked to see if cron was running it seems that it is not

# ps -ef |grep cron
root 3287 3214 0 May07 pts/2 00:00:00 grep cron
#

I tried to start cron and this is what I get

# /etc/init.d/crond start
Starting crond: execvp: No such file or directory
0G[;31mFAILED;39m]
#




# cat /proc/version
Linux version 2.6.9-89.ELsmp (mockbuild@hs20-bc1-2.build.redhat.com) (gcc versio
n 3.4.6 20060404 (Red Hat 3.4.6-11)) #1 SMP Mon Apr 20 10:34:33 EDT 2009
# cat /etc/*-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 8)

Last edited by T-Dub116; 05-08-2014 at 07:30 AM.
 
Old 05-08-2014, 08:10 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
You'd have to view the /etc/init.d/crond to determine where it is calling execvp and also see if this is something defined within the script.

The error is telling you it is trying to run execvp but that can't be found (either because it doesn't exist/isn't defined or because it is not in the PATH searched. Most startup scripts don't rely on user PATH to find things.

RHEL4 is extremely old and no longer supported by RedHat - you really ought to consider moving up to RHEL6 (or at least RHEL5) unless your applications don't support the newer RHEL versions. If that is the case you should consider replacing your apps because they are NOT really supported either.
 
1 members found this post helpful.
Old 05-08-2014, 08:15 AM   #3
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Original Poster
Rep: Reputation: Disabled
#! /bin/bash
#
# crond Start/Stop the cron clock daemon.
#
# chkconfig: 2345 90 60
# description: cron is a standard UNIX program that runs user-specified \
# programs at periodic scheduled times. vixie cron adds a \
# number of features to the basic UNIX cron, including better \
# security and more powerful configuration options.
# processname: crond
# config: /etc/crontab
# pidfile: /var/run/crond.pid

# Source function library.
. /etc/init.d/functions
. /etc/sysconfig/crond
t=${CRON_VALIDATE_MAILRCPTS:-UNSET}
[ "$t" != "UNSET" ] && export CRON_VALIDATE_MAILRCPTS="$t"

# See how we were called.

prog="crond"

start() {
echo -n $"Starting $prog: "
if [ -e /var/lock/subsys/crond ]; then
if [ -e /var/run/crond.pid ] && [ -e /proc/`cat /var/run/crond.pid`
]; then
echo -n $"cannot start crond: crond is already running.";
failure $"cannot start crond: crond already running.";
echo
return 1
fi
fi
daemon crond $CRONDARGS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/crond;
return $RETVAL
}

stop() {
echo -n $"Stopping $prog: "
if [ ! -e /var/lock/subsys/crond ]; then
echo -n $"cannot stop crond: crond is not running."
failure $"cannot stop crond: crond is not running."
echo
return 1;
fi
killproc crond
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/crond;
return $RETVAL
}

rhstatus() {
status crond
}

restart() {
stop
start
}

reload() {
echo -n $"Reloading cron daemon configuration: "
killproc crond -HUP
RETVAL=$?
echo
return $RETVAL
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
status)
rhstatus
;;
condrestart)
[ -f /var/lock/subsys/crond ] && restart || :
;;
*)
echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
exit 1
esac
 
Old 05-08-2014, 09:00 AM   #4
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Original Poster
Rep: Reputation: Disabled
[QUOTE=MensaWater;5166955]You'd have to view the /etc/init.d/crond



I posted /etc/init.d/crond file



# find / -name crond
/var/lock/subsys/crond
/etc/sysconfig/crond
/etc/rc.d/init.d/crond
/etc/pam.d/crond

Last edited by T-Dub116; 05-08-2014 at 09:19 AM.
 
Old 05-08-2014, 10:26 AM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
OK execvp is a C function call (type "man execvp").

The error is saying that when it runs the crond binary there is some file that is trying to open that doesn't exist.

By default crond is looking to load the files from /var/spool/cron for each user that has a crontab. Is there a /var/spool/cron/root on your system?
 
Old 05-08-2014, 10:56 AM   #6
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Original Poster
Rep: Reputation: Disabled
Is there a /var/spool/cron/root on your system?[/QUOTE]

Yes,

# l /var/spool/cron/root
-rw------- 1 root root 244 May 2 14:16 /var/spool/cron/root

In the file it has all my Cron Jobs
 
Old 05-08-2014, 11:57 AM   #7
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
Try stopping crond (service crond stop) then manually start it with "strace /usr/sbin/crond" to see if you can determine which missing file it is complaining about. Look for the "execvb" line in the strace output and if none found look for other "exec", "open" and "access" lines.

Note that this may actually succeed in starting crond so you'd have to stop it again before trying to restart with the init script.
 
Old 05-08-2014, 12:00 PM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,702

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
Looks more like the /usr/sbin/crond daemon doesn't exist.

I think you will have force a reinstall the cron package.
 
1 members found this post helpful.
Old 05-08-2014, 12:02 PM   #9
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
Looks more like the /usr/sbin/crond daemon doesn't exist.

I think you will have force a reinstall the cron package.

I was looking up on how to re-install, but i am at a loss. Can you point me in the right direction for installing Cron...
 
Old 05-08-2014, 02:08 PM   #10
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
You'd use "up2date" on RHEL4 to install or update packages. (This was replaced by yum in RHEL5 and later.)

upt2date talks to the RedHat repositories so you'd have to have a subscription with RedHat for that to work. I don't know if they're still maintaining repositories for RHEL4 though because it is end of life.

If you still have the RHEL4 install media you might be able to extract it from that.
 
Old 05-09-2014, 08:26 AM   #11
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
You'd use "up2date" on RHEL4 to install or update packages. (This was replaced by yum in RHEL5 and later.)

upt2date talks to the RedHat repositories so you'd have to have a subscription with RedHat for that to work. I don't know if they're still maintaining repositories for RHEL4 though because it is end of life.

If you still have the RHEL4 install media you might be able to extract it from that.

Having trouble with the up2date command, is there a way to up date the cron file with out using that?
 
Old 05-09-2014, 08:42 AM   #12
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
On RHEL4/RHEL5 the package name is "vixie-cron". As noted before you may be able to find that on the install CD.

You can download it from RedHat's download site at:
https://access.redhat.com/site/downloads/
Choose "Packages" there and search for the vixie-cron packcage.

Run "uname -p" first to determine if you're running x86_64, i386 (or i586 or i686). If the former make sure you get the x86_64 (which is 64 bit) package otherwise get the appropriate for the latter (which are 32 bit under IA 32).

The above requires a login to RedHat's site.
 
1 members found this post helpful.
Old 05-12-2014, 02:48 PM   #13
T-Dub116
Member
 
Registered: Aug 2013
Location: Dolyestown
Posts: 88

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by MensaWater View Post
On RHEL4/RHEL5 the package name is "vixie-cron". As noted before you may be able to find that on the install CD.

You can download it from RedHat's download site at:
https://access.redhat.com/site/downloads/
Choose "Packages" there and search for the vixie-cron packcage.

Run "uname -p" first to determine if you're running x86_64, i386 (or i586 or i686). If the former make sure you get the x86_64 (which is 64 bit) package otherwise get the appropriate for the latter (which are 32 bit under IA 32).

The above requires a login to RedHat's site.





# rpm -i -a vixie-cron-4.1-58.el4.i386.rpm
file /etc/pam.d/crond from install of vixie-cron-4.1-58.el4 conflicts with file
from package vixie-cron-4.1-57.el4
file /usr/bin/crontab from install of vixie-cron-4.1-58.el4 conflicts with file
from package vixie-cron-4.1-57.el4
file /usr/sbin/crond from install of vixie-cron-4.1-58.el4 conflicts with file f
rom package vixie-cron-4.1-57.el4

# service crond restart
Stopping crond: 0G[;31mFAILED;39m]
Starting crond: execvp: No such file or directory
0G[;31mFAILED;39m]
 
Old 05-12-2014, 03:45 PM   #14
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,702

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
First remove (rpm -e) the package vixie-cron-4.1-57.

Then install the new one.
 
1 members found this post helpful.
Old 05-13-2014, 07:24 AM   #15
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,913
Blog Entries: 14

Rep: Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142Reputation: 1142
Or try using the update (-U) flag for rpm instead of install (-i):

rpm -Uvh vixie-cron-4.1-58.el4.i386.rpm
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Cron directories: /var/spool/cron/cron.GfqqGO Woodsman Slackware 4 05-11-2011 02:37 PM
cron.hourly cron.weekly cron.monthly and 0anacron. Are they necessary? glore2002 Debian 2 09-30-2009 08:57 PM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U SUSE / openSUSE 11 01-04-2007 01:57 AM
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration