Subject: | |
From: | |
Reply To: | |
Date: | Tue, 13 Jun 2006 12:20:23 +0100 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Fernando M. Roxo da Motta wrote:
> 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.
Is /usr/bin/python local to the machine i.e. could a possible network
problem be making it unavailable somehow? Disk problems?
--
Mark Whidby
Faculty of Engineering and Physical Sciences
|
|
|