Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Supervisord error "child process was not spawned"

I create bash to run python script start_queue.sh

content of start_queue.sh

python /tmp/my_python_script.py & 

It's work when I run it in terminal. But I want to manage it using supervisord since I have few django website already manage by supervisord.

But I just get the error when start

supervisor: couldn't exec /tmp/start_queue.sh: ENOEXEC
supervisor: child process was not spawned

This is how i config in supervisord

[group:scriptgroup]
programs=script_1

[program:script_1]
command=/tmp/start_queue.sh
directory=/tmp/
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/x.log
stdout_logfile_maxbytes=50MB
stdout_logfile_backups=50
stdout_capture_maxbytes=1MB
stdout_events_enabled=false
loglevel=info

It's possible to manage a backgroup process by supervisord, What did i wrong here. Please help.

like image 800
Hardy Avatar asked Sep 18 '13 10:09

Hardy


1 Answers

Add #!/bin/sh at the beginning of script.

like image 52
Shekhar Avatar answered Nov 19 '22 20:11

Shekhar