Articles of supervisord

主pipe不启动:不能chdir … EACCES

我正在build立一个ec2服务器,用ngnix和gunicorn来运行一个django项目。 服务器正在运行Amazon Linux。 当我从命令行运行启动gunicorn命令,它启动服务器,但是当我尝试从pipe理员运行它,我得到以下错误: supervisor: couldn't chdir to /home/ec2-user/virtualenvs/wakeup-site/django-site: EACCES supervisor: child process was not spawned 当我以sudo身份运行supervisor或者以我自己的用户身份运行时会发生这种情况 目录权限:/ home / ec2-user / virtualenvs / wakeup-site / django-site drwxrwxrwx 15 ec2-user ec2-user 4096 Mar 6 08:21 django-site 相关的Supervisor.conf文件: [program:wakeup] command=./start_gunicorn.bash directory="/home/ec2-user/virtualenvs/wakeup-site/django-site" user=ec2-user autostart=true autorestart=true stdout_logfile=/home/ec2-user/virtualenvs/wakeup-site/django-site/logs/supervisorconf.log stderr_logfile=/home/ec2-user/virtualenvs/wakeup-site/django-site/logs/gunicorn_stderr.log start_gunicorn.bash: #!/bin/bash # Starts the Gunicorn server set -e # […]

nginx代理传递给supervisord

我正在尝试在http://example.com/supervisor上提供supervisord网页界面 尝试了好几个小时后,我用正斜杠( http://example.com/supervisor/ )正确工作。 我得到它显示没有太斜杠,但没有图像/ CSS等的作品。 我是nginx的新手,所以我猜我的重写规则有些问题。 第一次重写是我试图添加一个结尾的斜杠。 supervisord.conf [unix_http_server] file = /tmp/supervisor.sock ; (the path to the socket file) chmod=0700 ; socket file mode (default 0700) nginx.conf location ~* ^/supervisor/? { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_x_host; proxy_set_header X-NginX-Proxy true; rewrite ^(.*[^/])$ $1/; rewrite /supervisor/(.*) /$1 break; proxy_pass http://unix:/tmp/supervisor.sock:; proxy_redirect off; […]

改变python运行时最大recursion限制

我正试图在Ubuntu的ec2服务器上安装supervisord。 在运行easy_install时,出现以下错误: > easy_install supervisor … RuntimeError: maximum recursion depth exceeded 我知道如何使用sys.setrecursionlimit()来更改python脚本中的最大recursion深度,但是如何将其更改为运行时环境?

python中有没有和php5-cgi等价的东西?

nginx不允许直接执行外部程序,所以为了运行CGI,你需要运行一个独立的fcgi后端并用fastcgi_pass指令连接它。 对于PHP很容易,例如使用spawn-fcgi和php5-cgi ,但我还没有发现任何类似的Python。 我知道有特定的应用程序和框架的fcgi实现,但是,有没有什么可以运行普通的Python CGI(用通用的CGI模块实现的CGI)呢?

微EC2实例之后,即使有pipe理员,Node应用程序也会崩溃

我正在使用主pipe在微EC2实例上启动我的node.js应用程序。 但是,该应用只能保持运行一段时间,直到最终closures。 不完全确定该应用程序运行多久,但我猜大约几个小时左右。 有时less一些。 我的问题是,我应该在远程服务器上的位置来debugging这种问题? 我正在运行亚马逊Linux AMI。

NodeJS Supervisord Hashlib

我的NodeJS应用程序有问题。 问题是包含的库Hashlib我已经遵循了超过10次的安装说明。 得到回购的克隆,做和做安装。 NodeJS安装在默认path中,这是一个棘手的问题: 当我启动节点app.js它的作品,完美。 当我configuration我的Supervisord运行相同的用户,具有相同的configuration文件,我在其他系统工作,我得到的NodeJS找不到hashlib时,问题开始。 module.js:337 throw new Error("Cannot find module '" + request + "'"); ^ Error: Cannot find module 'hashlib' 我疯了,我能做什么? 为什么我的用户从控制台启动节点效果很好,但不是supervisord? 谢谢!

如何在USR2滚动重启之后遵循新的独angular兽stream程进行supervisord?

我configuration了supervisord来跟踪我的独angular兽服务器进程。 当我发送USR2进程时,执行滚动重启。 在这个操作之后,旧的独angular兽主人已经重新启动,然后改变PID。 这导致主pipe失去了独angular兽进程的踪迹,认为它是EXITED。 在这个操作之后,我怎么能有supervisord跟随新的独angular兽进程? 独angular兽有一个PID文件可用,但我还没有findsupervisordconfiguration这个选项。 另外一个select是让supervisord发送自己的USR2信号,但我不知道如何执行这个操作,以及是否会阻止我的问题发生。

使用tmuxpipe理多个下载程序作为supervisorctl服务?

我有很多数据服务器,我需要通过http下载数据,一旦可用。 对于每个服务器,我都会启动一个bash “ while true ”循环,并在其中使用wget来轮询服务器以获取新数据。 为了启动所有的bash我创build了一个tmuxconfiguration,为每个循环(例如循环和wget启动一个窗口。 这增加了更容易检查正在发生的事情的好处。 我想从这个configuration创build一个supervisor -service,这将允许我一次启动,停止和重新启动这个tmux并下载它的客户端。 但是,当我退出tmux ,由于tmux的本质, bash和wget继续运行。 有没有办法,所以我可以退出一切,并重新启动一切简单supvervisorctl tmuxservice restart ?

init启动监督失败

我在我的debian 7安装中使用pip安装了主pipe。 然后我抓住这个文件,并把它移到这里: /etc/init.d/supervisord https://github.com/Supervisor/initscripts/blob/master/debian-norrgard 然后我跑了: chmod +x /etc/init.d/supervisord update-rc.d supervisord defaults 但是,当我运行命令supervisord时,程序启动正常,但是当我运行: service supervisord start 我没有任何错误或消息,但主pipe并不真正开始。 我怎样才能找出发生了什么,为什么不是开始?

主pipe默默无法启动/重新启动(日志中没有任何内容)

我有一个相当基本的主pipeconfiguration: [program:drape] process_name=%(program_name)s_%(process_num)02d command=python /home/ubuntu/drape/workers/drape.py numprocs=1 autostart=true autorestart=true nocleanup=true stdout_logfile=/home/ubuntu/supervisord.out.log stdout_logfile_maxbytes=32MB stderr_logfile=/home/ubuntu/supervisord.err.log stderr_logfile_maxbytes=32MB startsecs=180 我不认为这个configuration实际上很重要,但无论如何张贴。 我正在使用库存pipe理员全局configuration。 我通过标准的sudo apt-get -y install supervisor来sudo apt-get -y install supervisor …只是为了确保: $ sudo apt-get -y install supervisor Reading package lists… Done Building dependency tree Reading state information… Done supervisor is already the newest version. 0 upgraded, 0 newly installed, 0 […]