How to setup a group in supervisord?
You need to use a * wildcard to select all programs in a group: supervisorctl restart tapjoy:* Note: it may that your shell requires you to escape the *, usually with \*
You need to use a * wildcard to select all programs in a group: supervisorctl restart tapjoy:* Note: it may that your shell requires you to escape the *, usually with \*
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.
You should try to reload supervisord : # supervisorctl reload [y/N] ? y In many cases, this error is resolved by that reload.
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
This might be caused by another process using that port. I had the same issue and was able to solve it by listing all the processes on port :8080: $ sudo lsof -i :8080 and then killing all of them one by one by typing: $ kill {PID of the process} After that, my app … Read more
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
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
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