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.
0
votes
1answer
16 views
Autossh error with upstart script: ssh exited prematurely with status 0
I have set up the following upstart script on my raspbmc:
# autossh
description "autossh connections"
start on started dbus
stop on (runlevel [06] or stopped dbus)
respawn
respawn limit 5 60 # ...
0
votes
1answer
57 views
Simple upstart script for nodejs + forever on Ubuntu
I'm using Ubuntu Sever 12.04. I have a nodejs application which I want to run like so:
NODE_ENV=production PORT=3001 APP_PATH=/var/www/myapp forever -a -l /var/www/myapp/forever.log -o ...
3
votes
3answers
70 views
chkconfig equivalent for upstart jobs on CentOS6
On RHEL6/CentOS6 what is the upstart way to:
chkconfig add my-svc
chkconfig my-svc on
Explanation:
I have written an /etc/init/xvc0.conf job. I can do
start xvc0
on the CLI, but after reboot ...
1
vote
0answers
36 views
Ubuntu Upstart Job to Persist tcp_slot_table_entries Before NFS Mount
NOTE: I'm aware of the question Persistent changes to /proc/sys/sunrpc/tcp_slot_table_entries and while this older question is quite similar, the selected and proposed answers do not work for us, nor ...
0
votes
1answer
28 views
Ubuntu - Upstart with a python script that start and finish their own processes
I'm trying to setup with Upstart a python script that launch several internal procs and kill them if is required with this sentences:
$ listener.py -startall
$ listener.py -killall
My Upstart file:
...
0
votes
0answers
25 views
upstart and python multiprocessing
I have a service running server Cherrypy engines using python's multiprocessing module. When run from the command line, the process spawns many subprocesses with differing PIDs.
root 6625 12.5 ...
0
votes
0answers
13 views
Upstart and openvpn
I need to have OpenVPN restart if it fails. Upstart with respawn seems the best way to do this, but after working through the example over here it seems that OpenVPN forks 14 times! Which means ...
0
votes
1answer
29 views
Upstart restart command doesn't load new updated job config (solr)
Here my upstart config for solr which is located under /etc/init/solr.conf
/etc/init/solr.conf
description "Starts Solr server"
respawn
start on startup solr_push
script
echo "Starting ...
0
votes
1answer
105 views
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.
...
0
votes
0answers
27 views
How can I manage the /etc/glusterd directory on Ubuntu diskless booting nodes?
I've setup several cluster nodes that boots from a main server (Ubuntu 12.04 diskless boot). Thus they share the same /etc/ folder.
Now I want to configure gluster to combine the physical disks of ...
0
votes
1answer
25 views
Use $HOSTNAME in upstart script
(Can|how do) I use $HOSTNAME in an Ubuntu upstart script like this:
start on started foo
stop on stopped foo
exec someexecutable -n "$HOSTNAME""_bb"
0
votes
2answers
74 views
Why need to use exec in upstart script?
I often see some upstart script has the to use exec, what is the point? Seems removing the exec the script also work?
e.g.
start on runlevel [2345]
stop on runlevel [06]
exec /path/to/program
0
votes
1answer
45 views
can't access sourced variables inside Upstart script stanzas
I'm trying to use the variables defined in /etc/environment in an upstart script.
I'm able to export the variable to the child process but for some reason I not able to use them in the upstart script ...
0
votes
1answer
78 views
Getting mysqld_multi to work with upstart
I used this guide to get started and this wiki page as a reference for the upstart script.
My problem is that when I do a service mysql start I get six processes instead of two, as if upstart ran ...
0
votes
0answers
32 views
specifying dependencies in upstart
It seems as if the accepted way to specify a dependency of service A on service B in upstart is to work in the reverse dependency direction: give service B a start on starting A stanza.
I'd like to ...
1
vote
1answer
70 views
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 ...
1
vote
0answers
82 views
RHEL 6 upstart 1.7 [closed]
I'm in the process of building some new servers for work though am having the problem of the version of upstart being too old to allow for user jobs (needs 1.3 or later).
Has anyone got any ...
2
votes
3answers
175 views
Upstart Job as Unprivileged user fails with permission denied
I'm trying to set up a Sage Cell Server (an open source mathematical engine) running as an unprivileged user. I've created the unprivileged user sagecell to do the job. It is installed correctly and, ...
1
vote
3answers
281 views
Upstart script vs. command-line: why this difference in behavior?
I'm trying to set up Tomcat to start with upstart. I find the following works:
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
...
1
vote
1answer
82 views
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:
# <file ...
1
vote
3answers
103 views
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 ...
3
votes
1answer
55 views
How to make upstart back off, rather than give up
I want Upstart to do two things:
stop trying to respawn a failed process so fast
never give up trying to respawn
In an ideal world, upstart would try to restart a dead process after 1s, then ...
0
votes
1answer
64 views
Move an LXC container to a dm-crypt/LUKS filesystem
I need to move a container to a different filesystem, specifically a subdir of an already mounted LUKS/dm-crypt home dir. I tried moving it there and then bind mounting or symlinking it to ...
0
votes
1answer
108 views
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 ...
1
vote
1answer
221 views
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 ...
0
votes
1answer
39 views
How to differentiate between start/stop/status in upstart
upstart has post-start, post-stop, etc... and script.
as i understood, the script part gets executed on initctl start X or initctl stop X or initctl status X.
so how do i know in script which one ...
2
votes
0answers
45 views
Upstart: Repeat a task as a service
I have a number of services in init.d that are simple one-line commands wrapped in a script that repeats every few seconds. The template for them looks like this:
e.g.
#!/bin/sh
autostart() {
...
1
vote
1answer
27 views
why does upstart start on not work as expected
i have two upstart scripts, and i want the second one to start after the first
this is what i have in the second one (dir/second):
start on (started runlevel [345] and dir/first)
stop on (stopped ...
1
vote
0answers
56 views
Is upstart for starting a service, and supervisord to monitor it?
Is there some overlap in functionality between upstart and supervisord?
I have a java process that I need to start at boot up, and also monitor this process to make sure it stays running (try and ...
0
votes
1answer
218 views
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 ...
3
votes
2answers
148 views
Why can't I run this python script as a job in ubuntu 12.04?
Normally I do this:
cd /home/ubuntu/project/beta
python default.py -dev
In order to start the web.py server
I would prefer to do this:
sudo start beta
Here is my /etc/init/beta.conf
setuid ...
1
vote
1answer
135 views
Do we need to explicitly pass php.ini's location to php-fpm?
I am seeing a strange issue where my php.ini is not used if I do not explicitly pass it to php-fpm when starting it.
This is the upstart script I am using:
start on (filesystem and net-device-up ...
1
vote
1answer
195 views
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 ...
0
votes
1answer
46 views
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
...
0
votes
0answers
45 views
Installing upstart scripts as non-root
We have scripts that remotely install our applications to Redhat servers. Due to security policy these scripts must log in as a non-root user. I'd like to update the scripts to install upstart ...
0
votes
2answers
55 views
upstart - Execute a specific command only on system startup and not on application startup
I'm new to upstart, and I would like to know if there's a way to tell upstart to execute a specific command only at system startup, and not when the application is subsequently restarted from the ...
1
vote
1answer
300 views
Run Python script at startup using upstart
I'm trying to create an upstart script to run a python script on startup. In theory it looks simple enough but I just can't seem to get it to work. I'm using a skeleton script I found here and ...
0
votes
1answer
103 views
Upstart won't reload it's configuration
I have a service I'm trying to write an upstart script for and it's not going too well. At some point, I decided I needed a fresh start and removed the upstart configuration file.
stop myservice
rm ...
1
vote
1answer
690 views
upstart does not see my job
in Ubuntu 12.10
user@xyz:~$ sudo initctl --version
initctl (upstart 1.5)
Copyright (C) 2012 Scott James Remnant, Canonical Ltd.
This is free software; see the source for copying conditions. There ...
1
vote
0answers
114 views
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 ...
0
votes
1answer
128 views
Upstart can't determine my process' pid
I'm writing an upstart script for a small service I've written for my colleagues. My upstart job can start the service, but when it does it only outputs queryqueue start/running; note the lack of a ...
1
vote
0answers
113 views
Nginx and NSD3 don't start on boot because they cannot use the assigned IP
Server is a Xen VPS running Ubuntu 12.04 and neither nginx nor NSD3 come up after reboot. The apparent reason for that is that they're not able to bind to their assigned IP addresses right after boot, ...
2
votes
1answer
137 views
RHEL 6 Upstart User Jobs
Does RHEL6 support upstart user jobs?
I modified /etc/dbus-1/system.d/Upstart.conf and added a policy section for my username. I then created ~/init.d/userjob.conf.
When I do inictrl list it ...
0
votes
2answers
101 views
Upstart job (haproxy)
I am starting HA proxy using the following command:
sudo etc/init.d/haproxy start
and I stop HA proxy using:
sudo etc/init.d/haproxy stop
How can I write a basic upstart script for sudo ...
1
vote
1answer
65 views
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 ...
0
votes
1answer
149 views
Upstart Script for haproxy
I am new to HA Proxy and Upstart Scripting. I am using, HA Proxy version 1.4.18 2011/09/16. I am trying to write an upstart script that will keep haproxy alive in case haproxy dies. This is what I ...
0
votes
1answer
110 views
Upstart - run a command as another user while preserving /etc/environment
G'day,
I'm trying to run a command/service on startup with Upstart as a non-privileged user, while preserving /etc/environment.
I had some luck in a shell with
exec sudo -u user1 -i "/usr/bin/foo ...
0
votes
1answer
421 views
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 ...
2
votes
1answer
809 views
upstart: initctl: Unknown job
I have a job that's perfectly normal:
> start c4-ha-policy ; stop c4-ha-policy
c4-ha-policy (start) waiting
c4-ha-policy (start) starting
c4-ha-policy (start) pre-start, process 1731
c4-ha-policy ...
3
votes
1answer
168 views
Why is upstart eating all of my RAM?
I'm running Ubuntu Server 12.04 LTS in EC2. I have several node.js daemons running as services under upstart, along with the usual init stuff. After every deploy, during which all the node.js daemons ...
