Tag Info

Hot answers tagged

33

The correct answer is that supervisor requires you to re-read and update when you place a new configuration file. Restarting is not the answer, as that will affect other services. Try: supervisorctl reread supervisorctl update


25

There is a plugin called superlance. You install it with "easy_install superlance" or download it at: http://pypi.python.org/pypi/superlance The next thing you do is you go into your supervisord.conf and add the following lines: [eventlistener:crashmail] command=/usr/local/bin/crashmail -a -m email1@example.com events=PROCESS_STATE This should be ...


13

I created an upstart script for ubuntu 9.10 For example I installed supervisor into a virtual environment, then start and control supervisor from upstart. create a text file /etc/init/supervisord.conf the contents are: description "supervisord" start on runlevel [345] stop on runlevel [!345] expect fork respawn exec ...


13

You could use sudo in place of your custom script to accomplish the same thing. That is, given the default supervisord configuration, in which only root can run supervisorctl, you could put an entry like this into /etc/sudoers: alice ALL = (root) NOPASSWD:/usr/bin/supervisorctl restart app1 bob ALL = (root) NOPASSWD:/usr/bin/supervisorctl restart app2 ...


12

This is what I use on RHEL 5.4 and CentOS 5.5 I'm not sure wether it's depending on some configuration settings in my supervisord.conf. But it seems to work OK. You need to run the following command after installing it chkconfig --add supervisord [/etc/rc.d/init.d/supervisord] #!/bin/sh # # /etc/rc.d/init.d/supervisord # # Supervisor is a client/server ...


11

Reloading the master supervisor process may work, but it will have unintended side effects if you have more than one process being monitored by supervisor. The correct way to do it is to issue supervisorctl reread which causes it to scan configuration files for any changes: root@debian:~# supervisorctl reread gunicorn: changed Then, simply reload that ...


11

I had the same issue, a sudo service supervisord reload did the trick, though I don't know if that is the answer to your question.


6

Cron periodically calling a shell script to ensure a service is running is actually a pretty decent entry-level method for service monitoring on simple networks. Cron can check once per minute, so that may be good enough for the demands of your environment if downtimes of < 60 seconds is acceptable. It's easy to set up and use. Supervisor, on the other ...


5

There is a Debian/Ubuntu script in official Supervisor GitHub repo: https://github.com/Supervisor/initscripts/blob/master/debian-norrgard


5

I'd use lsof to find out what process is listening on those ports. lsof -i tcp | grep LISTEN Once you've worked out what process it is, that's half the battle.


5

If gunicorn_django is daemonizing itself, it's not the kind of program supervisor is designed to manage. Supervisor expects its supervised programs to run in the foreground so it can monitor if they've exited. See supervisord docs.


5

I've just stumbled across the same issue, so I'll leave the reasons it happened to me. We had supervisor installed into the global path (not a virtualenv) using pip, which meant we were running the latest version. However, this is undesirable from a server maintenance point of view, so we switched the older version in Apt. pip uninstall doesn't clear up ...


5

http://supervisord.org/configuration.html#program-x-section-settings says "Values containing non-alphanumeric characters should be placed in quotes"


5

The --config option must be specified before the sentry subcommand, like so: sentry --config=/somedir/sentry.conf.py start ....


5

That's the whole idea, to use systemd (or upstart etc) inside a container. Docker is used most of the time to run a single service per container, so for a complex site you would need a container for the web server and another one for the database server. With a process manager you could run both in the same container. Which approach is better is ...


4

If you installed supervisord from the port sysutils/py-supervisor then this rc file is already present... (than to voretaq7 for pointing this out). The basic framework of a rc file is: #!/bin/sh . /etc/rc.subr name="supervisord" rcvar=`set_rcvar` load_rc_config "$name" command="/usr/local/bin/${name}" command_args="" run_rc_command "$1" Creating the ...


4

I tracked this one down with the help of davisp, a gunicorn developer. Thank you ! It was an environnement issue, caused by an invalid HOME setting in the environnement of the supervisor gunicorn subprocess. I did not get anything on stderr until I put an "import psycopg2" in my settings.py file, which produced the following message on supervisor's stderr ...


4

Take a look at unix-http-server section. Change your configuration file as belows: [unix_http_server] file=/tmp/supervisor.sock ; (the path to the socket file) chmod=0770 ; sockef file mode (default 0700) chown=zope:zoperun ; socket file uid:gid owner ;username=user ; (default is no username (open server)) ...


4

Honestly, the workers_per_application is more of a performance tweak to ensure your application can consume 100% of the CPU at any time. It does not mean that it will. You can configure all of your applications to have 9 workers... as long as you keep in mind that there is a potential that one application could be working on something very difficult which ...


4

This question isn't really on topic here, but ill throw you a bone before it gets closed. I assume by ESX you mean ESXi or the vSphere suite of products. ESX is end of life. I recommend that you visit technet and VMWare online training as a start. Then pick up some books or have your employer send you to training. I recommend Mastering VMWare vSphere 5 ...


4

Try creating the log files and using chown to change the ownership to the appropriate user. If possible change the log location to a subdirectory owned by the appropriate user. I use logrotate to rotate logs periodically. It can handle permissions when rotating logs.


4

You shouldn't be running your gunicorn server as root, just think if someone found an exploit in your code can do anything to the server. Put the pidfile in /tmp or /var/tmp and run as a non privileged user.


3

I found this was pretty confusing until I discovered emperor mode. This means you can do one supervisord instance to manage all of your configs: [program:uwsgi] command=/usr/local/bin/uwsgi --emperor /etc/uwsgi/apps-enabled stopsignal=QUIT autostart=true autorestart=true redirect_stderr=true And then you'd pop any config files (ini, xml, yaml) for apps ...


3

It sounds to me like what your actually looking for is closer to cron. I'm not familiar with supervisor but from the description provided here, it sounds it is trying to be a userspace replacement for certain aspects of init. By this I mean that it focuses in providing: start/stop/restart of services(programs) Automatic program crash detection and restart ...


3

This feature has been added to Supervisor recently environment=PATH="/home/site/environments/master/bin:%(ENV_PATH)s" https://github.com/Supervisor/supervisor/blob/master/supervisor/skel/sample.conf#L8 See also https://stackoverflow.com/questions/12900402/supervisor-and-environment-variables


3

From the supervisord man page: -n, --nodaemon Run supervisord in the foreground.


3

I figured it out. I didn't have the supervisord section in the config file. When it said .ini file, it threw me off.


3

Have you installed supervisord yet? If not, it would be a good idea to create a virtual environment and then install into that. With a virtual environment, it doesn't matter so much where you put tools (especially when you are trying them out) and you don't get piles of conflicting libraries all installed in the same place. If you haven't installed anything ...



Only top voted, non community-wiki answers of a minimum length are eligible