我正在尝试在EC2 Amazon Linux Ami实例上配置主管。我使用sudo easy_install supervisor安装了supervisor,并将其配置文件放在/etc/supervisor.conf中。目前该文件如下所示:
[unix_http_server]
file=/tmp/supervisor.sock
chmod=2775
chown=supervisor:my_app
umask=022
;[inet_http_server] ; inet (TCP) server disabled by default
;port=127.0.0.1:9001 ; (ip_address:port specifier, *:port for all iface)
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
[supervisord]
logfile=/var/log/supervisor/supervisord.log
logfile_maxbytes=50MB
logfile_backups=10
loglevel=info
pidfile=/var/run/supervisor/supervisord.pid
nodaemon=false
minfds=1024
minprocs=200
user=supervisor
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock
;serverurl=http://127.0.0.1:9001
;username=chris
;password=123
;prompt=mysupervisor
;history_file=~/.sc_history
[program:celeryd]
command=/srv/my_app/venv/bin/python /srv/my_app/manage.py celeryd --verbosity=2 --loglevel=INFO
directory=/srv/my_app
user=celeryd
numprocs=1
autostart=true
startsecs=10
startretries=3
autorestart=true
stopwaitsecs=600
stopasgroup=true
killasgroup=true
priority=998
stdout_logfile=/var/log/celery/celery-worker.log
stderr_logfile=/var/log/celery/celery-worker.log
[program:celerybeat]
command=/srv/my_app/venv/bin/celery -A my_app beat
directory=/srv/my_app
user=celerybeat
numprocs=1
autostart=true
startsecs=10
startretries=3
autorestart=true
stopwaitsecs=600
stopasgroup=true
killasgroup=true
priority=998
stdout_logfile=/var/log/celery/celery-beat.log
stderr_logfile=/var/log/celery/celery-beat.log
[program:django]
command=/srv/my_app/venv/bin/python /srv/my_app/manage.py runserver
directory=/srv/my_app
user=my_app
numprocs=1
autostart=true
startsecs=10
startretries=3
autorestart=true
stopwaitsecs=600
stopasgroup=true
killasgroup=true
priority=998
stdout_logfile=/var/log/my_app/django-server.log
stderr_logfile=/var/log/my_app/django-server.log
[group:my_app]
programs=celeryd,celerybeat,django
priority=999
我通过运行来启动主管:
sudo supervisord -c /etc/supervisor.conf
该过程启动正常,但我收到以下错误:
2016-06-14 11:35:33,170 INFO spawnerr: unknown error making dispatchers for 'celeryd': EACCES
2016-06-14 11:35:33,170 INFO spawnerr: unknown error making dispatchers for 'celerybeat': EACCES
2016-06-14 11:35:33,171 INFO spawnerr: unknown error making dispatchers for 'django': EACCES
我的所有日志目录都已创建,我在网上找到的其他资源很少,无法解决此问题。