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
37
votes
7 answers

Logging a Daemon's Output with Upstart

I have a custom daemon that is managed by upstart on my Ubuntu server. It works perfectly except that I need to capture (log) the daemon's output. The official stanzas page says that I can use console logged to do this, but what file does it log…
Alex Reisner
  • 830
  • 2
  • 9
  • 10
30
votes
3 answers

Can upstart handle symbolic links to config files?

I have all of my upstart config files under version control. My ideal way to use upstart is to create soft links from my version control repository (mercurial - not that it matters) into /etc/init but upstart fails to see the jobs. Everything is…
Chris McCauley
  • 552
  • 1
  • 5
  • 15
23
votes
6 answers

How to make upstart back off, rather than give up

I want Upstart to do two things: stop trying to respawn a failed process so fast never give up trying to respawn In an ideal world, upstart would try to restart a dead process after 1s, then double that delay on each attempt, until it reached an…
fadedbee
  • 1,988
  • 4
  • 22
  • 33
23
votes
4 answers

upstart scripts: run a task after networking goes up

I'm working on moving my current server setup to newer hardware, and migrating from ubuntu karmic koala to lucid lynx. Currently i'm using gw6c (compiled from the gogo6 website, as opposed to the version from the repositories) to get ipv6 access for…
Journeyman Geek
  • 6,969
  • 3
  • 31
  • 49
19
votes
1 answer

Why isn't my upstart service listed in service --status-all

I created a bunch of upstart jobs for my services that I'm running on an Ubuntu 12.04. I can successfully start them and stop with with: service my_service start service my_service stop but they are not listed when I do service --status-all Any…
Pablo
  • 7,249
  • 25
  • 68
  • 83
18
votes
3 answers

CentOS 6 and upstart

The new CentOS 6 comes with Upstart, replacing init. I am trying to convert an /etc/inittab file to the new upstart format. This particular server only has 15 or so inittab entries, however, other servers have >30. We are mainly wanting the…
Brian
  • 1,213
  • 2
  • 14
  • 24
18
votes
3 answers

Is there a "standard" way to make daemon in Debian?

I need to create a daemon from the application in Debian. Is there any standard tool for this in Debian like "upstart" in Ubuntu? I need only start-stop commands, to start a program as a daemon with some options and a pid file and kill it with pid…
Kuroki Kaze
  • 345
  • 2
  • 5
  • 18
17
votes
3 answers

Have upstart read environment from /etc/environment for a service

What is the best way to provide the environment variables defined in /etc/environment to an upstart service? I think simply sourcing them with . in a script section does not work, because the scripts are executed by sh which would need an…
Nikratio
  • 635
  • 5
  • 13
16
votes
1 answer

Upstart: allowing a normal user to stop and start my custom service

I have got my webserver application starting on boot using upstart. This is the upstart script: # web app node upstart file at /etc/init/webapp.conf description "web application" start on started mongodb stop on runlevel [06] respawn respawn…
Tom
  • 601
  • 2
  • 8
  • 15
15
votes
3 answers

EC2 linux any and all upstart jobs returning "unrecognised service"

Having a nightmare migrating some upstart jobs from Ubuntu to EC2 Linux (ElasticBeanstalk) I am unable to get even the most basic task to work. I am using the script below which works perfectly on Ubuntu but returns the very unhelpful "unrecognised…
Mike Miller
  • 401
  • 1
  • 3
  • 9
13
votes
2 answers

How do I chose between upstart, runit, supervisor, daemontools, ... for restarting a process if it dies? (process supervision / monitoring)

I have a Nginx web proxy, gunicorn web server, and a python/flask web app. The Gunicorn process apparently died, and I want to ameliorate that in the future by looking into a utility that can monitor and restart the gunicorn process in the event it…
Matthew Moisen
  • 341
  • 2
  • 5
  • 12
12
votes
1 answer

systemd script for starting my app server - Unknown lvalue 'StartLimitIntervalSec' in section 'Unit'

I have a upstart configuration file as shown below which works fine in Ubuntu 14: #/etc/init/data_server.conf #sudo start data_server #sudo stop data_server #sudo status data_server start on runlevel [2345] stop on runlevel [016] chdir…
user1950349
  • 223
  • 1
  • 3
  • 10
12
votes
2 answers

upstart does not see my job

in Ubuntu 12.10 user@xyz:~$ sudo initctl --version initctl (upstart 1.5) Copyright (C) 2012 Scott James Remnant, Canonical Ltd. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or…
xdenser
  • 123
  • 1
  • 1
  • 4
11
votes
3 answers

Upstart : start service after non-upstart process

On Ubuntu 10.04, I need to start my service with upstart, but only when mysql is up and running. The problem is that mysql itself is not handled by upstart, so I can't use the "start on" feature. What can I do ?
Falken
  • 1,682
  • 5
  • 18
  • 27
10
votes
2 answers

Permanently Disable Init Service

I just provisioned a new VPS running CentOS 6, and it comes with Apache. I want to disable Apache, because I will be using Nginx instead. I know I can just delete the script in /etc/init.d/, but I don't want to do that, because it's a stock thing…
Max Bucknell
  • 213
  • 1
  • 3
  • 9
1
2 3
18 19