Last post Jul 10, 2017 06:01 AM by Edward Z
Jul 09, 2017 08:38 AM|TonchiVZ|LINK
This is my first time ever I am trying to deploy my web api to nginx, so I have a lot of question marks above my head.
I have been following this tutorial:
and I have stuck at configuring my kestrel service.
This is what I have:
Description=Smity Web Api application
WorkingDirectory=/home/user/smity/asp.net-web-api/Smity API/Smity API/bin/Debug/netcoreapp1.1/
ExecStart=/usr/bin/dotnet /home/user/smity/asp.net-web-api/Smity API/Smity API/bin/Debug/netcoreapp1.1/Smity API.dll
RestartSec=10 # Restart service after 10 seconds if dotnet service crashes
and I can't start the service. I mean, sometimes when I run systemctl start kestrel-smityapi.service, status shows it is active but it seems it is not active cause I always get "Failed to start Smity Web Api application"/"Failed with result 'exit code'"/"Unit
entered failed state"/"kestrel-smityapi.service: Service hold-off time over, scheduling restart.". Working directory path and ExecStart paths are correct.
I have been spending hours figuring out what am I doing wrong, but I can't break the wall. I am new to Linux in general and to asp.net (done few web api before, but that was long time ago).
Does anyone know how to do this part properly?
Jul 10, 2017 06:01 AM|Edward Z|LINK
>> status shows it is active but it seems it is not active cause I always get "Failed to start Smity Web Api application"/"Failed with result 'exit code'"/"Unit entered failed state"/"kestrel-smityapi.service: Service hold-off time over, scheduling restart.".
How did you get this error? Did this error happen always or some times?
What is the result for below command?
systemctl status kestrel-hellomvc.service
And, I would suggest you try below command to check the logs and share us.
sudo journalctl -fu kestrel-hellomvc.service