Articles of supervisord

Nginx,proxy_pass,相对上游的相对链接

我遇到了一个nginx的proxy_pass问题,并且在nginx的wiki上对HttpProxyModule文档进行了详细的介绍,但是无法弄清楚。 我有一个本地主机(127.0.0.1:9001)上运行的主pipe( http://supervisord.org/ )和nginxredirect从端口80到443的所有stream量。我希望能够进入pipe理员状态页面时我去https://mydomain/supervisor 。 我的nginx.conf文件的相关部分看起来像这样 – server { listen 80; server_name mydomain; return 301 https://$host$request_uri; } server { listen 443; server_name mydomain; # .. bunch of ssl stuff location /supervisor/ { proxy_set_header Host $host; proxy_pass http://127.0.0.1:9001/; } } 这很好,当我去https://mydomain/supervisor ,我得到supervisord状态网页。 但是,当我点击“刷新”链接(在页面上,而不是浏览器刷新)或启动/停止一个进程,然后我被发回到一个页面,如http://mydomain/?message=Process app started ,这只需要我到一个nginx的初始屏幕,而不是监督页面。 我已经在页面上检查过html源代码了,它给了我相关的链接。 所以这似乎是在我的configuration中剥离/ supervisor /,我只是不知道是什么。 谢谢,

Supervisord作为Cygwin上的Windows服务

我正尝试使用Supervisord作为Windows服务运行Celery。 我遵循Celery网站和这里的configuration 。 我已经build立了一个通过cygwin运行supervisord的虚拟环境。 我强调了我认为最重要的几行(用**)。 看来supervisord和rabbitMQ正在工作。 问题是芹菜。 我使用以下命令设置服务: $ cygrunsrv –install supervisord –path /usr/bin/python –args "/usr/bin/supervisord -n -c /usr/etc/supervisord.conf" $ supervisord 更新:我现在有我的supervisord.log文件中的以下内容: 2014-08-07 12:46:40,676 INFO exited: celery (exit status 1; not expected) 2014-08-07 12:47:07,187 INFO Increased RLIMIT_NOFILE limit to 1024 2014-08-07 12:47:07,238 INFO RPC interface 'supervisor' initialized 2014-08-07 12:47:07,251 INFO daemonizing the supervisord process 2014-08-07 […]

Supervisor中的目录设置

我正在configurationsupervisor守护进程来启动/停止Celery。 它不起作用。 在来callback试之后,我意识到问题在于它没有将工作目录更改为程序部分下的supervisord.conf的目录选项中提到的目录。 希望在芹菜有一个workdir ,但我很好奇 – directory选项的目的是什么呢? 如果你通过pipe理员运行脚本并打印pwd ,它将输出/ 。

主pipe启动/停止/重新启动不按预期行事

我正在使用主pipe来pipe理芹菜,由于偶尔需要项目需求来添加环境variables。 我将这些设置在.conf文件的supervisor [environment]部分,但只是使用 service supervisor stop service supervisor start 要么 service supervisor restart 似乎没有预期的效果,我得到错误,我的程序不“知道”新添加的环境variables是什么。 为了得到想要的结果,我不得不findpipe理员PID,然后发送一个kill信号,然后从命令行启动supervisor,如上所示。 我只是误解了这些命令,或者是我的pipe理员.conf中缺less的东西需要设置,以便它将完全停止并重新启动?

recv还没有准备好(11:资源暂时不可用))(nginx / 1.1.19,supervisorctl,gunicorn)

我有Ubuntu 12.04.5 LTS,django(supervisorctl,gunicorn)的网站。 它工作1年没有问题,但今天我的zabbix服务器发送有关警报(每3-7分钟)关于超时(1-2秒)的消息。 我为nginx运行debugging模式: 2015/08/26 06:24:09 [debug] 24236#0: *214786 http upstream temp fd: -1 2015/08/26 06:24:09 [debug] 24236#0: *214786 http output filter "/management/verify/[email protected]&app_version=4.1&warehouse=131&only_hash=0&pin_number=" 2015/08/26 06:24:09 [debug] 24236#0: *214786 http copy filter: "/management/verify/[email protected]&app_version=4.1&warehouse=131&only_hash=0&pin_number=" 2015/08/26 06:24:09 [debug] 24236#0: *214786 image filter 2015/08/26 06:24:09 [debug] 24236#0: *214786 xslt filter body 2015/08/26 06:24:09 [debug] 24236#0: *214786 http postpone […]

主pipe不用django运行gunicorn

我想在我的Django服务器上用gunicorn和Nginx运行主pipe,但是当我运行“supervisord”时,主pipe日志说: 2015-11-06 23:23:36,746 INFO daemonizing the supervisord process 2015-11-06 23:23:36,749 INFO supervisord started with pid 13766 2015-11-06 23:23:37,758 INFO spawned: 'gunicorn' with pid 13773 2015-11-06 23:23:37,767 INFO exited: gunicorn (exit status 127; not expected) 2015-11-06 23:23:38,771 INFO spawned: 'gunicorn' with pid 13774 2015-11-06 23:23:38,802 INFO exited: gunicorn (exit status 127; not expected) 2015-11-06 23:23:40,807 INFO […]

tail / dev / stderr从supervisord php cli脚本中的错误

为了简单起见,我想知道是否有可能像通道一样访问STDERR。 我不希望数据logging到一个文件,然后尾部文件,因为我想发送的信息量将填补系统。 我只关心数据,当我想挖掘什么会发送到STDERR。 我认为有可能以某种方式尾巴/ dev / stderr,但这是行不通的。 我无法使用STDOUT的原因是脚本正在监视器中运行,任何发送到STDOUT的脚本都会被logging到监视器中的program.log文件中。 而且我已经输出了一些信息。 任何想法或想法如何完成这将是真正有帮助! 谢谢

错误的PID:带软件集合Python的supervisord程序

我有一个Python服务器,必须由启用了软件集合的环境来执行。 supervisordconfiguration文件看起来像这样: [program:xxx] command=/usr/bin/scl enable rh-python35 — /myenv/bin/python server.py stdout_logfile=/var/log/xxx.log redirect_stderr=true 程序启动正常,但是supervisord认为scl进程是实际进程,但是Python服务器有不同的PID 。 SIGTERM(停止,重新启动等)的时间到了, scl进程终止,但Python服务器继续运行。 我可以让我的服务器写一个PID文件,然后使用pidproxy提供的pidproxy程序,如下所述: http://supervisord.org/subprocess.html#pidproxy-program 然后,如上所述, supervisord会发送信号到正确的PID。 但是,如果可能,我宁愿避免更改服务器代码来创buildPID文件。 问题:有没有其他的方法来设置它? 请注意,直接执行软件集合内的python可执行文件不起作用: [user@xxx gpsengine]$ /opt/rh/rh-python35/root/bin/python -V /opt/rh/rh-python35/root/bin/python: error while loading shared libraries: libpython3.5m.so.rh-python35-1.0: cannot open shared object file: No such file or directory 其他详情: Centos 7 编辑:除了涉及中间shell脚本的pidproxy还有一个额外的方法。 这个邮件列表条目描述了一个enable 脚本 (与scl enable 命令相反): https://www.redhat.com/archives/sclorg/2016-June/msg00008.html 这可以在shell脚本中使用,如下所示: exec […]

设置Django + nginx + uwsgi + supervisord:/ run中的套接字之间的区别vs / tmp

我试图使用uWSGI皇帝和nginx在同一台机器上设置2个Djangonetworking应用程序,并拥有supervisordpipe理皇帝进程的启动和重新启动。 我终于在互联网上进行了大量search之后,终于实现了一个可行的部署。 然而,在所有的拉毛活动中,我发现了一些奇怪的东西,如果有人能向我解释为什么会这样,我会很感激。 所以我以root身份在皇帝模式下运行我的uWSGI进程。 vassal iniconfiguration文件负责将权限下放到我的uid,并创build一个由我的用户拥有的套接字文件,作为www-data(以便nginx可以写入它)和权限660.下面是一个示例vassalconfiguration: [uwsgi] uid = xxxx chdir = %(project_dir)/%(project) home = %(venv_base)/%(venv) module = %(project).wsgi:application master = true processes = 4 socket = /tmp/%(project).sock chown-socket = %(uid):www-data chmod-socket = 660 stats = /tmp/%(project)_stat.sock logto = %(project_dir)/logs/uwsgi.log # Cleans up when the process is killed (includes deleting the socket file) vacuum = […]

不能使用Apache Kafka的pipe理员

我有安装Apache Kafka的Ubuntu 16.04机器。 目前,我可以通过使用带有以下内容的start_kafka.sh脚本完美地工作: JMX_PORT=17264 KAFKA_HEAP_OPTS="-Xms1024M -Xmx3072M" /home/kafka/kafka_2.11-0.10.1.0/bin/kafka-server-start.sh -daemon /home/kafka/kafka_2.11-0.10.1.0/config/server.properties 现在,我想用supervisor自动重新启动进程,如果它失败,重新启动机器后立即启动。 问题是我不能让supervisor开始卡夫卡。 我使用pip安装了supervisor程序,并将此configuration文件放在/etc/supervisord.conf : ; Supervisor config file. ; ; For more information on the config file, please see: ; http://supervisord.org/configuration.html [unix_http_server] file=/tmp/supervisor.sock ; (the path to the socket file) [supervisord] logfile=/tmp/supervisord.log ; (main log file;default $CWD/supervisord.log) logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default […]