Asp.net core 使用supervisor control更改Asp.Net core 3.1应用程序的Kestrel端口号:错误(文件不可执行)

Asp.net core 使用supervisor control更改Asp.Net core 3.1应用程序的Kestrel端口号:错误(文件不可执行),asp.net-core,supervisord,Asp.net Core,Supervisord,解决方案: 比较旧的(VS更新之前)和新编译的应用程序后,未发现Pirkimai可执行文件。在发布目录中 [admin@WEBCORE publish]$ chmod u+x Pirkimai 修改/etc/nginx/conf.d/pirkimai.conf ... proxy_pass https://localhost:5101; ... 问题: 我有一个默认端口号为Asp.Net core 3.1 mvc应用程序的测试服务器。它起作用了 现在修改Program.cs中的端口

解决方案:

比较旧的(VS更新之前)和新编译的应用程序后,未发现Pirkimai可执行文件。在发布目录中

[admin@WEBCORE publish]$ chmod u+x Pirkimai
修改/etc/nginx/conf.d/pirkimai.conf

...
proxy_pass https://localhost:5101;
...
问题:

我有一个默认端口号为Asp.Net core 3.1 mvc应用程序的测试服务器。它起作用了

现在修改Program.cs中的端口

    public static IHostBuilder CreateHostBuilder(string[] args) =>
        Host.CreateDefaultBuilder(args)
            .ConfigureWebHostDefaults(webBuilder => {
                webBuilder.UseStartup<Startup>();
            **webBuilder.UseUrls("http://localhost:5100", "https://localhost:5101");**
            });
在linux server cd中发布目录并运行dotnet

[admin@WEBCORE publish]$ dotnet Pirkimai.dll
info: Microsoft.Hosting.Lifetime[0]
      Now listening on: http://localhost:5100
info: Microsoft.Hosting.Lifetime[0]
      Now listening on: https://localhost:5101
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /home/admin/Pirkimai/bin/Release/netcoreapp3.1/publish
Firefox localhost:5100重定向到并像以前一样显示内容正常。重新启动管理器

[root@WEBCORE supervisord.d]# supervisorctl restart all
Pirkimai: **ERROR (file is not executable)**
现在红隼不像以前那样开始了/var/log/supervisor/supervisor.log

...
2020-03-05 09:11:48,976 WARN received SIGTERM indicating exit request
2020-03-05 09:12:08,913 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2020-03-05 09:12:08,915 INFO Included extra file "/etc/supervisord.d/Pirkimai.ini" during parsing
2020-03-05 09:12:08,955 INFO RPC interface 'supervisor' initialized
2020-03-05 09:12:08,955 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-03-05 09:12:08,963 INFO daemonizing the supervisord process
2020-03-05 09:12:08,970 INFO supervisord started with pid 974
2020-03-05 09:12:09,985 INFO spawnerr: command at '/home/admin/Pirkimai/bin/Release/netcoreapp3.1/publish/Pirkimai' is not executable
2020-03-05 09:12:10,986 INFO spawnerr: command at '/home/admin/Pirkimai/bin/Release/netcoreapp3.1/publish/Pirkimai' is not executable
2020-03-05 09:12:12,998 INFO spawnerr: command at '/home/admin/Pirkimai/bin/Release/netcoreapp3.1/publish/Pirkimai' is not executable
2020-03-05 09:12:16,016 INFO spawnerr: command at '/home/admin/Pirkimai/bin/Release/netcoreapp3.1/publish/Pirkimai' is not executable
2020-03-05 09:12:16,016 INFO gave up: Pirkimai entered FATAL state, too many start retries too quickly
My/etc/supervisord.d/Pirkimai.ini

[program:Pirkimai]
command=/home/admin/Pirkimai/bin/Release/netcoreapp3.1/publish/Pirkimai
directory=/home/admin/Pirkimai/bin/Release/netcoreapp3.1/publish/
environment=HOME="/home/admin",ASPNETCORE__ENVIRONMENT="Production"
user=admin
stopsignal=INT
autostart=true
autorestart=true
startsecs=1
stderr_logfile=/var/log/supervisor/Pirkimai.err.log
stdout_logfile=/var/log/supervisor/Pirkimai.out.log
管理器配置中缺少某些内容

[program:Pirkimai]
command=/home/admin/Pirkimai/bin/Release/netcoreapp3.1/publish/Pirkimai
directory=/home/admin/Pirkimai/bin/Release/netcoreapp3.1/publish/
environment=HOME="/home/admin",ASPNETCORE__ENVIRONMENT="Production"
user=admin
stopsignal=INT
autostart=true
autorestart=true
startsecs=1
stderr_logfile=/var/log/supervisor/Pirkimai.err.log
stdout_logfile=/var/log/supervisor/Pirkimai.out.log