0

I have created below script in RHEL 7.6, but unfortunately getting EXEC format error. When i execute the command from working directory it's working fine. below is the service file which was created at /etc/systemd/system/zauto.service

vi /etc/systemd/system/zauto.service
[unit]
Description=ZAuto service
After=default.target

[Service]

Type=simple
ExecStart=/home/ims/setup/zauto/ZAuto.sh
WorkingDirectory=/home/ims/setup/zauto
Restart=on-abort

[Install]

WantedBy=multi-user.target

systemctl status zauto.service -l

[root@ApplicationServer ims]# systemctl status zauto.service -l

● zauto.service
   Loaded: loaded (/etc/systemd/system/zauto.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2020-02-27 16:10:41 IST; 23min ago
  Process: 1862 ExecStart=/home/ims/setup/zauto/ZAuto.sh (code=exited, status=203/EXEC)
 Main PID: 1862 (code=exited, status=203/EXEC)

Feb 27 16:10:41 localhost.localdomain systemd[1]: Started zauto.service.
Feb 27 16:10:41 localhost.localdomain systemd[1]: zauto.service: main process exited, code=exited, status=203/EXEC
Feb 27 16:10:41 localhost.localdomain systemd[1]: Unit zauto.service entered failed state.
Feb 27 16:10:41 localhost.localdomain systemd[1]: zauto.service failed.

Please help me to resolve the issue.

1 Answers1

0

You mention in your opening statement that you were seeing an "EXEC format error." Can you elaborate on this? None of your included log information depicts this error message so I'm curious.

The reason I'm curious is because that error typically occurs when Linux attempts to execute a binary compiled for another CPU Architecture. I'm doubly curious because you're working with automotive software which makes me think you're attempting to run software compiled for the x86_64 architecture on arm64 architecture like a Raspberry Pi. I suspect this is your issue. This happens pretty often. Here are some similar threads for people experiencing similar issues.

You can find many more if you search google.

TJ Zimmerman
  • 251
  • 6
  • 18