(Code =退出,状态= 150)在Apache ASP.NET Core上

发布于 2025-02-11 06:35:13 字数 827 浏览 1 评论 0原文

我试图在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

拥抱影子 2025-02-18 06:35:14

尝试直接运行应用程序:
dotnet serije.dll
(有正确的路径)

可能会出现一个错误:
找不到框架

Try to run app directly:
dotnet Serije.dll
(with correct paths)

Probably you'll get an error:
No framework found

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文