supervisord

Supervisord adding multiple processes for PHP and Gearman

不问归期 提交于 2019-12-03 10:19:53
问题 I recently set up Ubuntu Natty with PHP5-FPM, Gearman, and Supervisor. I've edited my Supervisord config to run a Gearman worker. [program:gearman] command=/usr/bin/php php_gearman_worker.php numprocs=1 directory=/root/sandbox stdout_logfile=/root/sandbox/supervisord.log environment=GEARMAN_USER=gearman autostart=true autorestart=true user=gearman Here's the relevant info (showing only gearmand and php processes) when I lsof -i -P before I run supervisord: COMMAND PID USER FD TYPE DEVICE SIZE

Running PostgreSQL with Supervisord

邮差的信 提交于 2019-12-03 08:56:42
I want to run PostgreSQL 9.1 using Supervisor on Ubuntu 10.04. At the moment, I manually start PostgreSQL using the init script: /etc/init.d/postgresql start According to this post: http://nicksergeant.com/using-postgresql-with-supervisor-on-ubuntu-1010/ , I need to modify the PostgreSQL config to make it run on TCP port instead of Unix socket, in order to make PostgreSQL work with Supervisor. I have two questions regarding this approach: Considering this is more of hack, is there any implication (e.g. security/permissions, performance, etc) of doing this? Why cannot we just run the same init

How to use Django logging with gunicorn

走远了吗. 提交于 2019-12-03 06:24:15
I have a Django 1.6 site running with gunicorn, managed by supervisor. During tests and runserver I have logging on the console, but with gunicorn the statements don't show up anywhere (not even ERROR level logs). They should be in /var/log/supervisor/foo-stderr---supervisor-51QcIl.log but they're not. I have celery running on a different machine using supervisor and its debug statements show up fine in its supervisor error file. Edit: Running gunicorn in the foreground shows that none of my error messages are being logged to stderr like they are when running manage.py. This is definitely a

How to setup a group in supervisord?

巧了我就是萌 提交于 2019-12-03 05:38:07
So I'm setting up supervisord and trying to control several processes and that all works fine, now I want to setup a group so I can start/stop different sets of processes rather than all or nothing. Here's a snippet of my config file. [group:tapjoy] programs=tapjoy-game1,tapjoy-game2 [program:tapjoy-game1] command=python tapjoy_pinger.py -g game1 directory=/go/here/first redirect_stderr=true autostart=true autorestart=true stopasgroup=true killasgroup=true [program:tapjoy-game2] command=python tapjoy_pinger.py -g game2 directory=/go/here/first redirect_stderr=true autostart=true autorestart

Supervisor安装和使用

爱⌒轻易说出口 提交于 2019-12-03 04:09:20
转:https://blog.csdn.net/zou79189747/article/details/80403016 简介 supervisor是用Python开发的一个client/server服务,是Linux/Unix系统下的一个进程管理工具。可以很方便的监听、启动、停止、重启一个或多个进程。用supervisor管理的进程,当一个进程意外被杀死,supervisor监听到进程死后,会自动将它重启,很方便的做到进程自动恢复的功能,不再需要自己写shell脚本来控制。 安装 配置好yum源后,可以直接安装 yum install supervisor 配置 安装好后在/etc/会生成一个supervisord.conf文件及一个supervisord.d文件目录 supervisord.conf是一些默认配置,可自行修改: [unix_http_server] file=/tmp/supervisor.sock ;UNIX socket 文件,supervisorctl 会使用 ;chmod=0700 ;socket文件的mode,默认是0700 ;chown=nobody:nogroup ;socket文件的owner,格式:uid:gid ;[inet_http_server] ;HTTP服务器,提供web管理界面 ;port=127.0.0.1:9001

rebuild docker image from specific step

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have the below Dockerfile. FROM ubuntu:14.04 MAINTAINER Samuel Alexander <samuel@alexander.com> RUN apt-get -y install software-properties-common RUN apt-get -y update # Install Java. RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections RUN add-apt-repository -y ppa:webupd8team/java RUN apt-get -y update RUN apt-get install -y oracle-java8-installer RUN rm -rf /var/lib/apt/lists/* RUN rm -rf /var/cache/oracle-jdk8-installer # Define working directory. WORKDIR /work # Define commonly used

supervisord exiting with ENOEXEC

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to run a java process with supervisord and am getting: couldn't exec /var/application/start_tester: ENOEXEC The contents of start_tester is: java -Duser.dir=/var/application/ -cp /var/application/application.jar:/var/application/toepoke.jar com.application.Application When I run the script from the console the app runs as expected. Here is my supervisor config [program:application_tester] directory=/var/application command=/var/application/start_tester ; the program (relative uses PATH, can take args) log_stdout=true ; if true,

How to setup a group in supervisord?

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: So I'm setting up supervisord and trying to control several processes and that all works fine, now I want to setup a group so I can start/stop different sets of processes rather than all or nothing. Here's a snippet of my config file. [group:tapjoy] programs=tapjoy-game1,tapjoy-game2 [program:tapjoy-game1] command=python tapjoy_pinger.py -g game1 directory=/go/here/first redirect_stderr=true autostart=true autorestart=true stopasgroup=true killasgroup=true [program:tapjoy-game2] command=python tapjoy_pinger.py -g game2 directory=/go/here

Supervisord - using A variable INSIDE the supervisord.conf

匿名 (未验证) 提交于 2019-12-03 02:30:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Moved to using supervisod as a process control system. I have a LONG and repeating ENVIRONMENT configuration in my supervisord.conf setting a lot of environment variables for a lot of processes. I need to define it one place and reuse it, to keep the configuration DRY and maintainable. is that possible with supervisor and how? EDIT: Example of a non dry configuration [program:node-app1] command=node /home/ubuntu/server/node-app1/app.js directory=/home/ubuntu/server/node-app1 autostart=true autorestart=true stderr_logfile=/home/ubuntu

Supervisor 安装配置

谁都会走 提交于 2019-12-03 02:12:18
Supervisor的简介 Supervisor是一个客户端/服务器系统,允许其用户控制类似UNIX的操作系统上的许多进程。它可以很方便的监听、启动、停止、重启一个或多个进程。用Supervisor管理的进程,当一个进程意外被杀死,supervisort监听到进程死后,会自动将它重新拉起,很方便的做到进程自动恢复的功能,不再需要自己写shell脚本来控制 Supervisor的安装 1)安装supervisor pip install supervisor --user 2) 创建配置文件supervisord.conf (建议在root用户下进行,如果之前有机器再用,你可以偷个懒,直接把supervisord.conf文件考过来就可以) echo_supervisord_conf > supervisord.conf 心得:我在部署这一步的时候很奇怪,在root用户下无论怎样执行 pip install supervisor --user这一步,都说 supervisor不存在,具体报错忘记截图了然后我就去了admin用户下,果然,在admin用户下执行就没问题,默认生成的supervisord.conf在admin的家目录下。但是为了不会出现权限问题,我们还是在root用户下就行吧。 3)关于/etc/ supervisord.conf 的配置