start-stop-daemon error (Exec format error)
Asked Answered
S

2

7

This command is part of an upstart script, which used to work in ubuntu 12.04, 10.04.

sudo start-stop-daemon --start --make-pidfile --pidfile /var/run/mk_order_handler.pid --chuid ubuntu --exec /data2/src/jeapps/sites/crons_index.php workers/mk_order_handler

I just upgraded my system to 14.04 and upstart script stopped working. When I manually executed the start-stop-daemon command I get Exec format error.

The only difference I can see is, the script is placed in a separate block device. Will it cause a problem? How could I fix this error?

Spoliation answered 7/8, 2014 at 8:3 Comment(0)
C
17

I just now had the same issue and in my case it was due to that my script lacked the #!/bin/bash in the first row.

Coltoncoltsfoot answered 8/4, 2015 at 11:56 Comment(0)
E
1

You should separate arguments from the executable path using --.

The result would be:

start-stop-daemon --start --make-pidfile --pidfile /var/run/mk_order_handler.pid --chuid ubuntu --exec /data2/src/jeapps/sites/crons_index.php -- workers/mk_order_handler

Also, I do not know why you are using sudo. Upstart jobs are run as root, so they do not need sudo.

Ellisellison answered 12/8, 2014 at 16:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.