"start on started" works when manually starting primary job, but not on booting

Asked by Mark Rose on 2009-08-04

Basically, I've written to php scripts that need to run indefinitely after the beanstalkd queuing daemon has been started (the scripts depend on it running).

These are the files:

# /etc/event.d/beanstalkd
start on startup
exec /usr/bin/sudo -u www-data /usr/local/bin/beanstalkd
respawn

# /etc/event.d/process-emails
start on started beanstalkd
stop on stopping beanstalkd
exec /usr/bin/sudo -u www-data php process_emails.php
respawn

# /etc/event.d/process-emails
start on started beanstalkd
stop on stopping beanstalkd
exec /usr/bin/sudo -u www-data php process_videos.php
respawn

When I manually run "initctl start beanstalkd", the other scripts start as expected and show as running in initctl list. However, on reboot, only beanstalkd runs. What is causing the differeing behaviour on manual versus automatic start?

I'm running Ubuntu Jaunty, with all the updates installed (upstart 0.3.9)

Question information

Language:
English Edit question
Status:
Answered
For:
upstart Edit question
Assignee:
No assignee Edit question
Last query:
2009-08-04
Last reply:
2009-08-05

Without further details, it's hard to say, but at first glance: the "startup" event is the very first event emitted by Upstart. *Before* the root filesystem is mounted, let alone anything more complicated.

It may simply be that beanstalkd is unable to be run from this event, and never starts?

Can you help with this problem?

Provide an answer of your own, or ask Mark Rose for more information if necessary.

To post a message you must log in.