一、检查supervisord.conf的配置的具体项目中是否指定了用户:

[program:task]                                       #管理进程的命名
command=python test.py  -c test.conf          #执行的命令
stderr_logfile=/var/log/supervisor/test.log      #错误日志输出路径
stdout_logfile=/var/log/supervisor/test.log      #日志输出路径
directory=/root/test                    #命令执行的工作空间
autostart=true                       #自动启动
user=root                          #指定用户
autorestart=true 
如果没有,添加该用户在执行
 
二、先执行如下命令:

systemctl start supervisor
systemctl enable supervisor

在执行

supervisorctl reload

相关文章: