SCIENTIFIC-LINUX-USERS Archives

June 2006

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Fernando M. Roxo da Motta" <[log in to unmask]>
Reply To:
Fernando M. Roxo da Motta
Date:
Tue, 13 Jun 2006 08:16:47 -0300
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
On Sat, Jun 10, 2006 at 11:13:14AM +0100, Jeremy Sanders wrote:
> Hi - We're getting random "bad interpreter" messages from cron. The job 
> itself runs every ten minutes from the the messages appear randomly, but 
> at least once daily.
> 
> # headers
> X-Cron-Env: <SHELL=/bin/sh>
> X-Cron-Env: <HOME=/root>
> X-Cron-Env: <PATH=/usr/bin:/bin>
> X-Cron-Env: <LOGNAME=root>
> X-Cron-Env: <USER=root>
> 
> # message
> /bin/sh: /data/soft3/backup/monitor_3w_raid.py: /usr/bin/python: bad 
> interpreter: No such file or directory
> 
> 
> The script is executable and uses python:
> 
> #!/usr/bin/python
> 
> # monitor 3ware raid status
> 
> This is the cron entry in root's crontab:
> 
> # run raid monitoring every ten minutes
> 0-59/10 * * * * /data/soft3/backup/monitor_3w_raid.py
> 
> Does anyone have any ideas?

  The random part is a puzzle that I have no idea how to deal with.

  If the message showed every time the script runs I woul ask if is it
possible that this script was edited in a Window$ system.  Almost every
time that I saw that message a 'dos2unix' on the script solved the
problem.

  Other possibility, if the message was a constant,  is that the script is
being executed in jail, that is in a chrooted environment, and the
interpreter is not available there.


  Roxo

-- 
---------------- Non luctari, ludare -------------------+ WYSIWYG Editor ?
Fernando M. Roxo da Motta <[log in to unmask]>               |  VI !!
Except where explicitly stated I speak on my own behalf.| I see text,
          ( Registered Linux User #39505 )              | I get text !

ATOM RSS1 RSS2