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
1
vote
1 answer

Why is my nodejs application with forever not starting with Upstart on EC2 instance?

I am trying to start a nodejs application with forever (forever simply restarts the program if it crashes), but forever itself is not auto started on boot. So I am using upstart to initialize forever. I have tried hundreds of ways to achieve this…
Renato Gama
  • 151
  • 2
  • 8
1
vote
1 answer

Node.js server is not started after reboot

My Node.js server upstart job config: start on (net-device-up and runlevel [2345] and started td-agent) stop on runlevel [016] respawn env HOME="/var/nodes" script chdir $HOME exec /usr/local/bin/node index.js -c app/config/live >>…
Roman Newaza
  • 632
  • 4
  • 13
  • 23
1
vote
1 answer

How to change upstart order, Start network after fstab?

In ubuntu 12.04, I want to change order; I want to mount all from fstab before running network (i have /etc/network/interfaces on other partition). How to do it? This is my fstab: #
wmp
  • 11
  • 3
1
vote
3 answers

How can a larger delay be placed between two interdependent upstart or /etc/init.d services?

My PostgreSQL service must start after OpenVPN, and when I check the order rc.X directories they are listed as S16openvpn and S19postgresql, so they are in the right order. However connecting to a database via the VPN fails and the logs always…
vfclists
  • 1,632
  • 5
  • 22
  • 37
1
vote
1 answer

Upstart: defining service dependencies / priorities

I am working on an app which runs several services / daemons using upstart. These should start on system startup, but only after the DB server (in our case mongo) was started. I am looking for the right upstart configuration to cause a service to…
shevron
  • 326
  • 2
  • 4
  • 10
1
vote
1 answer

Why doesn't "service mysql start" run mysqld_safe?

I've installed mysql on Ubuntu, and the documentation on starting it up says: Invoke mysql.server. This script is used primarily at system startup and shutdown on systems that use System V-style run directories (that is, /etc/init.d and run-level…
Chris B.
  • 337
  • 1
  • 8
  • 18
1
vote
1 answer

Ubuntu upstart script for tracd hangs on start/stop

I'm trying to set up an Ubuntu (12.04 LTS) upstart script to manage Trac's built in web server as an upstream server for nginx. Here is my init script /etc/init/tracd.conf. I used http://codebyko.se/2010/11/26/tracd-with-upstart-on-ubuntu/ (first…
jcampbelly
  • 113
  • 6
1
vote
1 answer

Setting up mongodb via upstart - how to pass options?

I installed MongoDB in an Ubuntu Server VM inside VMware using these instructions: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/. Everything works fine, and I can access MongoDB at the regular port 27017 ./mongo…
Jonathan Ong
  • 143
  • 2
  • 6
1
vote
1 answer

Understanding Upstart script stanza

I have a script that runs some java process: /apps/run_my_app.sh: #!/bin/sh CLASSPATH=foo java -cp $CLASSPATH foo.app can I have an Upstart script stanza like this? script /apps/run_my_app.sh end script If so, do I need an? expect…
Dave
  • 511
  • 6
  • 15
1
vote
0 answers

initctl respawn does not reload configuration

My upstart service is running with the respawn option. I was hoping that if I deploy a new service config, the config will be loaded, when the service respawns. Neither the initctl reload-configuration command forces a reload, nor the restart…
DELUXEnized
  • 111
  • 2
1
vote
1 answer

Upstart not triggering sysinit

Upon server boot Upstart runs but does not trigger the transition to the normal runlevel, and I would like to know how to fix it. For example syslog will have been started, time set and so on, but Apache, Cyrus IMAP, Postfix and other services are…
joruffin
  • 66
  • 3
1
vote
1 answer

Where did start-stop-daemon store the pid file by default?

When I have a upstart script like.. exec start-stop-daemon --exec /tmp/test.sh --background --start I suppose will save the pid file somewhere and later use it for stop or restart, right? So where is the pid file created by default?
Ryan
  • 5,831
  • 24
  • 72
  • 91
1
vote
2 answers

Daemon crashes but upstart thinks it is still alive

I have to following problem: We have an Java application which is started by an bash script. This application should run as a daemon, so we have an upstart-job to start it. start on runlevel [2345] stop on runlevel [!2345] …
Arvodan
  • 133
  • 1
  • 4
1
vote
1 answer

Upstart attempts to start job before mounting everything

~$ cat /etc/fstab LABEL=cloudimg-rootfs / ext4 defaults 0 0 /dev/xvda2 /mnt auto defaults,nobootwait,comment=cloudconfig 0 2 /dev/xvda3 none swap sw,comment=cloudconfig 0 0 /dev/xvdf /home/ubuntu/apps auto …
Claudio Poli
  • 285
  • 3
  • 10
1
vote
0 answers

Run python script as a service on Ubuntu 11.10

I am facing the following problem. I want to run a python script as a service on Ubuntu 11.10 system (already mentioned in the following…
bugs99
  • 15
  • 1
  • 8