Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides

FAQ
It is currently Fri Dec 01, 2023 3:28 pm


System administration, processes administration, jobs, cron, resources, limits, shells, ssh, telnet.

Author Message
mandrei99
Post  Post subject: /USR/SBIN/CRON[492]: (CRON) error (grandchild #493 failed with exit status 127)  |  Posted: Mon Apr 22, 2013 9:57 am

Joined: Tue Aug 04, 2009 9:16 am
Posts: 250

Offline
 

/USR/SBIN/CRON[492]: (CRON) error (grandchild #493 failed with exit status 127)

When cron job exits with status 127, in fact it is the exit status of the shell.

http://tldp.org/LDP/abs/html/exitcodes.html

As seen below, 127 means "command not found". In my case, the cron line was faulty:
Code:
50   13   *   *   *   root (cd /root/scripts/auto-mysql-backup/ && /root/scripts/auto-mysql-backup/automysqlbackup ) >/dev/null2>&1


The cron entry in /var/log/syslog was:
Code:
Apr 22 13:47:01 hammond /USR/SBIN/CRON[493]: (root) CMD (root cd /root/scripts/auto-mysql-backup/ && /root/scripts/auto-mysql-backup/automysqlbackup >/dev/null 2>&1)
Apr 22 13:47:01 hammond /USR/SBIN/CRON[492]: (CRON) error (grandchild #493 failed with exit status 127)


The problem is that /etc/crontab does not support "user command", just "command" (my memory is dumping).

Debugging is easy. Send the output and standard error to a file and look at that file when cron runs that job.

Correct crontab entry was:
Code:
50   13   *   *   *   (cd /root/scripts/auto-mysql-backup/ && /root/scripts/auto-mysql-backup/automysqlbackup ) >/dev/null2>&1





Top
Display posts from previous:  Sort by  
E-mail friendPrint view

Topics related to - "/USR/SBIN/CRON[492]: (CRON) error (grandchild #493 failed with exit status 127)"
 Topics   Author   Replies   Views   Last post 
There are no new unread posts for this topic. Cisco SSH error - Received disconnect from <IP>: 2: Protocol error: expected packet type 61,

admin

0

4895

Tue May 05, 2015 5:06 pm

admin View the latest post

There are no new unread posts for this topic. GPG key retrieval failed: [Errno 5] OSError: [Errno 2] No such file or directory: '/etc/pki/rpm-gpg/

mandrei99

0

3422

Tue Jan 20, 2015 4:15 am

mandrei99 View the latest post

 

Who is online
Users browsing this forum: No registered users and 0 guests
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
News News Site map Site map SitemapIndex SitemapIndex RSS Feed RSS Feed Channel list Channel list


Delete all board cookies | The team | All times are UTC - 5 hours [ DST ]



phpBB SEO