Click here to Skip to main content
15,946,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
Hello all, having a issue with codeproject to stay running under systemd, if i start codeproject with "bash: /usr/bin/codeproject.ai-server/start.sh" it runs fine, but if i start it as a .service it starts and then stops and restarts all the time

Description=CodeProject.AI Server 2.6.2 application

[Service]
# Our app can notify systemd of status changes
Type=notify
# systemd will run this executable to start the service
# if /usr/bin/dotnet doesn't work, use `which dotnet` to find correct dotnet executable path
# ExecStart=bash /usr/bin/codeproject.ai-server-2.6.2/start.sh
ExecStart=bash /usr/bin/codeproject.ai-server-2.6.2/start.sh

# to query logs using journalctl, set a logical name here
SyslogIdentifier=codeproject.ai-server

# Use your username to keep things simple.
# If you pick a different user, make sure dotnet and all permissions are set correctly to run the app
# To update permissions, use 'chown yourusername -R /srv/HelloWorld' to take ownership of the folder and files,
#       Use 'chmod +x /srv/HelloWorld/HelloWorld' to allow execution of the executable file
# User=youruserhere

# ensure the service restarts after crashing
Restart=always
# amount of time to wait before restarting the service                        
RestartSec=5 

# This environment variable is necessary when dotnet isn't loaded for the specified user.
# To figure out this value, run 'env | grep DOTNET_ROOT' when dotnet has been loaded into your shell.
Environment=DOTNET_ROOT=/usr/lib64/dotnet

[Install]
WantedBy=multi-user.target

# More info: https://swimburger.net/blog/dotnet/how-to-run-a-dotnet-core-console-app-as-a-service-using-systemd-on-linux



here is the code from under the codeproject.ai-server.service file

What I have tried:

ive looked at the logfile and only see 1 error,
Error Exception updating Install Config: Access to the path '/etc/codeproject/ai/installconfig.json' is denied.
Posted

1 solution

This is the wrong place to ask this question. The correct forum is here: CodeProject.AI Discussions[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900