Questions tagged [upstart]

Upstart is an event-based replacement for the /sbin/init daemon which handles starting of tasks and services during boot, stopping them during shutdown and supervising them while the system is running.

Upstart was created due to fundamental limitations in existing systems. Those systems can be categorized into two types:

  • System V init system
  • Dependency-based init systems

It was necessary to outline the limitations of the SysV and dependency-based init systems to appreciate why Upstart is special...

Upstart is revolutionary as it recognises and was designed specifically for a dynamic system. It handles asynchronicity by emitting events. This too is revolutionary.

Upstart emits "events" which services can register an interest in. When an event -- or combination of events -- is emitted that satisfies some service's requirements, Upstart will automatically start or stop that service. If multiple jobs have the same "start on" condition, Upstart will start those jobs ''in parallel''. To be manifest: Upstart handles starting the "dependent" services itself - this is not handled by the service file itself as it is with dependency-based systems.

Further, Upstart is being guided by the ultimate arbiter of hardware devices: the kernel.

In essence, Upstart is an event engine: it creates events, handles the consequences of those events being emitted and starts and stops processes as required. Like the best Unix software, it does this job very well. It is efficient, fast, flexible and reliable. It makes use of "helper" daemons (such as the upstart-udev-bridge and the upstart-socket-bridge) to inject new types of events into the system and react to these events. This design is sensible and clean: the init system itself must not be compromised since if it fails, the kernel panics. Therefore, any functionality which is not considered "core" functionality is farmed out to other daemons.

See more at The Upstart cookbook

284 questions
2
votes
2 answers

Nginx and NSD3 don't start on boot because they cannot use the assigned IP

Server is a Xen VPS running Ubuntu 12.04 and neither nginx nor NSD3 come up after reboot. The apparent reason for that is that they're not able to bind to their assigned IP addresses right after boot, from /var/log/boot.log * Starting configure…
Damn Terminal
  • 537
  • 3
  • 7
2
votes
1 answer

upstart: initctl: Unknown job

I have a job that's perfectly normal: > start c4-ha-policy ; stop c4-ha-policy c4-ha-policy (start) waiting c4-ha-policy (start) starting c4-ha-policy (start) pre-start, process 1731 c4-ha-policy (start) spawned, process 1828 c4-ha-policy (start)…
n-alexander
  • 121
  • 1
  • 2
2
votes
1 answer

Upstart and pre/post scripts

I run into an issue with upstart where I want to update an init config, but just restarting the job doesn't apply the changes. For example: I've got job xyz running I modify the /etc/init/xyz.conf to do something in pre-stop. The job gets restarted…
viraptor
  • 1,296
  • 6
  • 21
  • 41
2
votes
1 answer

How to run "mongodb --repair" if it's an Upstart job?

My MongoDB server died. The log says something about an unclean shutdown and an existing mongodb.lock file. It recommends to remove the lock file, then restart the mongodb server with --repair. However, on my system (Ubuntu 10.10), I've installed…
2
votes
1 answer

How should I use sudo from an upstart script?

I am using upstart to run my node.js app on an Amazon Linux AMI EC2 instance. I have had a few issues getting it to work, summarized below. In my script I had a line like this: exec sudo -u www /usr/local/bin/node /var/www/foo/app.js >>…
blu
  • 229
  • 3
  • 8
2
votes
1 answer

Ubuntu Upstart job - "stop" is not recognized command

I need some help with this; endless upon endless scripts look exactly the same -- yet I can't seem to stop the job associated with an upstart script. I'm using any of the newest Ubuntu Elestic AMIs on EC2, and it happens from micro to large…
user52077
2
votes
3 answers

SELinux causes "Permission denied" when starting lighttpd+fastcgi via upstart

I'm have trouble launching a lighttpd fastcgi python app via upstart. I can launch the app successfully using sudo lighttpd -D -f /path/to/lighttpd.conf and via su -c "lighttpd -f /path/to/lighttpd.conf. In upstart, I'm using the following…
bfallik-bamboom
  • 227
  • 4
  • 7
2
votes
1 answer

Upstart, no feedback whether starting failed

I have a daemon in /opt/xyz/bin/xyz. Unfortunately it cannot fork itself into background and will not be able to do so within the next half year. My problem is the following: Entering service xyz start just returns xyz start/running, process…
user694971
  • 123
  • 3
2
votes
3 answers

/etc/inittab respawn script migrating from RHEL/CentOS 5.x to 6.x

I have a non-forking perl script running as a TCP-sockets daemon (this script is a backend for a multiplayer game) in CentOS 5.7. It is being started and respawned by /etc/inittab: pref:3:respawn:/bin/su -c '/usr/local/pref/pref.pl >/tmp/pref-`date…
Alexander Farber
  • 714
  • 4
  • 17
  • 38
2
votes
1 answer

How can I ensure a script gets executed after a service is stopped but before another service is stopped?

I should run a specific script whenever a server is shutting down, ensuring that some services are always stopped, while some other, but required services are still up. In practice: I should run a backup script, taking a snapshot of the MySQL…
Ville Mattila
  • 459
  • 7
  • 13
2
votes
1 answer

upstart on ec2 does not update configs

changing Upstart services config files on EC2 servers does not cause Upstart to reload them. I guess it's due to the network nature of EC2's fs. what can I do?
valya
  • 203
  • 2
  • 7
2
votes
2 answers

What functionality do I lose by disabling GDM/KDM/SLIM/CDM etc display managers?

so... I've been wondering lately why do I need GDM. I got it disabled for experiment sake through modifying upstart file /etc/init/gdm (I run Ubuntu 10.10 desktop). So now computer boots to command prompt and I just type in startx if I need GUI. so…
Stann
  • 523
  • 2
  • 7
  • 16
2
votes
1 answer

autofs fails to mount nfs mounts on Ubuntu Lucid Lynx (10.04)

When booting, the system fails to mount nfs mounts due to statd not being started. After manually starting statd, nfs mounts are automatically mounted by autofs. Even though /etc/init/statd.conf specifies "mounting TYPE=nfs" in the "start on" line,…
Francisco Canedo
  • 151
  • 1
  • 3
  • 6
2
votes
2 answers

Upstart event based on level

Upstart provides support for starting jobs based on an events arguments: start on custom-event NAME=foo This will only start the job when custom-event is emitted and the argument NAME has the value foo. It also provides as way to start on a set of…
deft_code
  • 205
  • 2
  • 8
1
vote
4 answers

isc-dhcp-server doesn't start automatically

Running on Astra Linux 1.3, my dhcp service (isc-dhcp-server) is well-configured now and work as expected with a slight nuance - it works only when it's started, but a system don't run it at startup. Doing sudo update-rc.d isc-dhcp-server defaults…
Dmitry Ilukhin
  • 121
  • 1
  • 1
  • 6