supervisord exiting with ENOEXEC

Your file needs to be executable. So either: You should chmod +x it to set the executable bit. Put a shebang at the start of the file. Not having this is what caused the ENOEXEC. or Modify your config file to something like command=sh /var/application/start_tester.

supervisord logs don’t show my output

Python output is buffered. Setting the environment variable PYTHONUNBUFFERED=1 in you supervisord.conf will disable buffering and show log messages sooner: [program:x] environment = PYTHONUNBUFFERED=1 or add the -u command-line switch to python command: [program:x] command = python -u file.py Alternatively you can flush the sys.stdout handler explicitly: sys.stdout.flush() On python 3.3 and up, you can … Read more

What is the advantage of using supervisord over monit?

I haven’t used monit but there are some significant flaws with supervisord. Programs should run in the foreground This means you can’t just execute /etc/init.d/apache2 start. Most times you can just write a one liner e.g. “source /etc/apache2/envvars && exec /usr/sbin/apache2 -DFOREGROUND” but sometimes you need your own wrapper script. The problem with wrapper scripts … Read more

python supervisord program dependency

supervisord does not directly support dependencies. Your options instead are: Use priorities. Set priority for A to a low value and it’ll be started before B, and shut down after B. The default value for priority is 999. If you put the two programs into one group as well, that’d let you start and stop … Read more

How to use environment variables with supervisor, gunicorn and django (1.6)

OK, I guess I got it. I had tried including environment=SECRET_KEY=”secret_key_with_non_alphanumeric_chars” in the conf file for supervisor but it didn’t like the non alphanumeric chars and I didn’t want to have my key in the conf file as I have it in git. After loking at supervisor’s docs I had also tried with: HOME=”/home/django”, USER=”django” … Read more