unit.service failed because the control process exited with error code. What does this error mean?
The error you pasted is "Exec format error".
There are already a number of possible causes for "Exec format error" documented in the Stack Exchange network. I recommend reviewing that answer.
Also, if you can, avoid mixing systemd config files with legacy "sysVinit" scrypts in /etc/init.d. They can work together, but it makes problems harder to be debug. I recommend using exclusively systemd
if possible.
Related videos on Youtube
Praneetha
Updated on September 18, 2022Comments
-
Praneetha over 1 year
I am trying to start a script in
/etc/init.d
inubuntu 16.04
. but it gives me an error. I am able to execute each step in that (scheduler_slave) unit manually. However it fails while executing through the script.Could anyone explain what is the meaning of the below error/
I am totally a newbie to this field and trying to figure out why this error comes. Please let me know if I missed any detail.
command:
sudo /etc/init.d/scheduler_slave start
error:
[....] Starting scheduler_slave (via systemctl): scheduler_slave.serviceJob for scheduler_slave.service failed because the control process exited with error code. See "systemctl status scheduler_slave.service" and "journalctl -xe" for details. failed!
systemctl status scheduler_slave.service
● scheduler_slave.service - LSB: Start scheduler slave at boot Loaded: loaded (/etc/init.d/scheduler_slave; bad; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2018-03-12 13:03:39 IST; 1h 26min ago Docs: man:systemd-sysv-generator(8) Process: 7315 ExecStart=/etc/init.d/scheduler_slave start (code=exited, status=203/EXEC)
sudo journalctl -xe
-- A new session with the ID 80 has been created for the user ubuntu. -- -- The leading process of the session is 7377. Mar 12 14:29:24 ubuntu systemd[1]: Started Session 80 of user ubuntu. -- Subject: Unit session-80.scope has finished start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit session-80.scope has finished starting up. -- -- The start-up result is done. Mar 12 14:32:56 ubuntu sudo[7547]: ubuntu : TTY=pts/1 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/bin/journalctl -xe Mar 12 14:32:56 ubuntu sudo[7547]: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0) Mar 12 14:34:29 ubuntu sudo[7547]: pam_unix(sudo:session): session closed for user root Mar 12 14:34:36 ubuntu sudo[7551]: ubuntu : TTY=pts/1 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/etc/init.d/scheduler_slave start Mar 12 14:34:36 ubuntu sudo[7551]: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0) Mar 12 14:34:36 ubuntu systemd[1]: Starting LSB: Start scheduler slave at boot... -- Subject: Unit scheduler_slave.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit scheduler_slave.service has begun starting up. Mar 12 14:34:36 ubuntu systemd[7562]: scheduler_slave.service: Failed at step EXEC spawning /etc/init.d/scheduler_slave: Exec format error -- Subject: Process /etc/init.d/scheduler_slave could not be executed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The process /etc/init.d/scheduler_slave could not be executed and failed. -- -- The error number returned by this process is 8. Mar 12 14:34:36 ubuntu systemd[1]: scheduler_slave.service: Control process exited, code=exited status=203 Mar 12 14:34:36 ubuntu systemd[1]: Failed to start LSB: Start scheduler slave at boot. -- Subject: Unit scheduler_slave.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit scheduler_slave.service has failed. -- -- The result is failed. Mar 12 14:34:36 ubuntu systemd[1]: scheduler_slave.service: Unit entered failed state. Mar 12 14:34:36 ubuntu systemd[1]: scheduler_slave.service: Failed with result 'exit-code'. Mar 12 14:34:36 ubuntu sudo[7551]: pam_unix(sudo:session): session closed for user root Mar 12 14:34:47 ubuntu sudo[7594]: ubuntu : TTY=pts/1 ; PWD=/home/ubuntu ; USER=root ; COMMAND=/bin/journalctl -xe Mar 12 14:34:47 ubuntu sudo[7594]: pam_unix(sudo:session): session opened for user root by ubuntu(uid=0)
-
muru about 6 years
status=203/EXEC
means the file could not be executed (doesn't exist? permission denied?). What does your init script try to execute? -
Praneetha about 6 yearsinit script has commands to run 3 other ruby scripts.And I am able to run those 3 ruby scripts manually.
-
-
Praneetha about 6 yearsthanks! will let you know if the error still persists.