"unknown error making dispatchers for 'xxx': EACCES"

3,046 阅读1分钟

问题:  

  使用supervisor的时候报错"unknown error making dispatchers for 'xxx': EACCES"

原因:

  是由于在ASP.Net Core应用的守护配置文件中,配置了日志文件的路径,但是权限不足。可查看/etc/supervisor/conf.d/DataMining.conf文件

[program:DataMining]
command=dotnet AngularDemo01.dll ;
directory=/usr/publish/DataMining/netcoreapp3.1/publish/ ;
autorestart=true ;
stderr_logfile=/var/log/DataMining.err.log ;
stdout_logfile=/var/log/DataMining.out.log ;
environment=ASPNETCORE_ENVIRONMENT=Production ;
user=user ; 
stopsignal=INT

解决方案:

  修改日志文件的权限

sudo chmod 777 /var/log/DataMining.err.log
sudo chmod 777 /var/log/DataMining.out.log