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.
284
questions
1
vote
6
answers
15k
views
isc-dhcp-server doesn't start automatically
Running on Astra Linux 1.3, my dhcp service (isc-dhcp-server) is well-configured now and work as expected with a slight nuance - it works only when it's started, but a system don't run it at startup. ...
2
votes
2
answers
4k
views
Autossh error with upstart script: ssh exited prematurely with status 0 [closed]
I have set up the following upstart script:
# autossh
description "autossh connections"
start on started dbus
stop on (runlevel [06] or stopped dbus)
respawn
respawn limit 5 60 # ...
8
votes
7
answers
18k
views
Restarting MongoDB automatically if it crashes
I am running MongoDB on an Ubuntu server. It's using an upstart script to start mongod when the machine boots. I noticed that if the process crashes, it doesn't get restarted.
How can I make sure ...
0
votes
1
answer
2k
views
How can I use /usr/bin/xvfb-run in an upstart start-stop-daemon
Is this the correct syntax? It seems that Upstart is starting two instances of this daemon:
start on runlevel [2345]
stop on runlevel [06]
limit nofile 32768 32768
env DISPLAY=:0
respawn
script
...
0
votes
1
answer
2k
views
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'...
5
votes
1
answer
2k
views
Ubuntu upstart hangs on interactive start & stop
How do I get Ubuntu upstart to not hang on interactive start & stop?
I have created many upstart scripts that work fine during init, but often hang when I enter them at the console. If I CTRL+C ...
0
votes
1
answer
2k
views
Does upstart have a built in way to respawn a process that is not stopped using initctl stop in specific intervals?
We thought the following directives would try to respawn the process 10 times in 60 seconds (i.e. once every 6 seconds):
respawn
respawn limit 10 60
However these directives restart the process as ...
0
votes
1
answer
239
views
RemainAfterExit in Upstart
Is there an Upstart equivalent to systemd's RemainAfterExit?
I have an upstart task that exec's a script that completes quickly when the task is started. However, I would still like that task to ...
0
votes
1
answer
927
views
How to create a systemd "start all" template unit file from an upstart script with multiple services?
I'm in the process of migrating all custom upstart scripts to systemd. I've come across a script that utilizes multiple services. I cannot figure out the proper syntax to handle this, or if I need to ...
0
votes
2
answers
2k
views
Mongod stuck in stop/waiting on Ubuntu 14.04
I installed MongoDB on Ubuntu 14.04 as per the documentation. It runs and works fine, except that it mysteriously stops every few hours and requires a manual restart with service mongod restart to get ...
19
votes
1
answer
14k
views
Why isn't my upstart service listed in service --status-all
I created a bunch of upstart jobs for my services that I'm running on an Ubuntu 12.04. I can successfully start them and stop with with:
service my_service start
service my_service stop
but they are ...
0
votes
2
answers
699
views
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).
...
0
votes
1
answer
879
views
Running daemon as non-root user in Upstart script
I have an upstart script that runs a background daemon that I want to run as a specific non-root user.
The script is here:
How To Create a Calibre Ebook Server on Ubuntu
The relevant bit is here:
...
13
votes
2
answers
7k
views
How do I chose between upstart, runit, supervisor, daemontools, ... for restarting a process if it dies? (process supervision / monitoring)
I have a Nginx web proxy, gunicorn web server, and a python/flask web app. The Gunicorn process apparently died, and I want to ameliorate that in the future by looking into a utility that can monitor ...
1
vote
1
answer
451
views
Writing an upstart file which allows the user to input username and password
I'm trying to write an upstart file for OpenConnect. The task is pretty simple, but I'm stuck because I don't want to provide the username and password in a config file, but prompt the user to provide ...
1
vote
1
answer
474
views
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 ...
4
votes
1
answer
1k
views
Writing an upstart config file for Unicorn
I've had a good hunt and can't find a good example of an upstart script for Unicorn.
From what I've read however I think that upstart and unicorn might step on each others toes if I just try to set ...
0
votes
1
answer
105
views
Upstart - How to run cmd or script instead of respawn
I have a service process monitored by Upstart on Ubuntu.
If that process dies abnormally, I don't want to try to respawn it. Instead, I would like to throw a notification and shut down the entire ...
0
votes
1
answer
313
views
Cronjob for Upstart service not working
I have an Upstart init script that manages a python script on the server.
The pre-start and pre-stop scripts append a timestamped entry into a log file.
There is a cronjob to stop and start the ...
2
votes
0
answers
2k
views
How do I increase open file limit for nginx's master process on Ubuntu 14.04 LTS?
Not a dupe: This is not a duplicate of this question. I've already looked into that question. That helps with raising the limit for worker processes, but the nginx master process continues to retain ...
2
votes
1
answer
2k
views
sudo start my-project does not work
I'm using the following script in /etc/init/my-project.conf on my AWS instance.
description "start and stop the go program 'my-project'"
start on filesystem or runlevel [2345]
stop on runlevel [!...
0
votes
0
answers
2k
views
ubuntu nginx running twice -- cannot kill extra process
Fresh Ubuntu 12.04 instance running on Amazon EC2
got Nginx running with Passenger
added an upstart script
description "NGiNX starter"
start on (local-filesystems and runlevel [2345])
stop on ...
0
votes
1
answer
989
views
convert upstart to systemd - run command as root, spawns command off as another user
I need help with converting an upstart .conf into a systemd .service. Essentially what my .conf file does is this:
exec su -l foo -c 'cd /var/www/path/to/file ; bundle exec puma -C config/puma.rb'
As ...
3
votes
0
answers
568
views
Should I use systemd or docker-compose to keep Docker containers running on my systems?
We are talking about Docker containers as sysdig, consul, fluentd, mesos-slave, etc. that we are running on almost all machines.
Currently we are using Ubuntu's Upstart and CoreOS's Fleetctl. We're ...
0
votes
1
answer
3k
views
Starting iaxmodem and faxmodem with upstart
How can I use Upstart to start iaxmodem and faxgetty when I have multiple modems? Centos 6.4 has a nice warning as listed below which incites me to believe the standard inittab lines will not work.
# ...
4
votes
2
answers
2k
views
upstart pre-stop script
I have libvirt/KVM set up on my Ubuntu and before shutting down the machine I would like it to attempt shutting down the VM's using an ACPI poweroff (virsh shutdown), then I want it to stop shutdown ...
6
votes
2
answers
2k
views
Privileges when doing sudo to another domain user
Suppose I have a corporate domain mydomain using MS Active Directory.
In the domain I have the users myuser and youruser.
Now, on one specific Ubuntu machine mymachine, myuser has sudo rights, and ...
0
votes
1
answer
770
views
Upstart script doesn't work on boot - only manually
I followed this tutorial on setting up Flask with nginx + uwsgi.
I created an upstart script at /etc/init/flask-uwsgi.conf:
start on [2345]
stop on [06]
pre-start script
mkdir -p /var/run/flask-...
13
votes
1
answer
27k
views
systemd script for starting my app server - Unknown lvalue 'StartLimitIntervalSec' in section 'Unit'
I have a upstart configuration file as shown below which works fine in Ubuntu 14:
#/etc/init/data_server.conf
#sudo start data_server
#sudo stop data_server
#sudo status data_server
start on ...
-1
votes
1
answer
283
views
systemd script for starting my app server as soon as it is down or system is rebooted
I have a upstart configuration file as shown below which works fine in Ubuntu 14:
#/etc/init/data_server.conf
#sudo start data_server
#sudo stop data_server
#sudo status data_server
start on ...
0
votes
2
answers
3k
views
how to execute a script Rhel 7 at booting time?
I am trying to execute a shell script on RHEL7.1 when the machine starts. As in ubuntu, Upstart scripts (in /etc/init/) are used to execute any scripts or to start any services at boot time, is there ...
5
votes
3
answers
2k
views
How can I receive an email when an upstart monitored script respawns?
My upstart config looks something like this
start on filesystem
stop on runlevel S
respawn
exec /path/to/my/script
When this script dies and is respawned I would like to receive an email. Is this ...
11
votes
3
answers
7k
views
Upstart : start service after non-upstart process
On Ubuntu 10.04, I need to start my service with upstart, but only when mysql is up and running.
The problem is that mysql itself is not handled by upstart, so I can't use the "start on" feature.
...
2
votes
2
answers
20k
views
nc exits immediately, on connection, when run as an upstart job
I'm using the following /etc/init/jsonlog.conf upstart job:
description "jsonlog"
start on runlevel [23]
stop on runlevel [06]
respawn
script
cd /tmp
echo "about to listen"
/bin/nc -l ...
0
votes
1
answer
448
views
SSH crash on startup
My connection ssh to my VPS is not working anymore, i checked the auth.log file and found this :
auth.log
Jul 28 20:22:04 warp sshd[31257]: Accepted password for root from MY_IP port 49196 ssh2
Jul ...
1
vote
1
answer
541
views
Updating Upstart on Centos 6.3
I have a Centos 6.3 server -- alone among all my Ubuntu servers for historical reasons -- with Upstart 0.6.5. I need to update that upstart to at least 1.4, and I'd prefer to do it through yum instead ...
3
votes
1
answer
5k
views
Debian Jessie UpStart / Systemd / SysV no more reboot
I have make some test on a Jessie server with Upstart installation and replace it by SysV and the reverse.
After this I'm not anymore able to reboot.
root@amoo-001:~# reboot
Failed to talk to init ...
2
votes
1
answer
848
views
Why would one use "stop; exit 1" in an Upstart script rather than just "exit 1" in case of an error?
I am maintaining an Upstart script (version 0.6.5) and in the pre-start script, there's a test to terminate the service if a precondition is not met:
pre-start script
if [ ! -f $REQUIRED_FILE ]; ...
0
votes
0
answers
76
views
Which init system is main on particular system?
I have installed application with several init scripts as for dpkg -L application shows. For example:
/etc/init/application.conf
/etc/init.d/application
/usr/systemd/applaication.service
But i use ...
-1
votes
1
answer
7k
views
Python script stops responding when run for a long time
I am running a python script as a service in Ubuntu 11.10(using upstart for that). When started, the script runs fine and responds as expected. But after the script is running in background for long ...
12
votes
2
answers
14k
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 ...
0
votes
1
answer
147
views
How can I set the same set of environment variables for multiple upstart daemons?
I have a bunch of job/daemon configuration files, say:
/etc/init/service1.conf
/etc/init/service2.conf
/etc/init/service3.conf
Most of those jobs are quite similar, and the files are of a format ...
2
votes
1
answer
4k
views
Why does my Upstart job work with sudo but not with setuid?
I have an Upstart job for a Node.js application, and I want to make it run Node as the node user rather than root. When I use setuid in the job config, whenever I try to start the job, it says my-app ...
23
votes
6
answers
11k
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 double ...
37
votes
7
answers
34k
views
Logging a Daemon's Output with Upstart
I have a custom daemon that is managed by upstart on my Ubuntu server. It works perfectly except that I need to capture (log) the daemon's output. The official stanzas page says that I can use console ...
0
votes
1
answer
406
views
upstart and LD_LIBRARY_PATH
I am new to upstart and required to start a process through it. However I am getting error which is described below.
my script contents
description "Server"
author "Neeraj"
expect fork
respawn
...
1
vote
1
answer
42
views
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 ...
6
votes
3
answers
4k
views
cant get upstart script for node.js program to start on startup
I made a rather simple startup script for my node.js program that should run on startup:
start on startup
stop on shutdown
script
exec sudo -u max WEBSITES_DIR=/home/max/websites/ /usr/local/bin/...
0
votes
1
answer
816
views
Unknown Job Issue: Ubuntu Upstart Conf though syntax is ok
I am trying to run Apache Solr 4.10.4 as service in Ubuntu 14.04.
I have written the following upstart conf file :
sudo vim /etc/init/my-solr-job.conf
# my-solr - Search Backend Engine
description ...
1
vote
0
answers
276
views
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 ...