service
service copied to clipboard
In CentOS8.1 start error,but CentOS7.8 start is ok.
CentOS Linux release 8.1.1911 (Core)
[root@vultrguest run-server]# systemctl status run ● run.service - This is an run server. Loaded: loaded (/etc/systemd/system/run.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2020-05-14 06:49:10 UTC; 13s ago Process: 23338 ExecStart=/root/run-server/run-server (code=exited, status=203/EXEC) Main PID: 23338 (code=exited, status=203/EXEC)
May 14 06:49:10 vultrguest systemd[1]: Started This is an run server.. May 14 06:49:10 vultrguest systemd[1]: run.service: Main process exited, code=exited, status=203/EXEC May 14 06:49:10 vultrguest systemd[1]: run.service: Failed with result 'exit-code'.
but in CentOS Linux release 7.8.2003 (Core) is ok!!!!!
this is official demo,still error.
● GoServiceExampleLogging.service - This is an example Go service that outputs log messages. Loaded: loaded (/etc/systemd/system/GoServiceExampleLogging.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2020-05-14 07:07:29 UTC; 12s ago Process: 23862 ExecStart=/root/lantern-server (code=exited, status=203/EXEC) Main PID: 23862 (code=exited, status=203/EXEC)
May 14 07:07:29 vultrguest systemd[1]: Started This is an example Go service that outputs log messages.. May 14 07:07:29 vultrguest systemd[1]: GoServiceExampleLogging.service: Main process exited, code=exited, status=203/EXEC May 14 07:07:29 vultrguest systemd[1]: GoServiceExampleLogging.service: Failed with result 'exit-code'.
Is it possible for you to try to diagnose this?
Jun 28 02:01:40 test2 systemd[1]: Reloading. Jun 28 02:01:43 test2 systemd[1]: Started This is an test server.. -- Subject: Unit test.service has finished start-up -- Defined-By: systemd -- Support: https://access.redhat.com/support
-- Unit test.service has finished starting up.
-- The start-up result is RESULT. Jun 28 02:01:43 test2 systemd[2949]: test.service: Failed to execute command: Permission denied Jun 28 02:01:43 test2 systemd[2949]: test.service: Failed at step EXEC spawning /home/AzureUser/test-server/test-server: Permissio> -- Subject: Process /home/AzureUser/test-server/test-server could not be executed -- Defined-By: systemd -- Support: https://access.redhat.com/support
-- The process /home/AzureUser/test-server/test-server could not be executed and failed.
-- The error number returned by this process is 13. Jun 28 02:01:43 test2 systemd[1]: test.service: Main process exited, code=exited, status=203/EXEC Jun 28 02:01:43 test2 systemd[1]: test.service: Failed with result 'exit-code'.
@chengziqing
Try setenforce 0