(Code =退出,状态= 150)在Apache ASP.NET Core上
我试图在Linux Ubuntu上托管ASP.NET Core App,并且在配置后,我会在服务文件中获取此错误: 过程:4151 execstart =/usr/bin/dotnet/var/www/serije/serije.dll(code = exited,status = 150) 主PID:4151(代码=退出,状态= 150)
Jun 28 08:02:33服务Systemd [1]:App.Service:Main ProcessIenc.退出,代码=退出,状态= 150/n/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
Im trying to host asp.net core app on linux ubuntu, and after configuring i get this error in service file:
Process: 4151 ExecStart=/usr/bin/dotnet /var/www/serije/Serije.dll (code=exited, status=150)
Main PID: 4151 (code=exited, status=150)
Jun 28 08:02:33 serv systemd[1]: app.service: Main process exited, code=exited, status=150/n/a
Jun 28 08:02:33 serv systemd[1]: app.service: Unit entered failed state.
Jun 28 08:02:33 serv systemd[1]: app.service: Failed with result 'exit-code'.
my service file looks like this:
[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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试直接运行应用程序:
dotnet serije.dll
(有正确的路径)
可能会出现一个错误:
找不到框架
Try to run app directly:
dotnet Serije.dll
(with correct paths)
Probably you'll get an error:
No framework found