Unable to start service with nohup due to 'INFO spawnerr: unknown error making dispatchers for 'app_name': EACCES'

user4414636 picture user4414636 · Feb 8, 2016 · Viewed 12.6k times · Source

I'm trying to start a service with supervisor, but I get an error saying

INFO spawnerr: unknown error making dispatchers for 'app_name': EACCES

Here's my supervisord.conf file:

[supervisord]
logfile=/tmp/supervisord.log
logfile_maxbytes=50MB   ; change these depending on how many logs
logfile_backups=10      ; you want to keep
loglevel=info
pidfile=/tmp/supervisord.pid
nodaemon=true
minfds=1024
minprocs=200

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock  socket

[program:myscript]
command= python -u /home/ubuntu/appfolder/app_name.py
autostart=true
autorestart=unexpected 
redirect_stderr=true
stdout_logfile=/var/log/app_name.log

Answer

Shankar ARUL picture Shankar ARUL · Mar 24, 2016

I had the same issue - the celery sub program logs were being written in the logs subfolder under my app folder and turns out I had set the owner to www-user while I was debugging an issue with Nginx. I changed the owner of the app folder back to ubuntu (>> whoami)

sudo chown -R ubuntu:ubuntu /var/www/myapp/

to get it to work.