【发布时间】:2022-08-16 13:59:38
【问题描述】:
我试图在 linux ubuntu 上托管 asp.net 核心应用程序,配置后我在服务文件中收到此错误: 进程:4151 ExecStart=/usr/bin/dotnet /var/www/serije/Serije.dll(代码=退出,状态=150) 主 PID:4151(代码=退出,状态=150)
6 月 28 日 08:02:33 serv systemd[1]: app.service: 主进程退出,code=exited,status=150/n/a 6 月 28 日 08:02:33 serv systemd[1]:app.service:单元进入失败状态。 6 月 28 日 08:02:33 serv systemd[1]: app.service: 失败,结果为 \'exit-code\'。
我的服务文件如下所示:
[Unit]
Description=Example .NET Web API App running on CentOS 7
[Service]
WorkingDirectory=/var/www/serije
ExecStart=/usr/bin/dotnet /var/www/serije/Serije.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=dotnet-example
User=root
Environment=ASPNETCORE_ENVIRONMENT=Production
[Install]
WantedBy=multi-user.target
标签: c# linux apache asp.net-core