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.

learn more… | top users | synonyms

6
votes
1answer
489 views

How to specify a daemon shutdown command with upstart?

In an upstart configuration how do I define what command should be used to shutdown a server. Lets say I have daemon that has two seperate processes. startup.sh - to start the server shutdown.sh ...
6
votes
3answers
4k views

Best way to make a shutdown hook?

Since Ubuntu relies on upstart for some time now, I would like to use an upstart job to gracefully shutdown certain applications on system shutdown or reboot. It is essential that the system's ...
6
votes
1answer
3k views

why would /etc/init.d/mysql run the wrong upstart job?

update: /lib/init/upstart-job has been replaced with the MongoDB init script. For some reason, /etc/init.d/mysql start|stop|restart|status (/etc/init.d/mysql is simply a symlink to ...
6
votes
3answers
5k views

Auto-start service on bootup that depend on network

I have a particular service (in this case OpenFire) that runs at startup. When it starts, it attempts to connect to a database at a given hostname. At startup time it fails to connect to that ...
6
votes
1answer
1k views

ubuntu upstart script execute a script.py program

I'm creating an upstart script to execute a python program I've written. When the service is starting I want to echo starting service - script.py... and echo the process id of the program once ...
5
votes
2answers
7k views

How do I run a Python script in the background and restart it after a crash?

I have a very simple Python script that I'd like to be always running on my Ubuntu 12.04 server. I thought of using upstart + monit. The problem is that those tools seem rather complicated for a ...
5
votes
2answers
5k views

MySQL server Upstart script not working on boot

For some reason the Upstart script for the MySQL server isn't working when I boot my server, however it does work once the server has booted and I execute sudo start mysql manually. I'm running an ...
5
votes
2answers
4k views

How to diagnose Upstart errors?

I have an Upstart conf file in /etc/init which starts fine if i start it manually like this: sudo initctl start myconf If i run it without the sudo command i get the error name=(unset) error, which ...
5
votes
1answer
229 views

upstart init script remains on apt-get remove

I just created my first .deb file ever from a Python script. I included a package.upstart file under package/debian and all installed great. However, I noticed that apt-get remove package leaves the ...
5
votes
2answers
1k views

upstart memcached

I've put together an upstart script for memcached based on the init.d script it ships with, as I couldn't find any examples anywhere. The problem is it's not respawning automatically when I kill the ...
5
votes
2answers
17k views

How to start jenkins?

I installed jenkins via sudo apt-get install jenkins. However, it doesn't start up. Tried to start it manually using sudo /etc/init.d/jenkins start. But it says this message when I try to start it ...
5
votes
1answer
5k views

“respawning too fast, stopped”. How to make UPSTART disable for 5 mins?

In the old days, the init daemon used to disable tasks that were respawning too fast. I discovered to my peril that UPSTART just stops them. forever. I have found the COUNT and INTERVAL controls for ...
5
votes
1answer
3k views

How do I choose which way to enable/disable, start/stop, or check the status of a service?

If I want to start a system installed service, I can do: # /etc/init.d/some-svc start # initctl start some-svc # service some-svc start # start some-svc If I want to disable a service from running ...
5
votes
1answer
2k views

Python service using Upstart on Ubuntu

I want to create to deploy a heartbeat service (a python script) as a service using Upstart. My understanding is that I've to add a /etc/init/myheartbeatservice.conf with the following contents. # ...
5
votes
2answers
845 views

Upstart not executing the exec function in upstart.conf

I have a completed upstart conf file loaded here: http://pastebin.com/5E7J5jEY but I'm having trouble with the upstart not executing the exec function and/or relinquishing the kernel console CLI back ...
5
votes
1answer
2k views

Upstart kill timeout not respected?

I am currently learning upstart by playing around. I think I have understood the principle now, but I am having difficulties with the "kill timeout" stanza in upstart jobs. For example, I have the ...
5
votes
1answer
13k views

Upstart script and start-stop-daemon

I had an issue where making an upstart script would call the script multiple times, causing my IRCd to spawn around 8 times or so. In order to rectify this, I used start-stop-daemon: description "IRC ...
5
votes
1answer
98 views

Set permanent command-line options to upstart

I would like to add a command-line option, such as --default-console=none, to upstart. I believe I can just add these to the kernel invocation line and they will be passed on, is this true? If so, ...
5
votes
1answer
665 views

Upstart kills all process started by script

So I use Upstart [myscript] to start a script [A], which starts another script [B], which in turn starts some other scripts [GROUP C]. When I run stop [myscript], I encounter the unusual behavior ...
5
votes
1answer
600 views

Gnome session log getting too large

Under my user a hidden system folder .cache/upstart/ is getting insanely large - 99G. This is mainly due to a file gnome-session.log. Does anybody know what this folder is and why it may get so large? ...
4
votes
2answers
3k views

How do I setup gunicorn?

Upstart doesn't like to start gunicorn because it tries to call setpgrp (see github issue), what would be the best way to start [gunicorn] on a 10.04.1 server install? - Ideally with automatic ...
4
votes
2answers
2k views

How can I check if upstart is installed in ubuntu server and how can I install it?

I want to install upstart to my ubuntu server 13.10, but I am confused if I need to download the source or install package. In upstart's getting started page I think they instruct to install the ...
4
votes
1answer
4k views

How should I start MongoDB on a NUMA machine?

When I first installed MongoDB 2.2.3 with apt-get, following the instructions from 10gen installation guide, it auto starts when the server starts. However, after following the instructions in ...
4
votes
3answers
1k views

How can I tell upstart to restart a service when a different service is restarted?

I've an OpenERP server running on one of my servers. It's started by a traditional /etc/init.d/ script. It uses a PostgreSQL database and needs a manual restart every time PostgreSQL is restarted. ...
4
votes
1answer
4k views

How to Debug when upstart hangs?

I have recently much trouble with services started by upstart. Currently I have problems with avahi-daemon and rsyslogd. Most of the time i had that problem on Ubuntu >= 12.04. What's the problem? If ...
4
votes
2answers
6k views

Starting java processes with Upstart

I want to start a java process using Upstart. Currently, on our OpenSuSE servers, I use the System V init system to achieve this, but on our Ubuntu servers I'd rather use Upstart. But I have two ...
4
votes
1answer
1k views

Does Upstart emit hooks for SysV jobs?

I want to make an Upstart job start immediately before a System V job (/etc/rc0.d/S40umountfs). I've tried specifying: start on starting umountfs but Upstart doesn't recognize the name of the ...
4
votes
1answer
3k views

Upstart conf changes do not reload after edit

After I make some changes to an upstart conf file upstart does not reload the new changes until I reboot the system start on filesystem or runlevel [23] stop on runlevel [6] respawn expect fork ...
4
votes
2answers
2k views

How do I run a script once and only once in Upstart?

I have a script that starts on desktop-session-start. The first person who logs in graphically after a boot will have this script called. I want it called once, not every time a person logs in. How ...
4
votes
4answers
4k views

Upstart script for a transmission-daemon executed as a normal user

I have done a script to start transmission-daemon as a normal user: start on filesystem stop on runlevel [!2345] respawn respawn limit 10 5 pre-start script test -x /usr/bin/transmission-daemon ...
4
votes
1answer
1k views

Starting a service from /etc/event.d works, but not from /etc/init

I'm trying to launch an upstart service on Ubuntu 8.04 from /etc/init/, but I always get start: Unknown job: job. When I try to launch this script from /etc/event.d/ it works fine. Why would this be ...
4
votes
1answer
2k views

upstart pre-stop killed during shutdown

I'm running Ubuntu server, hosting a virtual machine using an upstart job. I've got it launching on startup, and shutting down the host on exit, but I can't seem to get it to suspend when the host ...
4
votes
1answer
3k views

Why does upstart fail to start my juju service with Unknown job: juju-ubuntu-0?

I'm having issues launching juju on an lxc container through regular juju deploy commands: juju bootstrap juju deploy ubuntu The ubuntu juju status continually says pending. The LXC starts, and I ...
4
votes
2answers
502 views

A way for an Upstart event to be sent whenever ecryptfs homedir mounted/unmounted?

I have an encrypted homedir (ecryptfs) and I'm wanting to run a private mysql daemon with the database files in my homedir. The daemon should be started whenever the homedir is mounted, and stopped ...
4
votes
1answer
318 views

Is upstart a solid replacement for anacron yet?

Upstart FAQ says: Will Upstart replace cron, atd or anacron? Yes. A planned feature for Upstart is the ability to generate events at a particular scheduled time, regular scheduled time or ...
4
votes
3answers
2k views

Upstart tracking wrong PID of process - not respawning

I originally asked this question on StackOverflow. Then realised that this is probably a better place. I have bluepill setup to monitor my delayed_job processes. (Ruby On Rails application) Using ...
4
votes
2answers
2k views

How I can run ubuntu in chroot on Android?

I want to run fully functional Ubuntu on my Android device in chroot. But I have some trouble with upstart. In chroot "it will actually run /sbin/telinit", so how i can run upstart or replace it with ...
4
votes
1answer
1k views

reliably restarting services using upstart or runit

I want to reliably restart my app and web server processes on crash. If I understand correctly, runit starts every service as a child process. If the child process crashes this sends a signal to the ...
4
votes
1answer
132 views

About dbus-daemon's activation parameter

I'm using Ubuntu12.04 LTS. I saw following line in /etc/init.d/dbus.conf. exec dbus-daemon --system --fork --activation=upstart And I saw the man page for dbus-daemon, and then found the ...
3
votes
4answers
652 views

How does rc job work / order of (contradicting) “start on …” and “stop on …” stanzas

I just can't understand how Upstart's rc job definition in Natty 11.04 works. To illustrate the problem, here is the definition (empty lines and comments are left out): start on runlevel [0123456] ...
3
votes
2answers
4k views

Running commands on boot in 11.10

So I am getting properly confused on how to create a startup script on my Ubuntu 11.10 server. I have read about init-scripts, upstart-jobs and more, but I get even more confused the more I read. ...
3
votes
1answer
4k views

Why the services do not start at installation?

I've seen this sometime now, but not finding anything in the ubuntu man about this peculiar policy-rc.d binary that prevents services from being started/restarted/stopped when called by dpkg/apt, so I ...
3
votes
2answers
269 views

What happens to manual Upstart services on shut down?

If using the manual keyword in an init or override Upstart script, it is not clear whether the services shut down process will be initiated or it will just be killed on shut down. For instance, will ...
3
votes
1answer
384 views

Why does mysql process starts on boot?

As you can see, mysql exists only in the /etc/init.d directory and not in /etc/rcN.d, therefore it shouldn't start on boot. $ sudo find /etc -regex ".*\(rc.*d\|init\.d\).*" | sudo grep "mysql" | sort ...
3
votes
3answers
107 views

How do I create a single-execution Upstart job guaranteed to complete before two other jobs begin?

How does one write an Upstart task that is guaranteed to run only once after each startup but is also guaranteed to run to completion before either one of at least two other jobs start running. I do ...
3
votes
1answer
343 views

Simplest way to make a command run after system reboot

I have a server which exists to run one little Django application. If the server reboots, I want Django to start again: nohup /opt/myapp/manage.py runserver ... I'm having trouble finding a simple ...
3
votes
5answers
23k views

After Upgrading to 12.04 I can't get to the login screen

I cannot go pass the black screen and the following shows up on my screen after upgrading and rebooting with the Ubuntu update manager from 11.10 to 12.04: ata_id [27]: HDIO_GET_IDENTITY failed for ...
3
votes
1answer
993 views

Where are Upstart log messages on Ubuntu 13.X?

On Ubuntu 12.04, I can find Upstart log messages in /var/log/syslog. Commands: # initctl log-priority info # initctl emit hello Log: Apr 1 01:56:56 precise64 kernel: [ 8365.820425] init: ...
3
votes
2answers
2k views

How To Launch GUI App With Upstart Script

I have a python gtk app I need to run when a user logs in. I can't get upstart to launch any gui app, even if x is running. When I'm signed into X, and I emit the event from the upstart script below ...
3
votes
2answers
1k views

Why is this laptop taking almost 1 minute to boot Ubuntu 13.04?

My dad's new HP Pavilion dv6 laptop running Ubuntu 13.04 takes almost a minute to boot up - it seems like it's hanging somewhere. Is there something I can do to easily fix it? I need some help ...