I am unable to get Upstart to recognize my new job. I've checked the upstart cookbook, as well as various questions on the matter, such as this one. All the checks pass, but initctl list
does not show my job. I've rebooted multiple times for good measure, too.
Here's the job description that I placed in /etc/init/jenkins-agent.conf
:
author "Jenkins-admin"
description "Jenkins agent"
start on local-filesystems and started networking
respawn
exec java -jar /home/jenkins/jenkins/Agent/agent.jar -jnlpUrl http://127.0.0.1:8087/jenkins/computer/Ubuntu%2064-bit/slave-agent.jnlp -secret d1ac22621ad4c460e5f8de4f393ed2702cdb2bea1d26b6f17230451a37a08e7e -workDir "/home/jenkins/jenkins"
init-checkconf /etc/init/jenkins-agent.conf
says:syntax ok
initctl check-config
only displays two warnings for one other .conf file. No warnings about my file.initctl list | grep jenkins
output is blank.sudo inictl
commands, likesudo inictl list
result in "initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused"
What else can I try? Tempted to forget upstart and just write an init.d
script which has always worked flawlessly for me, but I would like to figure it out since upstart is the new default way of running startup jobs.
init
vsinit.d
and was led to believeinit
is the new way andinit.d
is the old way. What a spectacular way to waste two hours, huh. Thanks. – Violet Giraffe Apr 16 '18 at 09:52init.d
was the old way andinit
the new way from ~10.04 - 14.10.init.d
andinit
are the old ways and systemd the new way from 15.04 - (present). – muru Apr 16 '18 at 09:55