Failed to start the nohup service due to 'INFO spawnerr: unknown error creating dispatchers for' app_name ': EACCES'

I try to start the service with a supervisor, but I get an error

INFO spawnerr: unknown errors for dispatchers for 'app_name': EACCES

Here is 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 
+5
source share
3 answers

I had the same problem: celery subroutine logs were written to a subfolder of logs in my application folder, and it turned out that I set the www-user owner when I debugged the problem with Nginx. I changed the owner of the application folder back to ubuntu ( >> whoami )

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

to make it work.

+4
source

I had the same problem, I recommend doing the following

  • Add the user who starts the service. User = youruser

  • moving your journal to the supervisor directory

from:

 logfile=/tmp/supervisord.log 

in

 logfile=/var/log/supervisor/supervisord.log 

The same goes for your pid file

 pidfile=/tmp/supervisord.pid >> pidfile=/var/run/supervisor/supervisord.pid 

Make both directories

 mkdir /var/run/supervisor/ mkdir /var/log/supervisor/ 

then change the directory from

 chown youuser:youuser -R /var/log/supervisor/ 

If this does not work, check who can write log files and pid files on you.

 ls -l /var/log/supervisor/supervisord.log 

If it still does not work, try updating the supervisor

0
source

The problem is the permission for the log file. With the help of the user running the supervisor, you can create the "logs" folder in the same path of the supervisord.conf file and change:

 logfile=/tmp/supervisord.log 

to

 logfile=logs/supervisord.log 
0
source

Source: https://habr.com/ru/post/1242547/


All Articles