I'm trying to run jenkins, via systemctl, and it keeps dying immediately after being started. There is nothing in the "systemctl status" nor in "journalctl". Jenkins logs also show nothing.
I've narrowed down the segment of code that starts the daemon. Inside the "daemon()" function in /etc/init.d/functions:
$cgroup $nice runuser -s /bin/bash $user -c "$corelimit 2>&1 ; $*"
When I print this out, it shows:
runuser -s /bin/bash jenkins -c ulimit -S -c 0 >/dev/null 2>&1 ; \
/etc/alternatives/java -Djava.awt.headless=true \
-Djenkins.install.runSetupWizard=false -DJENKINS_HOME=/var/lib/jenkins \
-jar /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log \
-webroot=/var/cache/jenkins/war --daemon --httpPort=8080 --debug=5 \
--handlerCountMax=100 --handlerCountMaxIdle=2
This runs fine when I manually run it from the CLI. It dies in less than a second when run through "daemon()" though.
This is running on Oracle Linux 7 UEK4 if that matters.
UPDATE: I tried the following scenarios:
1) systemctl start jenkins # FAILS
2) /etc/rc.d/init.d/jenkins start # FAILS
3) cp /etc/rc.d/init.d/jenkins /var/tmp; /var/tmp/jenkins start # SUCCESS
This is very strange...