I am using upstart to start my golang application. I have my application folder structure like this,
Web-app/ /app main.go
I built the application
$cd /home/ec2-user/go/src/github.com/dineshappavoo/web-app/app/ $go build ./...
It generated app [executable file] under app folder as app.
And placed the
/etc/init/ folder. Here is the web-app.conf content,
#Web app upstart script description "start and stop web app" start on (net-device-up and local-filesystems and rullevel ) stop on runlevel  respawn respawn limit 5 30 console output script chdir /home/ec2-user/go/src/github.com/dineshappavoo/web-app/app exec ./app end script
When I tried sudo initctl list, it lists the process as stop/waiting. And I tried to start the process
$sudo initctl start web-app
It shows the process as start/running. But it is not started.
I checked the
/var/log/messages logs. It shows,
init: web-app main process (18740) terminated with status 127
I couldn't start the process. I think there is some issue with the chdir. I tried different options for past two days but no luck. And I am fairly new to upstart. Could someone help me with this?