Articles of supervisord

FreeBSD:在其他服务之前启动PostgreSQL

我在FreeBSD上运行一个使用PostgreSQL,Nginx和UWSGI的python应用程序。 UWSGI我与SupervisorD一起pipe理。 我的/etc/rc.conf如下所示: … postgresql_enable="YES" nginx_enable="YES" supervisord_enable="YES" SupervisorD启动了几个不同的UWSGI进程,但是他们的configuration文件几乎看起来像这样: [program:uwsgi] command=/usr/local/bin/uwsgi –ini /opt/site/uwsgi/site.ini autostart=True autorestart=True user=example stopsignal=INT redirect_stderr=True stdout_logfile=/opt/site/log/uwsgi.log stdout_logfile_maxbyte=5MB stdout_logfile_backups=10 priority=300 一切正常开始。 然而,我遇到了一个问题,当服务器重新启动时,SupervisorD在PostgreSQL启动完成之前启动了UWSGI,这导致了一个错误。 有没有一种方法可以确保我的UWSGI进程在PostgreSQL完全启动之前不会启动? 如果更容易忽略UWSGI,并告诉FreeBSD甚至在PostgreSQL准备好之前不要启动SupervisorD,那么我很好。 或者我应该以某种方式开始用SupervisorDpipe理PostgreSQL,并处理所有内容?

当Supervisord运行时,Gearman不工作

我在一个专门的工作服务器(Ubuntu 12.04)上为我的PHP项目(使用pecl / gearman作为PHP的障碍)testingGearman。 手动这工作得很好:启动客户端,添加作业,并运行一个或多个工作在不同的shell按预期工作。 现在我想使用Supervisord来运行这些工人,但是这会在Gearman日志中产生很多以下错误: WARNING [ 4 ] lost connection to client recv(peer has closed connection) 127.0.0.1:37126 -> libgearman-server/io.cc:608 ERROR [ 4 ] Failed while in _connection_read() -> libgearman-server/io.cc:489 主pipeconf是默认的,我刚刚添加了一个程序: [program:migration] command=/path/to/script process_name=%(program_name)s_%(process_num)02d numprocs=10 stdout_logfile=/var/log/gearman.log stderr_logfile=/var/log/gearman-error.log stdout_logfile_maxbytes=1MB environment=GEARMAN_USER=gearman autostart=true autorestart=true user=gearman stopsignal=KILL Gearman进程信息: gearman 9802 0.0 0.0 476116 1780 ? Ssl 12:18 0:00 […]

Jenkins可以和监督员一起监督吗?

我在Ubuntu EC2微型实例上运行Jenkins CI(这是唯一运行的)。 每隔一段时间,OOM杀手罢工,这是一个真正的痛苦(我已经configurationjenkins内存使用率到最低限度)。 我可以使用主pipe(或类似的?)再次旋转jenkins? 如果是这样,主piperun脚本会是什么样子?

Django,uWSGI和Supervisordconfiguration

好吧我有Django,nginx和uWSGI设置在我的服务器上…问题是我通过这个命令手动启动uWSGI: uwsgi -s /home/user/sites/sock/uwsgi.sock -t 10 -M -p 1 -C -pythonpath / home / user / sites / -w mysite.django_wsgi 而且工作很好。 我想要做的事情是使用supervisord来控制uWSGI进程(启动,停止等)。 我将如何做到这一点,supervisordconfiguration是什么样子?

用stream程pipe理器而不是init.d来pipe理程序是否有好处?

我使用Redis,Memcached和Nginx作为特定的,Supervisor作为进程pipe理器,但任何常规信息也是有帮助的。 上述安装apt-get程序都带有/etc/init.d/脚本。 是否提供了init.d脚本来为新手提供方便的设置,并且删除那些init.d脚本和使用像Supervisor这样的pipe理每个程序是有显着的好处的,这些可能不会通过使用init.d来获得init.d脚本?

允许组的所有用户使用supervisorctl启动和停止zope

我只是在最近的安全build议之后,对Zope的运行方式进行了一些修改。 它在咨询中说: “确保Zope / Plone服务以最低权限运行。 理想情况下,Zope和ZEO服务应该只能写入日志和数据目录。“ 目前,我们有一个专门的Linux用户,它运行buildout,启动和停止服务器,并运行Zope服务。 我们使用supervisord来pipe理我们并行运行的两个Zope实例(relstorage backend)。 我们目前的zope用户不仅需要在日志和数据目录上写权限,以便它可以运行构build,所以我select创build一个额外的linux用户zoperun来实际运行zope服务。 zoperun和zope在同一个组中,只对var目录有写权限。 这一切都工作正常,除了一件事情:我想要原来的Zope用户能够使用supervisorctl启动和停止zope实例。 我无法得到这个工作。 例如,当我尝试运行bin/supervisorctl status我得到了 错误:,[错误13]权限被拒绝:文件:行:1 我想这是因为pipe理员套接字没有组读写权限 srw ——- 1 zoperun zopeour 0 Sep 30 09:00 supervisor.sock 我已经在supervisordconfiguration中设置了umask = 002 ,但是这对superctl套接字没有影响。 有什么办法可以达到我想要的吗?

服务器重启后无法通过Supervisor启动Gunicorn

我有一个使用Nginx和Gunicorn的Django应用程序“djngxgun”。 我只是安装了主pipe,以便我可以使用它来pipe理我的Gunicorn进程。 问题是Supervisor在重新启动服务器后没有启动Gunicorn。 当我通过Supervisor启动Gunicorn(“sudo supervisorctl start djngxgun”)时,我看到在我的Gunicorn error.log文件中重复出现以下错误: 2014-02-28 15:36:47 [4753] [INFO] Starting gunicorn 18.0 Traceback (most recent call last): File "/home/djngxgun/venv/djngxgun/bin/gunicorn", line 9, in <module> load_entry_point('gunicorn==18.0', 'console_scripts', 'gunicorn')() File "/home/djngxgun/venv/djngxgun/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 71, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/home/djngxgun/venv/djngxgun/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 143, in run Arbiter(self).run() File "/home/djngxgun/venv/djngxgun/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 172, in run self.start() File "/home/djngxgun/venv/djngxgun/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line […]

如何获得supervisord使用用户的rbenv环境?

我有守护进程拥有,我想有系统pipe理员pipe理。 守护进程有自己的用户,并在ruby中完成,它是自己的rbenv环境。 守护进程的supervisord conf: [program:hooks] command=/home/hooks/bin/run.sh user=hooks environment=HOME='/home/hooks',USER=hooks,PATH='/home/hooks/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' /home/hooks/bin/run.sh看起来像: #!/bin/bash -e rbenv init – cd /home/carehooks/src/ bundle install thin –timeout 0 –environment 'production' –rackup `pwd`/config.ru –chdir examples/ start 现在,结果是: # supervisorctl start hooks hooks: ERROR (abnormal termination) # cat /var/log/supervisor/hooks-stderr—supervisor-e2Myrz.log /bin/readlink: missing operand Try `/bin/readlink –help' for more information. /home/hooks/bin/run.sh: line 6: bundle: command not […]

如何从一个Web界面pipe理多个supervisord?

我的生产环境中有4台服务器,在这些服务器上,我有supervisord来监视和pipe理进程。 有没有办法从一个supervisorctl网页界面pipe理多个supervisord? 谢谢

Supervisord无法closuresfcgi进程

我设法在我的django项目上设置了fastcgi,问题是当我让mi程序停止时,服务器继续以某种方式运行,并且我的页面保持在线。 这是我的supervisord程序指令: [program:helloworld] command=/var/www/django-projects/helloworld/run 这是我的“运行”脚本: #!/bin/bash source /var/www/django-projects/helloworld/venv/bin/activate; /var/www/django-projects/helloworld/manage.py runfcgi \ daemonize=false \ host=127.0.0.1 \ port=8000; 所有我想要的是一个方法来停止/启动/使用supervisord重新启动这个django项目,希望你能帮助我。