Hardy
Hardy

Reputation: 1539

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.

Upvotes: 14

Views: 21332

Answers (2)

PersianGulf
PersianGulf

Reputation: 2935

You need to execute your shell script spawned. Spawn means when you kill it, it doesn't kill unless a set of cicumstances to be.

notes: supervisor is a python module that control proocessing. For more see this.

Upvotes: 0

Shekhar
Shekhar

Reputation: 7235

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

Upvotes: 35

Related Questions