【.netcore学习】.netcore添加到 supervisor 守护进程自启动报错
配置 supervisor
[program:HelloWebApp] command=dotnet run directory=/home/python/dotnet/myweb/mywebapi environment=ASPNETCORE__ENVIRONMENT=Production user=root stopsignal=INT autostart=true autorestart=true startsecs=1 stderr_logfile=/var/log/HelloWebApp.err.log stdout_logfile=/var/log/HelloWebApp.out.log
启动 supervisor 的时候
报错log如下:
python@ubuntu:~/dotnet/myweb/mywebapi$ sudo service supervisor stop python@ubuntu:~/dotnet/myweb/mywebapi$ sudo service supervisor start python@ubuntu:~/dotnet/myweb/mywebapi$ cat /var/log/HelloWebApp.err.log System.ArgumentNullException: Value cannot be null. Parameter name: path1 at System.IO.Path.Combine(String path1, String path2) at Microsoft.DotNet.Configurer.CliFallbackFolderPathCalculator.get_DotnetUserProfileFolderPath() at Microsoft.DotNet.Configurer.FirstTimeUseNoticeSentinel..ctor(CliFallbackFolderPathCalculator cliFallbackFolderPathCalculator) at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient) at Microsoft.DotNet.Cli.Program.Main(String[] args) System.ArgumentNullException: Value cannot be null. Parameter name: path1 at System.IO.Path.Combine(String path1, String path2) at Microsoft.DotNet.Configurer.CliFallbackFolderPathCalculator.get_DotnetUserProfileFolderPath() at Microsoft.DotNet.Configurer.FirstTimeUseNoticeSentinel..ctor(CliFallbackFolderPathCalculator cliFallbackFolderPathCalculator) at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient) at Microsoft.DotNet.Cli.Program.Main(String[] args)
尚未查到原因
安装必须用root用户,否则有权限问题
所以此贴作废,我后面会新写一个新博客说明
新整理的博文如下
【netcore基础】ubuntu 16.04 搭建.net core 2.1 linux 运行环境 nginx反向代理 supervisor配置自启动