service icon indicating copy to clipboard operation
service copied to clipboard

In CentOS8.1 start error,but CentOS7.8 start is ok.

Open agaolong opened this issue 4 years ago • 4 comments

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!!!!!

agaolong avatar May 14 '20 06:05 agaolong

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'.

agaolong avatar May 14 '20 07:05 agaolong

Is it possible for you to try to diagnose this?

kardianos avatar Jun 07 '20 18:06 kardianos

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'.

agaolong avatar Jun 28 '20 02:06 agaolong

@chengziqing Try setenforce 0

bestplay avatar Aug 06 '21 09:08 bestplay