Questions tagged [upstart]
Upstart is an event-based replacement for the traditional init daemon used to perform tasks when the computer is started.
                                	
	upstart
    
                            
                        
                    
            546
            questions
        
        
            79
            votes
        
        
            13
            answers
        
        
            119k
            views
        
    A better way to restart/reload Gunicorn (via Upstart) after 'git pull'ing my Django projects
                Im looking for something better than sudo restart projectname every time I issue a git pull origin master, which pulls down my latest changes to a Django project. This restart command, I believe, is ...
            
        
       
    
            54
            votes
        
        
            2
            answers
        
        
            14k
            views
        
    Is there benefit to using Monit instead of a basic Upstart setup?
                I'm configuring my server to run node.js as a daemon. I've setup Upstart to handle startup and shutdown of node, which works wonderfully. The next step is to make sure that node.js is restarted if it ...
            
        
       
    
            53
            votes
        
        
            14
            answers
        
        
            84k
            views
        
    How to configure Jenkins to run on port 80
                I'm running Ubuntu 11.10 and have run sudo apt-get install jenkins to install Jenkins on this system.
I've seen some tutorials on how to setup a reverse proxy (Apache, Nginx, etc), however this is a ...
            
        
       
    
            44
            votes
        
        
            3
            answers
        
        
            37k
            views
        
    Daemon vs Upstart for python script
                I have written a module in Python and want it to run continuously once started and need to stop it when I need to update other modules. I will likely be using monit to restart it, if module has ...
            
        
       
    
            43
            votes
        
        
            4
            answers
        
        
            86k
            views
        
    how to automatically restart a node server?
                We are finishing development of a project, the client is already using it but occasionally some errors occur - crashing the server.
I know I could register a service as 'upstart' script on linux, in ...
            
        
       
    
            34
            votes
        
        
            2
            answers
        
        
            35k
            views
        
    Ubuntu, upstart, and creating a pid for monitoring
                Below is a upstart script for redis.  How to I create a pid so I use monit for monitoring?
#!upstart
description "Redis Server"
env USER=redis
start on startup
stop on shutdown
respawn
exec sudo -...
            
        
       
    
            31
            votes
        
        
            2
            answers
        
        
            9k
            views
        
    why can't upstart run 'source bin/activate'?
                upstart won't activate my virtualenv for some reason.
This is how I run it
script
    # My startup script, plain old shell scripting here.
    cd path/to/env
    source bin/activate
    ....
end ...
            
        
       
    
            31
            votes
        
        
            3
            answers
        
        
            39k
            views
        
    upstart logging output enabled
                Except doing explicit logging instructions like suggested in http://upstart.ubuntu.com/wiki/Debugging, is there a way to enable output of what is happening with upstart?
What event is raised
What ...
            
        
       
    
            31
            votes
        
        
            10
            answers
        
        
            61k
            views
        
    How to set a global nofile limit to avoid "many open files" error?
                I have a websocket service. it's strage that have error:"too many open files", but i have set the system configure:
/etc/security/limits.conf
*               soft    nofile          65000
*           ...
            
        
       
    
            30
            votes
        
        
            4
            answers
        
        
            14k
            views
        
    Restarting Upstart instance processes
                I am running multiple instances of a worker as described in this answer: Starting multiple upstart instances automatically
Question: Can I restart all instances at once?
To start my workers I can do:...
            
        
       
    
            28
            votes
        
        
            9
            answers
        
        
            52k
            views
        
    DOCKER_OPTS do not work in config file /etc/default/docker
                I have changed /etc/default/docker with DOCKER_OPTS="-H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock" (docker version 1.4.1 in ubuntu 14.04), but it do not take any effect for me (not listening ...
            
        
       
    
            28
            votes
        
        
            1
            answer
        
        
            12k
            views
        
    Starting multiple upstart instances automatically
                We use PHP gearman workers to run various tasks in parallel.  Everything works just fine, and I have silly little shell script to spin them up when I want them.  Being a programmer (and therefore lazy)...
            
        
       
    
            27
            votes
        
        
            4
            answers
        
        
            26k
            views
        
    Upstart env stanza not setting environment variables (like NODE_ENV) for Node.js application
                I have an Upstart script for my server that looks like this:
description "myapp node.js server"
start on runlevel [2345]
stop on shutdown
env NODE_ENV=production
env CUSTOM=somevalue
exec sudo -u ...
            
        
       
    
            25
            votes
        
        
            1
            answer
        
        
            9k
            views
        
    What is the difference between Upstart and Supervisord? [closed]
                Are Upstart and Supervisord interchangeable?  Do they work together?  I am looking to run a python program as root when my system (debian) boots.  After the boot, I would like the process manager to ...
            
        
       
    
            21
            votes
        
        
            6
            answers
        
        
            37k
            views
        
    MongoDB - Permission denied for socket: /tmp/mongodb-27017.sock
                I had an unclean shutdown of MongoDB on Ubuntu 10.04 LTS. Now when I login as root and run Mongodb via service mongodb start, I get below error- 
Mon Dec 12 13:53:15 [initandlisten] ERROR: listen(): ...
            
        
       
    
            19
            votes
        
        
            1
            answer
        
        
            10k
            views
        
    How to use foreman to export to upstart?
                I am trying to export my application to another process management format/system (specifically, upstart). In doing so, I have come across a number of roadblocks, mostly due to lacking documentation.
...
            
        
       
    
            19
            votes
        
        
            1
            answer
        
        
            8k
            views
        
    Can upstart expect/respawn be used on processes that fork more than twice?
                I am using upstart to start/stop/automatically restart daemons. One of the daemons forks 4 times. The upstart cookbook states that it only supports forking twice. Is there a workaround?
How it fails
...
            
        
       
    
            19
            votes
        
        
            2
            answers
        
        
            5k
            views
        
    Setting memory consumption limits with Upstart
                I've recently become quite fond of Upstart. Previously I've been using God, Monit and Bluepill but I don't really like these solutions so I'm giving Upstart a try.
I've been using the Foreman gem to ...
            
        
       
    
            15
            votes
        
        
            2
            answers
        
        
            10k
            views
        
    How to write an Ubuntu Upstart job for Celery (django-celery) in a virtualenv
                I really enjoy using upstart. I currently have upstart jobs to run different gunicorn instances in a number of virtualenvs. However, the 2-3 examples I found for Celery upstart scripts on the ...
            
        
       
    
            14
            votes
        
        
            2
            answers
        
        
            9k
            views
        
    Upstart node.js working directory
                Starting Node.js with Upstart, when trying to access files within Node.js it cannot access them without using the full path. I need it to use the working directory.
start on startup
stop on shutdown
...
            
        
       
    
            14
            votes
        
        
            3
            answers
        
        
            15k
            views
        
    UpStart initctl start|restart ubuntu
                When using upstart on ubuntu how do I issue a command for starting a job if not running and restarting if already running. When deploying an app to a new node the job is not defined.
initctl restart ...
            
        
       
    
            13
            votes
        
        
            4
            answers
        
        
            11k
            views
        
    Node.js upstart vs forever
                I am looking to daemonize my Node.js application. What's the difference between upstart and forever? Also, are there other packages I might want to considering looking at?
            
        
       
    
            13
            votes
        
        
            1
            answer
        
        
            14k
            views
        
    Increase max open files for Ubuntu/Upstart (initctl)
                This is on an Ubuntu 12.04.3 LTS server.
I've added the following to /etc/security/limits.conf (my Golang processes run as root):
*      hard   nofile   50000
*      soft   nofile   50000
root   ...
            
        
       
    
            13
            votes
        
        
            1
            answer
        
        
            5k
            views
        
    Need help running Python app as service in Ubuntu with Upstart
                I have written a logging application in Python that is meant to start at boot, but I've been unable to start the app with Ubuntu's Upstart init daemon.  When run from the terminal with sudo /usr/local/...
            
        
       
    
            12
            votes
        
        
            6
            answers
        
        
            8k
            views
        
    ubuntu: start (upstart) second instance of mongodb
                the standard upstart script that comes with mongodb works fine:
# Ubuntu upstart file at /etc/init/mongodb.conf
limit nofile 20000 20000
kill timeout 300 # wait 300s between SIGTERM and SIGKILL.
...
            
        
       
    
            12
            votes
        
        
            1
            answer
        
        
            19k
            views
        
    Upstart: Job failed to start
                EDIT
status marybaked yields
marybaked stop/waiting
Here is the output of /var/log/syslog :
May  3 16:24:39 marybakedpdx kernel: [ 3464.189563] init: Failed to spawn marybakedpdx main process: ...
            
        
       
    
            12
            votes
        
        
            1
            answer
        
        
            3k
            views
        
    initctl too old upstart check
                I am trying to do a syntax check on an upstart script using init-checkconf. However when I run it, it returns ERROR: version of /sbin/initctl too old.
I have no idea what to do, I have tried ...
            
        
       
    
            12
            votes
        
        
            5
            answers
        
        
            6k
            views
        
    How can I get an upstart script to properly manage running a docker image?
                I have a local docker-registry that I'd like to manage with upstart.
I have the following script (in /etc/init/docker-registry.conf):
description "docker registry" 
author "me" 
...
            
        
       
    
            11
            votes
        
        
            2
            answers
        
        
            15k
            views
        
    Upstart script for node.js app
                I'm having trouble starting an Upstart script.
Here's the script (app.conf in /etc/init/)
description "node.js server"
author      "kvz"
start on startup
stop on shutdown
script
   # We found $...
            
        
       
    
            11
            votes
        
        
            2
            answers
        
        
            2k
            views
        
    What's the proper way to run some Python code asynchronously?
                I needed to send mail from my plain Flask app, so I thought the simplest way would be to send it using smtplib. But I had to do it asynchronously - you can't just insert a 3 second delay into the ...
            
        
       
    
            11
            votes
        
        
            1
            answer
        
        
            18k
            views
        
    Running bash script in upstart .conf script
                I would like run my bash script (kvm_manage) in startup, and it doesnt work. Here is my upstart .conf script:
      description "kvm start skript"
      start on local-filesystem
      stop on ...
            
        
       
    
            10
            votes
        
        
            3
            answers
        
        
            13k
            views
        
    How to set environment variable in pre-start in Upstart script?
                We have a custom C++ daemon application that forks once. So we've been doing this in our Upstart script on Ubuntu 12.04 and it works perfectly:
expect fork
exec /path/to/the/app
However now we need ...
            
        
       
    
            10
            votes
        
        
            1
            answer
        
        
            20k
            views
        
    uwsgi upstart on amazon linux
                I created a uwsgi file following this tutorial https://uwsgi.readthedocs.org/en/latest/Upstart.html on amazon linux. Though It doesn't seem to run as Nginx just says bad gateway. If I run the 
/etc/...
            
        
       
    
            10
            votes
        
        
            1
            answer
        
        
            4k
            views
        
    Gunicorn and Django with Upstart and Nginx
                First of all I have many Django instances setup and running like this.
In each project I have a script.sh shell script that starts gunicorn etc.:
 #!/bin/bash
  set -e
  LOGFILE=/var/log/gunicorn/...
            
        
       
    
            9
            votes
        
        
            3
            answers
        
        
            23k
            views
        
    Run python script as daemon at boot time (Ubuntu)
                I've created small web server using werkzeug and I'm able to run it in usual python way with python my_server.py. Pages load, everything works fine. Now I want to start it when my pc boots. What's the ...
            
        
       
    
            9
            votes
        
        
            1
            answer
        
        
            7k
            views
        
    Can upstart's "service start" be used inside a cron job?
                TLDR; Is it possible to create a cron job that runs service
  service_name start? How?
Content of my
sudo crontab -e
is:
45 23 * * * service bormarise_celery_daemon start
This runs normally on ...
            
        
       
    
            9
            votes
        
        
            2
            answers
        
        
            16k
            views
        
    Running services (upstart/init.d) in a container
                I'm trying to launch a system in docker that has many init and upstart services and I get this error.
initctl: Unable to connect to Upstart:
Failed to connect to socket /com/ubuntu/upstart: ...
            
        
       
    
            9
            votes
        
        
            1
            answer
        
        
            4k
            views
        
    Using Upstart to manage Unicorn w/ rbenv + bundler binstubs w/ ruby-local-exec shebang
                Alright, this is melting my brain. It might have something to do with the fact that I don't understand Upstart as well as I should. Sorry in advance for the long question.
I'm trying to use Upstart ...
            
        
       
    
            9
            votes
        
        
            2
            answers
        
        
            3k
            views
        
    What are the advantages and disadvantages of using the upstart script or forever script in a context of running node.js scripts ??
                I am a node.js developer. I use Amazon ec2 to deploy my node.js apps. 
I want to have my node.js service running permanently - restarted if it fails for any reason.
I came across 2 tools . Forever ...
            
        
       
    
            9
            votes
        
        
            1
            answer
        
        
            1k
            views
        
    Upstart task hangs after it finishes successfully
                I've got an Upstart task that starts multiple instances of a service based on Starting multiple upstart instances automatically and Restarting Upstart instance processes. It's working and it starts ...
            
        
       
    
            8
            votes
        
        
            7
            answers
        
        
            11k
            views
        
    How to keep node app running?
                I've finally finished converting one of my projects to use Node.JS, but now I'm having problems keeping my app running on the server :/ The problem is that if I close my putty session Node just stops.
...
            
        
       
    
            8
            votes
        
        
            2
            answers
        
        
            14k
            views
        
    Upstart calling script (for inserted USB-drive)
                I know that Ubuntu (and Fedora) uses Upstart istead of the classical System V init daemon (SysVinit).
I would like to know how to detect when a USB-drive has been inserted, mount it and copy some ...
            
        
       
    
            8
            votes
        
        
            2
            answers
        
        
            2k
            views
        
    Upstart stop if running
                I have a Jenkins job to stop a node application, deploy code, and start the application.
The start/stop is done with an Upstart script.
I use initctl stop node-App
If the job is running, this works ...
            
        
       
    
            8
            votes
        
        
            2
            answers
        
        
            369
            views
        
    How to limit the number of instances UpStart can simultaneously start or respawn
                I have a UpStart service job that has many (~100) instance that need to be started. Each of them is a resource-heavy process that does a lot of disk reading/writing during startup. When all of them ...
            
        
       
    
            8
            votes
        
        
            3
            answers
        
        
            1k
            views
        
    Timestamps in upstart logs
                I'm using upstart on Ubuntu to manage services.  It writes to /var/log/upstart/<service>.log.  Errors in this file don't have timestamps, which makes it difficult to diagnose problems.  
Is ...
            
        
       
    
            8
            votes
        
        
            1
            answer
        
        
            4k
            views
        
    Ubuntu docker container with upstart and syslog
                After searching around, I'm still confused whether you can have a docker container running Ubuntu with a working init system (upstart) and syslog, or not.
I know docker containers are meant for ...
            
        
       
    
            8
            votes
        
        
            2
            answers
        
        
            5k
            views
        
    Upstart / init script not working
                I'm trying to create a service / script to automatically start and controll my nodejs server, but it doesnt seem to work at all.
First of all, I used this source as main reference http://kvz.io/blog/...
            
        
       
    
            7
            votes
        
        
            2
            answers
        
        
            4k
            views
        
    start-stop-daemon error (Exec format error)
                This command is part of an upstart script, which used to work in ubuntu 12.04, 10.04.
  sudo  start-stop-daemon --start --make-pidfile --pidfile /var/run/mk_order_handler.pid --chuid ubuntu --exec  /...
            
        
       
    
            7
            votes
        
        
            5
            answers
        
        
            3k
            views
        
    Upstart init is leaking memory, how do you debug it?
                I've got a memory leak in Upstart init process (pid 1), what options I have on debugging it?
EDIT: Suggest me some real tools for this, manually putting printfs or calculating memory allocations by ...
            
        
       
    
            7
            votes
        
        
            3
            answers
        
        
            15k
            views
        
    running node.js server using upstart causes 'terminated with status 127' on 'ubuntu 10.04'
                i have written an upstart script for ubuntu to launch my node.js server manually or on startup. But it always terminates with status 127 and i can't find more information about what is going wrong. If ...