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

Upstart is not sending CONT to my stopped daemon which is configured to use 'expect stop'

I have the following test configuration file for an upstart service, running on Ubuntu 14.04: expect stop chdir /home/joe/Projects/Marketplace env RAILS_ENV="development" script ruby -e "STDOUT.sync=true; puts 'loading...'; sleep 5;…
mltsy
  • 322
  • 2
  • 10
0
votes
0 answers

upstart fail to run service and not able to debug

I am using os-svc-daemon to create my upstart service for openstack project. my upstart job config is as below File : /etc/init/myservice.conf start on runlevel [2345] stop on runlevel [016] env OS_SVC_ENABLE_CONTROL=1 export…
Nilesh
  • 255
  • 1
  • 6
  • 18
0
votes
1 answer

Chef installation in a chroot (packer): not starting services

I'm trying to use packer.io to create a machine image for a server who's deployment I already have automated using Chef (chef-solo specifically), using the amazon-chroot builder and the chef-solo provisioner (with a few shell provisining steps…
shevron
  • 326
  • 2
  • 4
  • 10
0
votes
1 answer

How do I keep process running in the background, even after a machine reboot?

What is the way to keep some process running (web server, database and so on) in background, and be sure that in case of system reboot it will start immediately again? I'd like to have this feature for not-provisioned user (without sudo access), so…
Kamil Lelonek
  • 113
  • 1
  • 7
0
votes
1 answer

Node.js Forever upstart script stop hangs

I am using Ubuntu 14.04 with Node.js installed to .nvm and the project direction under my home directory. I am trying to run the script as me bill during boot. And have the ability to restart and stop the script. I am using the npm module forever to…
Bill
  • 115
  • 5
0
votes
1 answer

Upstart: cannot run as root

I have made this upstart script, which starts a Node.js service. But all of the sudden the service has stopped, and upstart has failed to restart it. Now that I am trying to start it manually, it fails to recognize my service: start: Unknown job:…
0
votes
1 answer

Why won't upstart stop my node server?

I've got a super simple test node server # server.js var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(8080,…
gman
  • 147
  • 1
  • 6
0
votes
1 answer

Upstart init task

Here is my use-case. I have a long running server that is started by upstart. This server needs to be initialized first (populate tables in a db). This should only happen once in the life of the service (and again on migration), so can't be tied to…
ekaqu
  • 113
  • 2
0
votes
1 answer

Run node.js from upstart (ubuntu 12.04)

I'm trying to setup upstart script to start/stop my node.js application. Here is my upstart script: #!upstart description "node.js server" author "marduk" start on filesystem stop on runlevel [!2345] oom never expect daemon respawn respawn limit…
Marduk
  • 3
  • 3
0
votes
2 answers

Upstart script which restarts service when file is created

I have created my own upstart script in /etc/init, which I can start and stop. Now I want that service to be restarted when a file (/etc/my-app/restart-requested.txt) exists (or better is touched). My solution with previous /etc/init.d/ service was…
Witek
  • 1,433
  • 3
  • 14
  • 16
0
votes
1 answer

Start daemon after specific samba share is mounted

I asked this question on AskUbuntu, but it's not getting any traction there... So I'll try here as well: I have a homebrew headless NAS running 12.04. In it I have a bunch of disks that are presented as a Samba share thanks to Greyhole. If I want to…
getack
  • 61
  • 8
0
votes
1 answer

upstart - supervisord fork count > 2 (can;t get supervisord to start on boot)

i'm trying to use upstart so that supervisord starts automatically at boot. my supervisord is in a virtual environment. I've configured it to run in foreground mode with -n param and it works if started manually but refuses to start on…
w-01
  • 215
  • 2
  • 12
0
votes
1 answer

Proper Way to Auto Mount NFS/Samba Shares Before Apache Startup at Boot?

I'm using an Ubuntu 12.04 (Server) VM as a development web server. I keep the served files on the VM host, therefore Apache uses NFS mounted directories for DocumentRoot To keep things as automated, I have Apache set to start on boot. I have no…
misterich
  • 41
  • 5
0
votes
0 answers

Node.js app doesn't start in upstart with Centos

description "Node app" author "me" start on runlevel [2345] stop on runlevel [06] pre-start script exec logger "pre-start NODEJS-CHAT app" end script post-start script exec logger "post-start NODEJS-chat app" end script script …
solsol
  • 1,121
  • 8
  • 21
  • 31
0
votes
1 answer

Why is this upstart script not stopping my process?

I am trying to write an upstart script that checks if my process is running by pinging it's HTTP interface. So far, I just can't get the post-start clause to work. Here's a simplified version that I've tried: description "my application" start on…
Ztyx
  • 1,385
  • 3
  • 14
  • 28