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
3
votes
1 answer

Upstart: Why two processes when running as a different user?

I want to keep a nodejs app running, so I followed this: http://howtonode.org/deploying-node-upstart-monit and installed Monit and Upstart which have been working perfectly for a couple of months. I just added a feature to my app that allows disk…
paintedbicycle
  • 199
  • 1
  • 3
  • 15
3
votes
2 answers

upstart script not logging to file

Linux CentOS 6.5 Here's my upstart script inside of /etc/init/ start on runlevel [2345] stop on runlevel [!2345] exec /usr/bin/riofs --fuse-options="allow_other" --fmode=0777 --dmode=0777 ct.recordergo…
user173757
3
votes
1 answer

restarting php5-fpm on ubuntu 14.04 with chef

I have this in my chef recipe: service 'php5-fpm' do supports :restart => true action [ :enable, :start ] end However my recipe now barfs in Ubuntu 14.04, as "/etc/init.d/php5-fpm restart" does not work on Ubuntu 14.04 (it returns with 1 and…
Josh Nankin
  • 722
  • 12
  • 27
3
votes
3 answers

Upstart Job as Unprivileged user fails with permission denied

I'm trying to set up a Sage Cell Server (an open source mathematical engine) running as an unprivileged user. I've created the unprivileged user sagecell to do the job. It is installed correctly and, if I run it normally…
Logan
  • 135
  • 2
  • 10
3
votes
2 answers

Why can't I run this python script as a job in ubuntu 12.04?

Normally I do this: cd /home/ubuntu/project/beta python default.py -dev In order to start the web.py server I would prefer to do this: sudo start beta Here is my /etc/init/beta.conf setuid alex setgid alex script export…
Alex Waters
  • 177
  • 10
3
votes
2 answers

Run Python script at startup using upstart

I'm trying to create an upstart script to run a python script on startup. In theory it looks simple enough but I just can't seem to get it to work. I'm using a skeleton script I found here and altered. description "Used to start python script as a…
never_odd_or_even
  • 325
  • 1
  • 4
  • 12
3
votes
1 answer

RHEL 6 Upstart User Jobs

Does RHEL6 support upstart user jobs? I modified /etc/dbus-1/system.d/Upstart.conf and added a policy section for my username. I then created ~/init.d/userjob.conf. When I do inictrl list it doesn't show up. Does RHEL6 support this? If so how do I…
Dave
  • 511
  • 6
  • 15
3
votes
1 answer

Running multiple instances with upstart

I have a server that I've written that needs to run on multiple ports. So I've written two Upstart scripts like the upstart documents suggest. http://upstart.ubuntu.com/cookbook/#instance Task to spawn instances: # gatling-broadcast.conf description…
Chris Targett
  • 33
  • 1
  • 4
3
votes
2 answers

Spawning multiple instances of a daemon in Ubuntu

I have a python script that listens and blocks while it waits for data on a redis list. It runs fine in upstart using the following: description "stage message consumer" author "Nilesh Ashra" start on started mountall stop on…
3
votes
2 answers

Is it possible to set an Upstart service to stop $LAST

I'm wanting the rsyslog service to run until the last moment to ensure we receive as much logging as possible on our central logging servers. On Ubuntu 11.04, rsyslog's stop line is set to "stop on runlevel [06]" so it stops before (at least)…
cjs226
  • 61
  • 4
3
votes
1 answer

passing arguments to upstart job

I want to run multiple instances of my process by passing an args to startup job: start myapp instance1 start myapp instance2 and so on I want to have one upstart conf file instead of having conf files as many as instances of my app. Is it…
JosiP
  • 31
  • 1
  • 3
3
votes
2 answers

Debain no longer booting after apt-get remove upstart

I can no longer boot my server up. I get the following issue: Loading, please wait... Target filesystem doesn't have requested /sbin/init. /bin/sh: can't access tty; job control turned off # _ and my system just sits there. It occured after I…
macintosh264
  • 155
  • 1
  • 7
3
votes
1 answer

Upstart does not work

I followed this tutorial to set up upstart for my node.js server: http://howtonode.org/deploying-node-upstart-monit The problem is, that when I try to run "start mynodeprogram", I get the floowing error: root@v:/# start mynodeprogram start: Unable…
FlashFan
  • 131
  • 1
  • 3
3
votes
2 answers

Upstart multiple instances of service not working

I started playing with MongoDB on Lucid. Now I would like to run a DB and Config server on the same box. They both use the same binary to launch, but with different config files and running on different ports. All directories for log and lib is…
Dax
  • 294
  • 2
  • 11
3
votes
3 answers

Fedora14 serial console how-to needed

Has anyone ever got a serial console working in fedora 14 ? Is it as simple as adding to grub: serial --unit=0 --speed=38400 terminal --timeout=10 serial console and add to the kernel lines: console=tty0 console=ttyS0,38400 If so, this isn't…
lamba2
  • 31
  • 4