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

Sending Message to server over socket on startup using Upstart

Problem I need to send a message to a a server via a TCP socket during computer startup. We are using Ubuntu 14.04 and therefore, by default, must use Upstart as the system initialization. (We also have other computers running Ubuntu 16.04 that can…
1
vote
1 answer

Upstart, node and bash users

I am having some problems understanding all the mechanisms behind the user management with upstart, node and bash. What I want to do: I want to have a service, that executes a node script. This node script opens a port and the server, and when it…
Hammerbot
  • 175
  • 2
  • 8
1
vote
0 answers

Does upstart wait until a core dump is written before restarting the process?

On our Ubuntu servers, core dumps are currently disabled. If we enable them, and a daemon process crashes, will that impact the time taken for upstart to restart the process? That is: if my daemon's using, say, 32GB of RAM, does that all have to be…
Roger Lipscombe
  • 2,177
  • 6
  • 24
  • 37
1
vote
0 answers

running composer from upstart

I am running Ubuntu 14.04. I am trying to make a service capable of deploying an application. The process is very simple: I have a node script listening on port 2133 for a POST request When this script gets a request, it triggers a bash script that…
Hammerbot
  • 175
  • 2
  • 8
1
vote
1 answer

Init script doesn’t work properly by using “service” command

I have the following startup script, which should either start or stop a screen in detached mode: #!/bin/sh # node2 # Maintainer: @KittBlog # Authors: mk@kittmedia.com ### BEGIN INIT INFO # Provides: node2 # Required-Start: $local_fs…
KittMedia
  • 238
  • 3
  • 11
1
vote
1 answer

Prevent duplicates when launching ssh-agent in upstart script

As part of an Upstart script, I need to launch ssh-agent to load a GitHub deployment key, so in the script I have: eval "$(ssh-agent -s)" ssh-add $HOME/.ssh/id_rsa The problem is that when the service is restarted, ssh-agent is relaunched, leaving…
1
vote
0 answers

How to have upstart shutdown rsyslog as last job in Ubuntu 14.04

It seems like upstart decides to shutdown rsyslog on Ubuntu 14.04 as one of the first jobs if a machine shuts down. So most logging of shutting down jobs is lost. How to I instruct upstart to shutdown rsyslog as last job in Ubuntu 14.04?
1
vote
1 answer

How to change max file limits on a process

Yes I know this question has been asked before and I have tried all the solutions I have seen and none of them work for me. We are running Ubuntu 12, and we have a process that automatically gets launched by upstart every time the machine boots up.…
Marc
  • 151
  • 2
1
vote
1 answer

What is meant by /sbin/init too old?

I am trying to use Upstart to daemonize a script. So, I made a .conf file under /etc/init/. Now to check the conf file I did init-checkconf /etc/init/ping_me.conf And it says ERROR: version of /sbin/init too old My linux kernel version is…
1
vote
0 answers

How to deal with Upstart “terminated with status 1”?

I have a very simple script on Ubuntu 14.04 upstart (/etc/init/myscript.conf) description "Something" author "me" start on filesystem and started networking stop on shutdown respawn respawn limit 5 60 # give up restart after 5 respawns in 60…
Sasha Grievus
  • 223
  • 2
  • 11
1
vote
1 answer

How to configure a newer version of Supervisord to start on system boot in Ubuntu 12.02?

How do you configure a newer version of supervisor to start on system boot in Ubuntu? Some distributions simply lag behind in their repositories. When I use easy install (as recommended by default on the supervisor website) I only get the binary…
eco
  • 147
  • 9
1
vote
0 answers

auto restart php-fpm on segfault

I want restart php-fpm after segfaults. I run php-fpm on ubuntu 14.04 trusty. It uses upstart for checking services. I try to set automatic restart with respawn options, but after SIGSEGV php-fpm did not restart. Could you advice - what is the best…
BaZZiliO
  • 310
  • 1
  • 2
  • 12
1
vote
1 answer

Simplest infinite script exec without upstart

I've got a CentOS 5.11 box that I have to work with for now--in a production env where I can't really push it to CentOS 6, at least for awhile. I have to be low-impact on this project, can't mess up this production box. I have a script, call it…
Dan
  • 61
  • 2
1
vote
2 answers

Unkillable upstart process

So I wrote a seemingly-basic node.js server upstart script based on a script from this article, and it works fine, starting the server and running on the expected port. The problem comes when I try to kill it. I've tried a few commands, like stop…
moberemk
  • 113
  • 3
1
vote
2 answers

running a docker container on upstart on Amazon Linux isn't working

I'm trying to get my container to run on startup using upstart. As the tutorial said - I created /etc/init/nginx_server.conf description "Nginx docker" author "Me" start on filesystem and started docker stop on runlevel [!2345] respawn script …
Boaz
  • 405
  • 1
  • 11
  • 16