Reputation: 103
I have a problem with .Net Core ConsoleApp. I am trying to run it on DebianOS 9.0 as daemon. As far I did: 1. Create app in Visual Studio. 2. Publish app from Visual Studio fox x64-linux 3. Copy code to DebianOS 4. Create service in /etc/systemd/system/newservice.service
Code of my service looks like:
[Unit]
Description=Test
DefaultDependencies=no
[Service]
ExecStart=/var/SystemdExample/ConsoleApp.dll
WorkingDirectory=/var/SystemdExample
Restart=always
RestartSec=10
User=netuser
SyslogIdentifier=ConsoleAppEx
Group=netuser
[Install]
WantedBy=multi.user.target
When i try to run it with systemctl start newservice.service
The return of this command is something like:
'newservice.service: Main process exited, code=exited, status=203/EXEC'
Nothing else. Someone have idea how to resolve this?
Upvotes: 1
Views: 2570
Reputation: 2822
For me: status=203/EXEC indicating the execution is not running correctly. Please check the path/location of the dotnet when you was installing, because it may not be in /usr/bin/dotnet. Double check the location of your dll as well.
Do something like below:
ExecStart=/root/dotnet6/dotnet /root/YourAppFolder/YourAppName.dll
Upvotes: 0
Reputation: 743
You cannot run the DDL directly, you have to call it as parameter of dotnet
Something like this :
ExecStart=/usr/bin/dotnet /var/path/to/your/app/hellomvc.dll
Upvotes: 2