Failed at step EXEC spawning

Viewed 65

I did everythin' like in Spring documentation to deploy my app on AWS. But got an error:

 deploy-demo.service: Failed at step EXEC spawning /opt/deploy-demo/deploy-demo.jar: Exec format error
Sep 07 21:22:10 ip-172-31-45-166 systemd[1]: deploy-demo.service: Main process exited, code=exited, status=203/EXEC

My deploy-demo.service file located in /etc/systemd/system/deploy-demo.service with settings:

[Unit]
Description=deploy-demo
After=syslog.target

[Service]
User=gitlab-runner
ExecStart=/opt/deploy-demo/deploy-demo.jar
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target

deploy-demo.jar and deploy-demo.conf located in /opt/deploy-demo/

deploy-demo.conf file contains

RUN_ARGS="--spring.datasource.url=jdbc:postgresql://here_is_should_be_my_host:5432/helpfast --spring.datasource.username=postgres --spring.datasource.password=adminadmin"

All permissions seems to me correct:

drwxr-xr-x 2 gitlab-runner gitlab-runner     4096 Sep  7 21:21 ./
drwxr-xr-x 3 root          root              4096 Sep  7 20:31 ../
-r-------- 1 gitlab-runner gitlab-runner      200 Sep  7 21:21 deploy-demo.conf
-r-x------ 1 gitlab-runner gitlab-runner 42645024 Sep  7 20:31 deploy-demo.jar*

Any ideas are highly appreciated!

0 Answers
Related