[GH-ISSUE #23] Jenkins service is not able to start up #8

Closed
opened 2026-03-03 13:58:15 +03:00 by kerem · 25 comments
Owner

Originally created by @joharkwan on GitHub (Apr 5, 2018).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/23

Hi,

After the OS is harden and reboot. my Jenkins service never able to start up either during boot time or using systemd to start. Please see below for more information.
I did try to disable auditd, aide and apparmor but it did not help. any suggestion will much appreciate.
Thank you so much

jkwan@ubuntu:~$ ps -ef | grep -i jenkins 
jkwan     1977  1964  0 19:08 pts/0    00:00:00 grep --color=auto -i jenkins

jkwan@ubuntu:~$ uptime 
 19:08:17 up 2 min,  2 users,  load average: 0.26, 0.35, 0.16

jkwan@ubuntu:~$ uptime 
 19:08:21 up 2 min,  2 users,  load average: 0.26, 0.35, 0.16

jkwan@ubuntu:~$ ps -ef | grep -i jenkins 
jkwan     1982  1964  0 19:08 pts/0    00:00:00 grep --color=auto -i jenkins


jkwan@ubuntu:~$ sudo systemctl start jenkins.service 
[sudo] password for jkwan: 
Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
jkwan@ubuntu:~$ sudo systemctl status jenkins.service
● jenkins.service - LSB: Start Jenkins at boot time
   Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2018-04-05 19:08:44 +08; 12s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1987 ExecStart=/etc/init.d/jenkins start (code=exited, status=7)

Apr 05 19:08:43 ubuntu jenkins[1987]:  * Starting Jenkins Automation Server jenkins
Apr 05 19:08:43 ubuntu su[2007]: pam_tally(su:account): unknown option: reset
Apr 05 19:08:43 ubuntu su[2007]: Successful su for jenkins by root
Apr 05 19:08:43 ubuntu su[2007]: + ??? root:jenkins
Apr 05 19:08:43 ubuntu su[2007]: pam_unix(su:session): session opened for user jenkins by (uid=0)
Apr 05 19:08:44 ubuntu jenkins[1987]:    ...fail!
Apr 05 19:08:44 ubuntu systemd[1]: jenkins.service: Control process exited, code=exited status=7
Apr 05 19:08:44 ubuntu systemd[1]: Failed to start LSB: Start Jenkins at boot time.
Apr 05 19:08:44 ubuntu systemd[1]: jenkins.service: Unit entered failed state.
Apr 05 19:08:44 ubuntu systemd[1]: jenkins.service: Failed with result 'exit-code'.

jkwan@ubuntu:~$ sudo journalctl -xe
Apr 05 19:08:56 ubuntu audit: PATH item=1 name="/lib64/ld-linux-x86-64.so.2" inode=390623 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL
Apr 05 19:08:56 ubuntu audit: PROCTITLE proctitle=7375646F0073797374656D63746C00737461747573006A656E6B696E732E73657276696365
Apr 05 19:08:56 ubuntu sudo[2033]:    jkwan : TTY=pts/0 ; PWD=/home/jkwan ; USER=root ; COMMAND=/bin/systemctl status jenkins.service
Apr 05 19:08:56 ubuntu audit[2033]: USER_CMD pid=2033 uid=1000 auid=1000 ses=2 msg='cwd="/home/jkwan" cmd=73797374656D63746C20737461747573206A656E6B696E732E73657276696365 terminal=pts/0 res=success'
Apr 05 19:08:56 ubuntu audit[2033]: CRED_REFR pid=2033 uid=0 auid=1000 ses=2 msg='op=PAM:setcred acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Apr 05 19:08:56 ubuntu sudo[2033]: pam_unix(sudo:session): session opened for user root by jkwan(uid=0)
Apr 05 19:08:56 ubuntu audit[2034]: SYSCALL arch=c000003e syscall=83 success=no exit=-17 a0=40173c a1=1c9 a2=0 a3=1e5 items=1 ppid=2033 pid=2034 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000
Apr 05 19:08:56 ubuntu audit: CWD cwd="/home/jkwan"
Apr 05 19:08:56 ubuntu audit: PATH item=0 name="/tmp/" inode=2 dev=00:25 mode=041777 ouid=0 ogid=0 rdev=00:00 nametype=PARENT
Apr 05 19:08:56 ubuntu audit: PROCTITLE proctitle="/sbin/pam-tmpdir-helper"
Apr 05 19:08:56 ubuntu audit[2034]: SYSCALL arch=c000003e syscall=83 success=no exit=-17 a0=211a0b0 a1=1c0 a2=0 a3=0 items=1 ppid=2033 pid=2034 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 
Apr 05 19:08:56 ubuntu audit: CWD cwd="/home/jkwan"
Apr 05 19:08:56 ubuntu audit: PATH item=0 name="/tmp/user/" inode=10 dev=00:25 mode=040711 ouid=0 ogid=0 rdev=00:00 nametype=PARENT
Apr 05 19:08:56 ubuntu audit: PROCTITLE proctitle="/sbin/pam-tmpdir-helper"
Apr 05 19:08:56 ubuntu audit[2033]: USER_START pid=2033 uid=0 auid=1000 ses=2 msg='op=PAM:session_open acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Apr 05 19:08:56 ubuntu audit[2035]: SYSCALL arch=c000003e syscall=59 success=yes exit=0 a0=5622c89784a8 a1=5622c896f168 a2=5622c8988aa0 a3=5622c898e000 items=2 ppid=2033 pid=2035 auid=1000 uid=0 gid=0 euid=0 sui
Apr 05 19:08:56 ubuntu audit: EXECVE argc=3 a0="systemctl" a1="status" a2="jenkins.service"
Apr 05 19:08:56 ubuntu audit: CWD cwd="/home/jkwan"
Apr 05 19:08:56 ubuntu audit: PATH item=0 name="/bin/systemctl" inode=151444 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL
Apr 05 19:08:56 ubuntu audit: PATH item=1 name="/lib64/ld-linux-x86-64.so.2" inode=390623 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL
Apr 05 19:08:56 ubuntu audit: PROCTITLE proctitle=73797374656D63746C00737461747573006A656E6B696E732E73657276696365
Apr 05 19:08:57 ubuntu sudo[2033]: pam_unix(sudo:session): session closed for user root
Apr 05 19:08:57 ubuntu audit[2033]: USER_END pid=2033 uid=0 auid=1000 ses=2 msg='op=PAM:session_close acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Apr 05 19:08:57 ubuntu audit[2033]: CRED_DISP pid=2033 uid=0 auid=1000 ses=2 msg='op=PAM:setcred acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Apr 05 19:08:58 ubuntu audit[1406]: SYSCALL arch=c000003e syscall=159 success=yes exit=5 a0=7f6fd8ef2bb0 a1=0 a2=862 a3=39fe6f46d items=0 ppid=1 pid=1406 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 
Apr 05 19:08:58 ubuntu audit: PROCTITLE proctitle="/usr/sbin/VBoxService"
Apr 05 19:09:08 ubuntu audit[2037]: SYSCALL arch=c000003e syscall=59 success=yes exit=0 a0=d0de48 a1=e03248 a2=de9008 a3=598 items=2 ppid=1964 pid=2037 auid=1000 uid=1000 gid=1000 euid=0 suid=0 fsuid=0 egid=1000
Apr 05 19:09:08 ubuntu audit: BPRM_FCAPS fver=0 fp=0000000000000000 fi=0000000000000000 fe=0 old_pp=0000000000000000 old_pi=0000000000000000 old_pe=0000000000000000 new_pp=0000003fffffffff new_pi=000000000000000
Apr 05 19:09:08 ubuntu audit: EXECVE argc=3 a0="sudo" a1="journalctl" a2="-xe"
Apr 05 19:09:08 ubuntu audit: CWD cwd="/home/jkwan"
Apr 05 19:09:08 ubuntu audit: PATH item=0 name="/usr/bin/sudo" inode=386 dev=fc:00 mode=0104755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL
Apr 05 19:09:08 ubuntu audit: PATH item=1 name="/lib64/ld-linux-x86-64.so.2" inode=390623 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL
Apr 05 19:09:08 ubuntu audit: PROCTITLE proctitle=7375646F006A6F75726E616C63746C002D7865
Apr 05 19:09:08 ubuntu sudo[2037]:    jkwan : TTY=pts/0 ; PWD=/home/jkwan ; USER=root ; COMMAND=/bin/journalctl -xe
Apr 05 19:09:08 ubuntu audit[2037]: USER_CMD pid=2037 uid=1000 auid=1000 ses=2 msg='cwd="/home/jkwan" cmd=6A6F75726E616C63746C202D7865 terminal=pts/0 res=success'
Apr 05 19:09:08 ubuntu audit[2037]: CRED_REFR pid=2037 uid=0 auid=1000 ses=2 msg='op=PAM:setcred acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Apr 05 19:09:08 ubuntu sudo[2037]: pam_unix(sudo:session): session opened for user root by jkwan(uid=0)
Apr 05 19:09:08 ubuntu audit[2038]: SYSCALL arch=c000003e syscall=83 success=no exit=-17 a0=40173c a1=1c9 a2=0 a3=1e5 items=1 ppid=2037 pid=2038 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000
Apr 05 19:09:08 ubuntu audit: CWD cwd="/home/jkwan"
Apr 05 19:09:08 ubuntu audit: PATH item=0 name="/tmp/" inode=2 dev=00:25 mode=041777 ouid=0 ogid=0 rdev=00:00 nametype=PARENT
Apr 05 19:09:08 ubuntu audit: PROCTITLE proctitle="/sbin/pam-tmpdir-helper"
Apr 05 19:09:08 ubuntu audit[2038]: SYSCALL arch=c000003e syscall=83 success=no exit=-17 a0=afd0b0 a1=1c0 a2=0 a3=0 items=1 ppid=2037 pid=2038 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 f
Apr 05 19:09:08 ubuntu audit: CWD cwd="/home/jkwan"
Apr 05 19:09:08 ubuntu audit: PATH item=0 name="/tmp/user/" inode=10 dev=00:25 mode=040711 ouid=0 ogid=0 rdev=00:00 nametype=PARENT
Apr 05 19:09:08 ubuntu audit: PROCTITLE proctitle="/sbin/pam-tmpdir-helper"
Apr 05 19:09:08 ubuntu audit[2037]: USER_START pid=2037 uid=0 auid=1000 ses=2 msg='op=PAM:session_open acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
Apr 05 19:09:08 ubuntu audit[2039]: SYSCALL arch=c000003e syscall=59 success=yes exit=0 a0=5588bd7db4a8 a1=5588bd7d2168 a2=5588bd7eba70 a3=5588bd7f1000 items=2 ppid=2037 pid=2039 auid=1000 uid=0 gid=0 euid=0 sui
Apr 05 19:09:08 ubuntu audit: EXECVE argc=2 a0="journalctl" a1="-xe"
Apr 05 19:09:08 ubuntu audit: CWD cwd="/home/jkwan"
Apr 05 19:09:08 ubuntu audit: PATH item=0 name="/bin/journalctl" inode=151439 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL
Apr 05 19:09:08 ubuntu audit: PATH item=1 name="/lib64/ld-linux-x86-64.so.2" inode=390623 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL
Apr 05 19:09:08 ubuntu audit: PROCTITLE proctitle=6A6F75726E616C63746C002D7865
Originally created by @joharkwan on GitHub (Apr 5, 2018). Original GitHub issue: https://github.com/konstruktoid/hardening/issues/23 Hi, After the OS is harden and reboot. my Jenkins service never able to start up either during boot time or using systemd to start. Please see below for more information. I did try to disable auditd, aide and apparmor but it did not help. any suggestion will much appreciate. Thank you so much ``` jkwan@ubuntu:~$ ps -ef | grep -i jenkins jkwan 1977 1964 0 19:08 pts/0 00:00:00 grep --color=auto -i jenkins jkwan@ubuntu:~$ uptime 19:08:17 up 2 min, 2 users, load average: 0.26, 0.35, 0.16 jkwan@ubuntu:~$ uptime 19:08:21 up 2 min, 2 users, load average: 0.26, 0.35, 0.16 jkwan@ubuntu:~$ ps -ef | grep -i jenkins jkwan 1982 1964 0 19:08 pts/0 00:00:00 grep --color=auto -i jenkins jkwan@ubuntu:~$ sudo systemctl start jenkins.service [sudo] password for jkwan: Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details. jkwan@ubuntu:~$ sudo systemctl status jenkins.service ● jenkins.service - LSB: Start Jenkins at boot time Loaded: loaded (/etc/init.d/jenkins; bad; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2018-04-05 19:08:44 +08; 12s ago Docs: man:systemd-sysv-generator(8) Process: 1987 ExecStart=/etc/init.d/jenkins start (code=exited, status=7) Apr 05 19:08:43 ubuntu jenkins[1987]: * Starting Jenkins Automation Server jenkins Apr 05 19:08:43 ubuntu su[2007]: pam_tally(su:account): unknown option: reset Apr 05 19:08:43 ubuntu su[2007]: Successful su for jenkins by root Apr 05 19:08:43 ubuntu su[2007]: + ??? root:jenkins Apr 05 19:08:43 ubuntu su[2007]: pam_unix(su:session): session opened for user jenkins by (uid=0) Apr 05 19:08:44 ubuntu jenkins[1987]: ...fail! Apr 05 19:08:44 ubuntu systemd[1]: jenkins.service: Control process exited, code=exited status=7 Apr 05 19:08:44 ubuntu systemd[1]: Failed to start LSB: Start Jenkins at boot time. Apr 05 19:08:44 ubuntu systemd[1]: jenkins.service: Unit entered failed state. Apr 05 19:08:44 ubuntu systemd[1]: jenkins.service: Failed with result 'exit-code'. ``` ``` jkwan@ubuntu:~$ sudo journalctl -xe Apr 05 19:08:56 ubuntu audit: PATH item=1 name="/lib64/ld-linux-x86-64.so.2" inode=390623 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL Apr 05 19:08:56 ubuntu audit: PROCTITLE proctitle=7375646F0073797374656D63746C00737461747573006A656E6B696E732E73657276696365 Apr 05 19:08:56 ubuntu sudo[2033]: jkwan : TTY=pts/0 ; PWD=/home/jkwan ; USER=root ; COMMAND=/bin/systemctl status jenkins.service Apr 05 19:08:56 ubuntu audit[2033]: USER_CMD pid=2033 uid=1000 auid=1000 ses=2 msg='cwd="/home/jkwan" cmd=73797374656D63746C20737461747573206A656E6B696E732E73657276696365 terminal=pts/0 res=success' Apr 05 19:08:56 ubuntu audit[2033]: CRED_REFR pid=2033 uid=0 auid=1000 ses=2 msg='op=PAM:setcred acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success' Apr 05 19:08:56 ubuntu sudo[2033]: pam_unix(sudo:session): session opened for user root by jkwan(uid=0) Apr 05 19:08:56 ubuntu audit[2034]: SYSCALL arch=c000003e syscall=83 success=no exit=-17 a0=40173c a1=1c9 a2=0 a3=1e5 items=1 ppid=2033 pid=2034 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 Apr 05 19:08:56 ubuntu audit: CWD cwd="/home/jkwan" Apr 05 19:08:56 ubuntu audit: PATH item=0 name="/tmp/" inode=2 dev=00:25 mode=041777 ouid=0 ogid=0 rdev=00:00 nametype=PARENT Apr 05 19:08:56 ubuntu audit: PROCTITLE proctitle="/sbin/pam-tmpdir-helper" Apr 05 19:08:56 ubuntu audit[2034]: SYSCALL arch=c000003e syscall=83 success=no exit=-17 a0=211a0b0 a1=1c0 a2=0 a3=0 items=1 ppid=2033 pid=2034 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 Apr 05 19:08:56 ubuntu audit: CWD cwd="/home/jkwan" Apr 05 19:08:56 ubuntu audit: PATH item=0 name="/tmp/user/" inode=10 dev=00:25 mode=040711 ouid=0 ogid=0 rdev=00:00 nametype=PARENT Apr 05 19:08:56 ubuntu audit: PROCTITLE proctitle="/sbin/pam-tmpdir-helper" Apr 05 19:08:56 ubuntu audit[2033]: USER_START pid=2033 uid=0 auid=1000 ses=2 msg='op=PAM:session_open acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success' Apr 05 19:08:56 ubuntu audit[2035]: SYSCALL arch=c000003e syscall=59 success=yes exit=0 a0=5622c89784a8 a1=5622c896f168 a2=5622c8988aa0 a3=5622c898e000 items=2 ppid=2033 pid=2035 auid=1000 uid=0 gid=0 euid=0 sui Apr 05 19:08:56 ubuntu audit: EXECVE argc=3 a0="systemctl" a1="status" a2="jenkins.service" Apr 05 19:08:56 ubuntu audit: CWD cwd="/home/jkwan" Apr 05 19:08:56 ubuntu audit: PATH item=0 name="/bin/systemctl" inode=151444 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL Apr 05 19:08:56 ubuntu audit: PATH item=1 name="/lib64/ld-linux-x86-64.so.2" inode=390623 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL Apr 05 19:08:56 ubuntu audit: PROCTITLE proctitle=73797374656D63746C00737461747573006A656E6B696E732E73657276696365 Apr 05 19:08:57 ubuntu sudo[2033]: pam_unix(sudo:session): session closed for user root Apr 05 19:08:57 ubuntu audit[2033]: USER_END pid=2033 uid=0 auid=1000 ses=2 msg='op=PAM:session_close acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success' Apr 05 19:08:57 ubuntu audit[2033]: CRED_DISP pid=2033 uid=0 auid=1000 ses=2 msg='op=PAM:setcred acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success' Apr 05 19:08:58 ubuntu audit[1406]: SYSCALL arch=c000003e syscall=159 success=yes exit=5 a0=7f6fd8ef2bb0 a1=0 a2=862 a3=39fe6f46d items=0 ppid=1 pid=1406 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 Apr 05 19:08:58 ubuntu audit: PROCTITLE proctitle="/usr/sbin/VBoxService" Apr 05 19:09:08 ubuntu audit[2037]: SYSCALL arch=c000003e syscall=59 success=yes exit=0 a0=d0de48 a1=e03248 a2=de9008 a3=598 items=2 ppid=1964 pid=2037 auid=1000 uid=1000 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 Apr 05 19:09:08 ubuntu audit: BPRM_FCAPS fver=0 fp=0000000000000000 fi=0000000000000000 fe=0 old_pp=0000000000000000 old_pi=0000000000000000 old_pe=0000000000000000 new_pp=0000003fffffffff new_pi=000000000000000 Apr 05 19:09:08 ubuntu audit: EXECVE argc=3 a0="sudo" a1="journalctl" a2="-xe" Apr 05 19:09:08 ubuntu audit: CWD cwd="/home/jkwan" Apr 05 19:09:08 ubuntu audit: PATH item=0 name="/usr/bin/sudo" inode=386 dev=fc:00 mode=0104755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL Apr 05 19:09:08 ubuntu audit: PATH item=1 name="/lib64/ld-linux-x86-64.so.2" inode=390623 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL Apr 05 19:09:08 ubuntu audit: PROCTITLE proctitle=7375646F006A6F75726E616C63746C002D7865 Apr 05 19:09:08 ubuntu sudo[2037]: jkwan : TTY=pts/0 ; PWD=/home/jkwan ; USER=root ; COMMAND=/bin/journalctl -xe Apr 05 19:09:08 ubuntu audit[2037]: USER_CMD pid=2037 uid=1000 auid=1000 ses=2 msg='cwd="/home/jkwan" cmd=6A6F75726E616C63746C202D7865 terminal=pts/0 res=success' Apr 05 19:09:08 ubuntu audit[2037]: CRED_REFR pid=2037 uid=0 auid=1000 ses=2 msg='op=PAM:setcred acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success' Apr 05 19:09:08 ubuntu sudo[2037]: pam_unix(sudo:session): session opened for user root by jkwan(uid=0) Apr 05 19:09:08 ubuntu audit[2038]: SYSCALL arch=c000003e syscall=83 success=no exit=-17 a0=40173c a1=1c9 a2=0 a3=1e5 items=1 ppid=2037 pid=2038 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 Apr 05 19:09:08 ubuntu audit: CWD cwd="/home/jkwan" Apr 05 19:09:08 ubuntu audit: PATH item=0 name="/tmp/" inode=2 dev=00:25 mode=041777 ouid=0 ogid=0 rdev=00:00 nametype=PARENT Apr 05 19:09:08 ubuntu audit: PROCTITLE proctitle="/sbin/pam-tmpdir-helper" Apr 05 19:09:08 ubuntu audit[2038]: SYSCALL arch=c000003e syscall=83 success=no exit=-17 a0=afd0b0 a1=1c0 a2=0 a3=0 items=1 ppid=2037 pid=2038 auid=1000 uid=0 gid=1000 euid=0 suid=0 fsuid=0 egid=1000 sgid=1000 f Apr 05 19:09:08 ubuntu audit: CWD cwd="/home/jkwan" Apr 05 19:09:08 ubuntu audit: PATH item=0 name="/tmp/user/" inode=10 dev=00:25 mode=040711 ouid=0 ogid=0 rdev=00:00 nametype=PARENT Apr 05 19:09:08 ubuntu audit: PROCTITLE proctitle="/sbin/pam-tmpdir-helper" Apr 05 19:09:08 ubuntu audit[2037]: USER_START pid=2037 uid=0 auid=1000 ses=2 msg='op=PAM:session_open acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success' Apr 05 19:09:08 ubuntu audit[2039]: SYSCALL arch=c000003e syscall=59 success=yes exit=0 a0=5588bd7db4a8 a1=5588bd7d2168 a2=5588bd7eba70 a3=5588bd7f1000 items=2 ppid=2037 pid=2039 auid=1000 uid=0 gid=0 euid=0 sui Apr 05 19:09:08 ubuntu audit: EXECVE argc=2 a0="journalctl" a1="-xe" Apr 05 19:09:08 ubuntu audit: CWD cwd="/home/jkwan" Apr 05 19:09:08 ubuntu audit: PATH item=0 name="/bin/journalctl" inode=151439 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL Apr 05 19:09:08 ubuntu audit: PATH item=1 name="/lib64/ld-linux-x86-64.so.2" inode=390623 dev=fc:00 mode=0100755 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL Apr 05 19:09:08 ubuntu audit: PROCTITLE proctitle=6A6F75726E616C63746C002D7865 ```
kerem closed this issue 2026-03-03 13:58:16 +03:00
Author
Owner

@konstruktoid commented on GitHub (Apr 5, 2018):

Hi @joharkwan, any logs when trying /etc/init.d/jenkins start or in /var/log/jenkins/?

<!-- gh-comment-id:378916444 --> @konstruktoid commented on GitHub (Apr 5, 2018): Hi @joharkwan, any logs when trying `/etc/init.d/jenkins start` or in `/var/log/jenkins/`?
Author
Owner

@joharkwan commented on GitHub (Apr 5, 2018):

Hi @konstruktoid,

Here is /etc/init.d/jenkins start

jkwan@ubuntu:/var/log/jenkins$ sudo /etc/init.d/jenkins start 
[sudo] password for jkwan: 
[....] Starting jenkins (via systemctl): jenkins.serviceJob for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
 failed!

No logs written to jenkins.log when I tried to start jenkins.

jkwan@ubuntu:/var/log/jenkins$ tail -f jenkins.log 
Apr 05, 2018 7:00:55 PM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
Apr 05, 2018 7:00:55 PM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
Apr 05, 2018 7:02:12 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Started Workspace clean-up
Apr 05, 2018 7:02:12 PM hudson.model.AsyncPeriodicWork$1 run
INFO: Finished Workspace clean-up. 2 ms
Apr 05, 2018 7:05:19 PM winstone.Logger logInternal
INFO: JVM is terminating. Shutting down Winstone

I debug /etc/init.d/jenkins script

jkwan@ubuntu:/var/log/jenkins$ sudo bash -x /etc/init.d/jenkins start 
+ PATH=/bin:/usr/bin:/sbin:/usr/sbin
+ DESC='Jenkins Automation Server'
+ NAME=jenkins
+ SCRIPTNAME=/etc/init.d/jenkins
+ '[' -r /etc/default/jenkins ']'
+ . /etc/default/jenkins
++ NAME=jenkins
++ JAVA=/usr/bin/java
++ JAVA_ARGS=-Djava.awt.headless=true
++ PIDFILE=/var/run/jenkins/jenkins.pid
++ JENKINS_USER=jenkins
++ JENKINS_GROUP=jenkins
++ JENKINS_WAR=/usr/share/jenkins/jenkins.war
++ JENKINS_HOME=/var/lib/jenkins
++ RUN_STANDALONE=true
++ JENKINS_LOG=/var/log/jenkins/jenkins.log
++ MAXOPENFILES=8192
++ HTTP_PORT=8080
++ PREFIX=/jenkins
++ JENKINS_ARGS='--webroot=/var/cache/jenkins/war --httpPort=8080'
+ DAEMON=/usr/bin/daemon
+ DAEMON_ARGS='--name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid'
+ '[' -n '' ']'
+ SU=/bin/su
+ '[' '!' -x /usr/bin/daemon ']'
+ '[' true = false ']'
+ '[' -r /etc/default/locale ']'
+ . /etc/default/locale
++ LANG=en_US.UTF-8
+ export LANG LANGUAGE
+ . /lib/init/vars.sh
++ TMPTIME=0
++ SULOGIN=no
++ DELAYLOGIN=no
++ UTC=yes
++ VERBOSE=no
++ FSCKFIX=no
++ '[' -f /etc/default/rcS ']'
++ . /etc/default/rcS
++ unset EDITMOTD
++ unset RAMRUN
++ unset RAMLOCK
++ '[' -r /proc/cmdline ']'
+++ cat /proc/cmdline
++ for ARG in '$(cat /proc/cmdline)'
++ case $ARG in
++ for ARG in '$(cat /proc/cmdline)'
++ case $ARG in
++ for ARG in '$(cat /proc/cmdline)'
++ case $ARG in
++ for ARG in '$(cat /proc/cmdline)'
++ case $ARG in
++ '[' '' ']'
+ . /lib/lsb/init-functions
+++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/01-upstart-lsb ']'
++ . /lib/lsb/init-functions.d/01-upstart-lsb
+++ unset UPSTART_SESSION
+++ _RC_SCRIPT=/etc/init.d/jenkins
+++ '[' -r /etc/init//etc/init.d/jenkins.conf ']'
+++ _UPSTART_JOB=jenkins
+++ '[' -r /etc/init/jenkins.conf ']'
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']'
++ . /lib/lsb/init-functions.d/20-left-info-blocks
++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)'
++ '[' -r /lib/lsb/init-functions.d/40-systemd ']'
++ . /lib/lsb/init-functions.d/40-systemd
+++ _use_systemctl=0
+++ '[' -d /run/systemd/system ']'
+++ prog=jenkins
+++ service=jenkins.service
++++ systemctl -p LoadState show jenkins.service
+++ state=LoadState=loaded
+++ '[' LoadState=loaded = LoadState=masked ']'
+++ '[' 2306 -ne 1 ']'
+++ '[' -z '' ']'
+++ '[' -z '' ']'
+++ case $(readlink -f "$0") in
++++ readlink -f /etc/init.d/jenkins
+++ _use_systemctl=1
++++ systemctl -p CanReload show jenkins.service
+++ '[' CanReload=no = CanReload=no ']'
+++ '[' start = reload ']'
+++ '[' 1 = 1 ']'
+++ set +e
+++ set +u
+++ '[' xstart = xstart -o xstart = xstop -o xstart = xrestart -o xstart = xreload -o xstart = xforce-reload -o xstart = xstatus ']'
+++ systemctl_redirect /etc/init.d/jenkins start
+++ local s
+++ local rc
+++ local prog=jenkins
+++ local command=start
+++ case "$command" in
+++ s='Starting jenkins (via systemctl)'
+++ service=jenkins.service
++++ systemctl is-system-running
+++ OUT=degraded
+++ '[' degraded '!=' degraded ']'
+++ '[' start = status ']'
+++ log_daemon_msg 'Starting jenkins (via systemctl)' jenkins.service
+++ '[' -z 'Starting jenkins (via systemctl)' ']'
+++ log_daemon_msg_pre 'Starting jenkins (via systemctl)' jenkins.service
+++ log_use_fancy_output
+++ TPUT=/usr/bin/tput
+++ EXPR=/usr/bin/expr
+++ '[' -t 1 ']'
+++ '[' xxterm-256color '!=' x ']'
+++ '[' xxterm-256color '!=' xdumb ']'
+++ '[' -x /usr/bin/tput ']'
+++ '[' -x /usr/bin/expr ']'
+++ /usr/bin/tput hpa 60
+++ /usr/bin/tput setaf 1
+++ '[' -z ']'
+++ FANCYTTY=1
+++ case "$FANCYTTY" in
+++ true
+++ echo -n '[....] '
[....] +++ '[' -z jenkins.service ']'
+++ echo -n 'Starting jenkins (via systemctl): jenkins.service'
Starting jenkins (via systemctl): jenkins.service+++ log_daemon_msg_post 'Starting jenkins (via systemctl)' jenkins.service
+++ :
+++ /bin/systemctl --no-pager start jenkins.service
Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
+++ rc=1
+++ '[' start = status ']'
+++ log_end_msg 1
+++ '[' -z 1 ']'
+++ local retval
+++ retval=1
+++ log_end_msg_pre 1
+++ log_use_fancy_output
+++ TPUT=/usr/bin/tput
+++ EXPR=/usr/bin/expr
+++ '[' -t 1 ']'
+++ '[' xxterm-256color '!=' x ']'
+++ '[' xxterm-256color '!=' xdumb ']'
+++ '[' -x /usr/bin/tput ']'
+++ '[' -x /usr/bin/expr ']'
+++ /usr/bin/tput hpa 60
+++ /usr/bin/tput setaf 1
+++ '[' -z 1 ']'
+++ true
+++ case "$FANCYTTY" in
+++ true
++++ /usr/bin/tput setaf 1
+++ RED=''
++++ /usr/bin/tput setaf 2
+++ GREEN=''
++++ /usr/bin/tput setaf 3
+++ YELLOW=''
++++ /usr/bin/tput op
+++ NORMAL=''
+++ /usr/bin/tput civis
+++ /usr/bin/tput sc
+++ /usr/bin/tput hpa 0
+++ '[' 1 -eq 0 ']'
+++ '[' 1 -eq 255 ']'
+++ /bin/echo -ne '[FAIL'
[FAIL+++ /usr/bin/tput rc
+++ /usr/bin/tput cnorm
+++ log_use_fancy_output
+++ TPUT=/usr/bin/tput
+++ EXPR=/usr/bin/expr
+++ '[' -t 1 ']'
+++ '[' xxterm-256color '!=' x ']'
+++ '[' xxterm-256color '!=' xdumb ']'
+++ '[' -x /usr/bin/tput ']'
+++ '[' -x /usr/bin/expr ']'
+++ /usr/bin/tput hpa 60
+++ /usr/bin/tput setaf 1
+++ '[' -z 1 ']'
+++ true
+++ case "$FANCYTTY" in
+++ true
++++ /usr/bin/tput setaf 1
+++ RED=''
++++ /usr/bin/tput setaf 3
+++ YELLOW=''
++++ /usr/bin/tput op
+++ NORMAL=''
+++ '[' 1 -eq 0 ']'
+++ '[' 1 -eq 255 ']'
+++ /bin/echo -e ' failed!'
 failed!
+++ log_end_msg_post 1
+++ :
+++ return 1
+++ return 1
+++ exit 1

<!-- gh-comment-id:378935213 --> @joharkwan commented on GitHub (Apr 5, 2018): Hi @konstruktoid, Here is /etc/init.d/jenkins start ``` jkwan@ubuntu:/var/log/jenkins$ sudo /etc/init.d/jenkins start [sudo] password for jkwan: [....] Starting jenkins (via systemctl): jenkins.serviceJob for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details. failed! ``` No logs written to jenkins.log when I tried to start jenkins. ``` jkwan@ubuntu:/var/log/jenkins$ tail -f jenkins.log Apr 05, 2018 7:00:55 PM jenkins.InitReactorRunner$1 onAttained INFO: Completed initialization Apr 05, 2018 7:00:55 PM hudson.WebAppMain$3 run INFO: Jenkins is fully up and running Apr 05, 2018 7:02:12 PM hudson.model.AsyncPeriodicWork$1 run INFO: Started Workspace clean-up Apr 05, 2018 7:02:12 PM hudson.model.AsyncPeriodicWork$1 run INFO: Finished Workspace clean-up. 2 ms Apr 05, 2018 7:05:19 PM winstone.Logger logInternal INFO: JVM is terminating. Shutting down Winstone ``` I debug /etc/init.d/jenkins script ``` jkwan@ubuntu:/var/log/jenkins$ sudo bash -x /etc/init.d/jenkins start + PATH=/bin:/usr/bin:/sbin:/usr/sbin + DESC='Jenkins Automation Server' + NAME=jenkins + SCRIPTNAME=/etc/init.d/jenkins + '[' -r /etc/default/jenkins ']' + . /etc/default/jenkins ++ NAME=jenkins ++ JAVA=/usr/bin/java ++ JAVA_ARGS=-Djava.awt.headless=true ++ PIDFILE=/var/run/jenkins/jenkins.pid ++ JENKINS_USER=jenkins ++ JENKINS_GROUP=jenkins ++ JENKINS_WAR=/usr/share/jenkins/jenkins.war ++ JENKINS_HOME=/var/lib/jenkins ++ RUN_STANDALONE=true ++ JENKINS_LOG=/var/log/jenkins/jenkins.log ++ MAXOPENFILES=8192 ++ HTTP_PORT=8080 ++ PREFIX=/jenkins ++ JENKINS_ARGS='--webroot=/var/cache/jenkins/war --httpPort=8080' + DAEMON=/usr/bin/daemon + DAEMON_ARGS='--name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid' + '[' -n '' ']' + SU=/bin/su + '[' '!' -x /usr/bin/daemon ']' + '[' true = false ']' + '[' -r /etc/default/locale ']' + . /etc/default/locale ++ LANG=en_US.UTF-8 + export LANG LANGUAGE + . /lib/init/vars.sh ++ TMPTIME=0 ++ SULOGIN=no ++ DELAYLOGIN=no ++ UTC=yes ++ VERBOSE=no ++ FSCKFIX=no ++ '[' -f /etc/default/rcS ']' ++ . /etc/default/rcS ++ unset EDITMOTD ++ unset RAMRUN ++ unset RAMLOCK ++ '[' -r /proc/cmdline ']' +++ cat /proc/cmdline ++ for ARG in '$(cat /proc/cmdline)' ++ case $ARG in ++ for ARG in '$(cat /proc/cmdline)' ++ case $ARG in ++ for ARG in '$(cat /proc/cmdline)' ++ case $ARG in ++ for ARG in '$(cat /proc/cmdline)' ++ case $ARG in ++ '[' '' ']' + . /lib/lsb/init-functions +++ run-parts --lsbsysinit --list /lib/lsb/init-functions.d ++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)' ++ '[' -r /lib/lsb/init-functions.d/01-upstart-lsb ']' ++ . /lib/lsb/init-functions.d/01-upstart-lsb +++ unset UPSTART_SESSION +++ _RC_SCRIPT=/etc/init.d/jenkins +++ '[' -r /etc/init//etc/init.d/jenkins.conf ']' +++ _UPSTART_JOB=jenkins +++ '[' -r /etc/init/jenkins.conf ']' ++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)' ++ '[' -r /lib/lsb/init-functions.d/20-left-info-blocks ']' ++ . /lib/lsb/init-functions.d/20-left-info-blocks ++ for hook in '$(run-parts --lsbsysinit --list /lib/lsb/init-functions.d 2>/dev/null)' ++ '[' -r /lib/lsb/init-functions.d/40-systemd ']' ++ . /lib/lsb/init-functions.d/40-systemd +++ _use_systemctl=0 +++ '[' -d /run/systemd/system ']' +++ prog=jenkins +++ service=jenkins.service ++++ systemctl -p LoadState show jenkins.service +++ state=LoadState=loaded +++ '[' LoadState=loaded = LoadState=masked ']' +++ '[' 2306 -ne 1 ']' +++ '[' -z '' ']' +++ '[' -z '' ']' +++ case $(readlink -f "$0") in ++++ readlink -f /etc/init.d/jenkins +++ _use_systemctl=1 ++++ systemctl -p CanReload show jenkins.service +++ '[' CanReload=no = CanReload=no ']' +++ '[' start = reload ']' +++ '[' 1 = 1 ']' +++ set +e +++ set +u +++ '[' xstart = xstart -o xstart = xstop -o xstart = xrestart -o xstart = xreload -o xstart = xforce-reload -o xstart = xstatus ']' +++ systemctl_redirect /etc/init.d/jenkins start +++ local s +++ local rc +++ local prog=jenkins +++ local command=start +++ case "$command" in +++ s='Starting jenkins (via systemctl)' +++ service=jenkins.service ++++ systemctl is-system-running +++ OUT=degraded +++ '[' degraded '!=' degraded ']' +++ '[' start = status ']' +++ log_daemon_msg 'Starting jenkins (via systemctl)' jenkins.service +++ '[' -z 'Starting jenkins (via systemctl)' ']' +++ log_daemon_msg_pre 'Starting jenkins (via systemctl)' jenkins.service +++ log_use_fancy_output +++ TPUT=/usr/bin/tput +++ EXPR=/usr/bin/expr +++ '[' -t 1 ']' +++ '[' xxterm-256color '!=' x ']' +++ '[' xxterm-256color '!=' xdumb ']' +++ '[' -x /usr/bin/tput ']' +++ '[' -x /usr/bin/expr ']' +++ /usr/bin/tput hpa 60 +++ /usr/bin/tput setaf 1 +++ '[' -z ']' +++ FANCYTTY=1 +++ case "$FANCYTTY" in +++ true +++ echo -n '[....] ' [....] +++ '[' -z jenkins.service ']' +++ echo -n 'Starting jenkins (via systemctl): jenkins.service' Starting jenkins (via systemctl): jenkins.service+++ log_daemon_msg_post 'Starting jenkins (via systemctl)' jenkins.service +++ : +++ /bin/systemctl --no-pager start jenkins.service Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details. +++ rc=1 +++ '[' start = status ']' +++ log_end_msg 1 +++ '[' -z 1 ']' +++ local retval +++ retval=1 +++ log_end_msg_pre 1 +++ log_use_fancy_output +++ TPUT=/usr/bin/tput +++ EXPR=/usr/bin/expr +++ '[' -t 1 ']' +++ '[' xxterm-256color '!=' x ']' +++ '[' xxterm-256color '!=' xdumb ']' +++ '[' -x /usr/bin/tput ']' +++ '[' -x /usr/bin/expr ']' +++ /usr/bin/tput hpa 60 +++ /usr/bin/tput setaf 1 +++ '[' -z 1 ']' +++ true +++ case "$FANCYTTY" in +++ true ++++ /usr/bin/tput setaf 1 +++ RED='' ++++ /usr/bin/tput setaf 2 +++ GREEN='' ++++ /usr/bin/tput setaf 3 +++ YELLOW='' ++++ /usr/bin/tput op +++ NORMAL='' +++ /usr/bin/tput civis +++ /usr/bin/tput sc +++ /usr/bin/tput hpa 0 +++ '[' 1 -eq 0 ']' +++ '[' 1 -eq 255 ']' +++ /bin/echo -ne '[FAIL' [FAIL+++ /usr/bin/tput rc +++ /usr/bin/tput cnorm +++ log_use_fancy_output +++ TPUT=/usr/bin/tput +++ EXPR=/usr/bin/expr +++ '[' -t 1 ']' +++ '[' xxterm-256color '!=' x ']' +++ '[' xxterm-256color '!=' xdumb ']' +++ '[' -x /usr/bin/tput ']' +++ '[' -x /usr/bin/expr ']' +++ /usr/bin/tput hpa 60 +++ /usr/bin/tput setaf 1 +++ '[' -z 1 ']' +++ true +++ case "$FANCYTTY" in +++ true ++++ /usr/bin/tput setaf 1 +++ RED='' ++++ /usr/bin/tput setaf 3 +++ YELLOW='' ++++ /usr/bin/tput op +++ NORMAL='' +++ '[' 1 -eq 0 ']' +++ '[' 1 -eq 255 ']' +++ /bin/echo -e ' failed!' failed! +++ log_end_msg_post 1 +++ : +++ return 1 +++ return 1 +++ exit 1 ```
Author
Owner

@konstruktoid commented on GitHub (Apr 5, 2018):

Thanks, sorry to say that didn't help a lot.
Could you please specify your Ubuntu release and jenkins installation instructions, and I'll try to reproduce this behavior.

<!-- gh-comment-id:378950407 --> @konstruktoid commented on GitHub (Apr 5, 2018): Thanks, sorry to say that didn't help a lot. Could you please specify your Ubuntu release and jenkins installation instructions, and I'll try to reproduce this behavior.
Author
Owner

@joharkwan commented on GitHub (Apr 5, 2018):

Thanks @konstruktoid
I tried on AWS and Virtualbox all have same behavior

jkwan@ubuntu:~$ sudo lsb_release -a 
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.4 LTS
Release:	16.04
Codename: xenial

Jenkins installation is from
https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04

<!-- gh-comment-id:378963753 --> @joharkwan commented on GitHub (Apr 5, 2018): Thanks @konstruktoid I tried on AWS and Virtualbox all have same behavior ``` jkwan@ubuntu:~$ sudo lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial ``` Jenkins installation is from https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04
Author
Owner

@konstruktoid commented on GitHub (Apr 6, 2018):

Sorry for the late reply @joharkwan, but this seems too be a rc-script - systemd service conversion error (systemd-sysv-generator). When ignoring systemctl by copying the jenkins init.d file to $HOME everything works fine.
FYI https://issues.jenkins-ci.org/browse/JENKINS-41218

vagrant@xenial:~$ sudo sh jenkins status
Jenkins Automation Server is not running
vagrant@xenial:~$ sudo sh jenkins start
 * Starting Jenkins Automation Server jenkins                                              [ OK ]
vagrant@xenial:~$ sudo sh jenkins status
Jenkins Automation Server is running with the pid 26749
vagrant@xenial:~$ sudo ps -fe | grep 26749
jenkins  26749     1  0 11:44 ?        00:00:00 /usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
jenkins  26750 26749 18 11:44 ?        00:00:07 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
vagrant  26838  1750  0 11:44 pts/0    00:00:00 grep --color=auto 26749
vagrant@xenial:~$ curl -I localhost:8080
HTTP/1.1 403 Forbidden
Date: Fri, 06 Apr 2018 11:46:20 GMT
X-Content-Type-Options: nosniff
Set-Cookie: JSESSIONID.553016dd=node0xft6nai8iqy315hkrlcjjhzt13.node0;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/html;charset=utf-8
X-Hudson: 1.395
X-Jenkins: 2.107.1
X-Jenkins-Session: 3a39daa1
X-You-Are-Authenticated-As: anonymous
X-You-Are-In-Group-Disabled: JENKINS-39402: use -Dhudson.security.AccessDeniedException2.REPORT_GROUP_HEADERS=true or use /whoAmI to diagnose
X-Required-Permission: hudson.model.Hudson.Administer
Content-Length: 677
Server: Jetty(9.4.z-SNAPSHOT)

vagrant@xenial:~$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword
eacecbbd6ae446cf95e427178984e59e
vagrant@xenial:~$
<!-- gh-comment-id:379230693 --> @konstruktoid commented on GitHub (Apr 6, 2018): Sorry for the late reply @joharkwan, but this seems too be a rc-script - systemd service conversion error (`systemd-sysv-generator`). When ignoring `systemctl` by copying the jenkins init.d file to $HOME everything works fine. FYI https://issues.jenkins-ci.org/browse/JENKINS-41218 ```vagrant@xenial:~$ cp /etc/init.d/jenkins . vagrant@xenial:~$ sudo sh jenkins status Jenkins Automation Server is not running vagrant@xenial:~$ sudo sh jenkins start * Starting Jenkins Automation Server jenkins [ OK ] vagrant@xenial:~$ sudo sh jenkins status Jenkins Automation Server is running with the pid 26749 vagrant@xenial:~$ sudo ps -fe | grep 26749 jenkins 26749 1 0 11:44 ? 00:00:00 /usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid -- /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 jenkins 26750 26749 18 11:44 ? 00:00:07 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 vagrant 26838 1750 0 11:44 pts/0 00:00:00 grep --color=auto 26749 vagrant@xenial:~$ curl -I localhost:8080 HTTP/1.1 403 Forbidden Date: Fri, 06 Apr 2018 11:46:20 GMT X-Content-Type-Options: nosniff Set-Cookie: JSESSIONID.553016dd=node0xft6nai8iqy315hkrlcjjhzt13.node0;Path=/;HttpOnly Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: text/html;charset=utf-8 X-Hudson: 1.395 X-Jenkins: 2.107.1 X-Jenkins-Session: 3a39daa1 X-You-Are-Authenticated-As: anonymous X-You-Are-In-Group-Disabled: JENKINS-39402: use -Dhudson.security.AccessDeniedException2.REPORT_GROUP_HEADERS=true or use /whoAmI to diagnose X-Required-Permission: hudson.model.Hudson.Administer Content-Length: 677 Server: Jetty(9.4.z-SNAPSHOT) vagrant@xenial:~$ sudo cat /var/lib/jenkins/secrets/initialAdminPassword eacecbbd6ae446cf95e427178984e59e vagrant@xenial:~$ ```
Author
Owner

@joharkwan commented on GitHub (Apr 6, 2018):

Thank you @konstruktoid to point out JENKINS-41218
I managed to run Jenkins manually but I'm just wondering why systemctl Jenkins is not starting after the OS hardened.

And the weird thing is only Jenkins service is not running other services such as NTP and Nginx run well use systemctl

<!-- gh-comment-id:379247250 --> @joharkwan commented on GitHub (Apr 6, 2018): Thank you @konstruktoid to point out JENKINS-41218 I managed to run Jenkins manually but I'm just wondering why `systemctl` Jenkins is not starting after the OS hardened. And the weird thing is only Jenkins service is not running other services such as NTP and Nginx run well use `systemctl`
Author
Owner

@konstruktoid commented on GitHub (Apr 7, 2018):

The issue seems to be that systemd kills the user processes when starting jenkins with systemctl.
I wrote a jenkins .service file and added the Jenkins user to KillExcludeUsers in /etc/systemd/logind.conf; https://gist.github.com/konstruktoid/1bc96c4f5030f37bd5f5142cc2718b35

<!-- gh-comment-id:379497599 --> @konstruktoid commented on GitHub (Apr 7, 2018): The issue seems to be that `systemd` kills the user processes when starting `jenkins` with `systemctl`. I wrote a jenkins .service file and added the Jenkins user to `KillExcludeUsers` in `/etc/systemd/logind.conf`; https://gist.github.com/konstruktoid/1bc96c4f5030f37bd5f5142cc2718b35
Author
Owner

@joharkwan commented on GitHub (Apr 8, 2018):

Cool, Jenkins is able to run via systemctl now.
Thank you so much @konstruktoid

<!-- gh-comment-id:379563855 --> @joharkwan commented on GitHub (Apr 8, 2018): Cool, Jenkins is able to run via `systemctl `now. Thank you so much @konstruktoid
Author
Owner

@konstruktoid commented on GitHub (Apr 9, 2018):

You're welcome @joharkwan.
Closing :)

<!-- gh-comment-id:379657101 --> @konstruktoid commented on GitHub (Apr 9, 2018): You're welcome @joharkwan. Closing :)
Author
Owner

@arjunUnniumbath commented on GitHub (Jul 19, 2018):

I'm facing same issue in my jenkins server. @konstruktoid .
I created the jenkins.service file
and modified the logind.conf with the new values for killExcludeUsers= root jenkins
is there any other issue, which I should be aware of?

getting following error after doing start and doing journalctl -xe

root@DB:/home/dockusr2# journalctl -xe
-- Subject: Unit UNIT has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit UNIT has finished shutting down.
Jul 19 16:26:11 DB.QA systemd[18315]: Received SIGRTMIN+24 from PID 18334 (kill).
Jul 19 16:26:11 DB.QA systemd[18318]: pam_unix(systemd-user:session): session closed for user jenkins
Jul 19 16:26:11 DB.QA systemd[1]: Stopped User Manager for UID 117.
-- Subject: Unit user@117.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit user@117.service has finished shutting down.
Jul 19 16:26:11 DB.QA systemd[1]: Removed slice User Slice of jenkins.
-- Subject: Unit user-117.slice has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit user-117.slice has finished shutting down.
Jul 19 16:26:12 DB.QA. jenkins[18295]: ...fail!
Jul 19 16:26:12 DB.QA systemd[1]: jenkins.service: Control process exited, code=exited status=7
Jul 19 16:26:12 DB.QA systemd[1]: Failed to start LSB: Start Jenkins at boot time.
-- Subject: Unit jenkins.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit jenkins.service has failed.

-- The result is failed.
Jul 19 16:26:12 DB.QA systemd[1]: jenkins.service: Unit entered failed state.
Jul 19 16:26:12 DB.QA systemd[1]: jenkins.service: Failed with result 'exit-code'.
Jul 19 16:26:12 DB.QA sudo[18292]: pam_unix(sudo:session): session closed for user root

<!-- gh-comment-id:406232637 --> @arjunUnniumbath commented on GitHub (Jul 19, 2018): I'm facing same issue in my jenkins server. @konstruktoid . I created the jenkins.service file and modified the logind.conf with the new values for killExcludeUsers= root jenkins is there any other issue, which I should be aware of? getting following error after doing start and doing journalctl -xe root@DB:/home/dockusr2# journalctl -xe -- Subject: Unit UNIT has finished shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit UNIT has finished shutting down. Jul 19 16:26:11 DB.QA systemd[18315]: Received SIGRTMIN+24 from PID 18334 (kill). Jul 19 16:26:11 DB.QA systemd[18318]: pam_unix(systemd-user:session): session closed for user jenkins Jul 19 16:26:11 DB.QA systemd[1]: Stopped User Manager for UID 117. -- Subject: Unit user@117.service has finished shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit user@117.service has finished shutting down. Jul 19 16:26:11 DB.QA systemd[1]: Removed slice User Slice of jenkins. -- Subject: Unit user-117.slice has finished shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit user-117.slice has finished shutting down. Jul 19 16:26:12 DB.QA. jenkins[18295]: ...fail! Jul 19 16:26:12 DB.QA systemd[1]: jenkins.service: Control process exited, code=exited status=7 Jul 19 16:26:12 DB.QA systemd[1]: Failed to start LSB: Start Jenkins at boot time. -- Subject: Unit jenkins.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit jenkins.service has failed. -- -- The result is failed. Jul 19 16:26:12 DB.QA systemd[1]: jenkins.service: Unit entered failed state. Jul 19 16:26:12 DB.QA systemd[1]: jenkins.service: Failed with result 'exit-code'. Jul 19 16:26:12 DB.QA sudo[18292]: pam_unix(sudo:session): session closed for user root
Author
Owner

@konstruktoid commented on GitHub (Aug 6, 2018):

Hi @arjunUnniumbath, sorry for the late reply.
It seems the jenkins user is still getting closed.

Jul 19 16:26:11 DB.QA systemd[18315]: Received SIGRTMIN+24 from PID 18334 (kill).
Jul 19 16:26:11 DB.QA systemd[18318]: pam_unix(systemd-user:session): session closed for user jenkins
Jul 19 16:26:11 DB.QA systemd[1]: Stopped User Manager for UID 117.
<!-- gh-comment-id:410609919 --> @konstruktoid commented on GitHub (Aug 6, 2018): Hi @arjunUnniumbath, sorry for the late reply. It seems the jenkins user is still getting closed. ``` Jul 19 16:26:11 DB.QA systemd[18315]: Received SIGRTMIN+24 from PID 18334 (kill). Jul 19 16:26:11 DB.QA systemd[18318]: pam_unix(systemd-user:session): session closed for user jenkins Jul 19 16:26:11 DB.QA systemd[1]: Stopped User Manager for UID 117. ```
Author
Owner

@bendavidpaz commented on GitHub (Aug 20, 2018):

I have the same issue. jenkins on the old server just starts up and on new server it does not start.

$ journalctl -u jenkins.service

Aug 20 12:46:48 devlnxjenkins02 systemd[1]: Starting LSB: Jenkins Automation Server...
Aug 20 12:46:48 devlnxjenkins02 runuser[88533]: pam_unix(runuser:session): session opened for user jenkins by (uid=0)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: Starting Jenkins Exception in thread "main" java.lang.reflect.InvocationTargetException
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.reflect.Method.invoke(Method.java:498)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at Main._main(Main.java:196)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at Main.main(Main.java:136)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna--1712433994/**jna8219841799947847982.tmp**: /tmp/jna--1712433994/**jna821984**
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.ClassLoader$NativeLibrary.load(Native Method)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.Runtime.load0(Runtime.java:809)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.System.load(System.java:1086)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:851)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:826)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.jna.Native.<clinit>(Native.java:140)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:89)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:128)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:116)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:104)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:92)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.Daemon.daemonize(Daemon.java:106)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.Daemon.all(Daemon.java:88)
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: ... 6 more
Aug 20 12:46:49 devlnxjenkins02 runuser[88533]: pam_unix(runuser:session): session closed for user jenkins
Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: [FAILED]
Aug 20 12:46:49 devlnxjenkins02 systemd[1]: jenkins.service: control process exited, code=exited status=1
Aug 20 12:46:49 devlnxjenkins02 systemd[1]: Failed to start LSB: Jenkins Automation Server.
Aug 20 12:46:49 devlnxjenkins02 systemd[1]: Unit jenkins.service entered failed state.
Aug 20 12:46:49 devlnxjenkins02 systemd[1]: jenkins.service failed.

The bold files (** those surrounded by double asteriscs **) above don't exist.

If the user is root then jenkins start up.

Any ideas.

<!-- gh-comment-id:414462897 --> @bendavidpaz commented on GitHub (Aug 20, 2018): I have the same issue. jenkins on the old server just starts up and on new server it does not start. $ journalctl -u jenkins.service ``` Aug 20 12:46:48 devlnxjenkins02 systemd[1]: Starting LSB: Jenkins Automation Server... Aug 20 12:46:48 devlnxjenkins02 runuser[88533]: pam_unix(runuser:session): session opened for user jenkins by (uid=0) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: Starting Jenkins Exception in thread "main" java.lang.reflect.InvocationTargetException Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.reflect.Method.invoke(Method.java:498) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at Main._main(Main.java:196) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at Main.main(Main.java:136) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: Caused by: java.lang.UnsatisfiedLinkError: /tmp/jna--1712433994/**jna8219841799947847982.tmp**: /tmp/jna--1712433994/**jna821984** Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.ClassLoader$NativeLibrary.load(Native Method) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.Runtime.load0(Runtime.java:809) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at java.lang.System.load(System.java:1086) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath(Native.java:851) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:826) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.jna.Native.<clinit>(Native.java:140) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.CLibrary.<clinit>(CLibrary.java:89) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.JavaVMArguments.resolvePID(JavaVMArguments.java:128) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.JavaVMArguments.ofLinux(JavaVMArguments.java:116) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.JavaVMArguments.of(JavaVMArguments.java:104) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:92) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.Daemon.daemonize(Daemon.java:106) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: at com.sun.akuma.Daemon.all(Daemon.java:88) Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: ... 6 more Aug 20 12:46:49 devlnxjenkins02 runuser[88533]: pam_unix(runuser:session): session closed for user jenkins Aug 20 12:46:49 devlnxjenkins02 jenkins[88528]: [FAILED] Aug 20 12:46:49 devlnxjenkins02 systemd[1]: jenkins.service: control process exited, code=exited status=1 Aug 20 12:46:49 devlnxjenkins02 systemd[1]: Failed to start LSB: Jenkins Automation Server. Aug 20 12:46:49 devlnxjenkins02 systemd[1]: Unit jenkins.service entered failed state. Aug 20 12:46:49 devlnxjenkins02 systemd[1]: jenkins.service failed. ``` The bold files (** those surrounded by double asteriscs **) above don't exist. If the user is root then jenkins start up. Any ideas.
Author
Owner

@konstruktoid commented on GitHub (Aug 21, 2018):

Hi @bendavidpaz, remove the ProtectHome=true and ProtectSystem=full settings in the .service file in order too exclude any problem with stricter systemd settings.

$ cat /etc/systemd/system/jenkins.service
[Unit]
Description=Jenkins - open source automation server
Before=multi-user.target
After=network-online.target

[Service]
ExecStart=/etc/init.d/jenkins start
ExecStop=/etc/init.d/jenkins stop
CapabilityBoundingSet=~CAP_SYS_PTRACE
GuessMainPID=no
IgnoreSIGPIPE=no
LimitNOFILE=64000
LimitNPROC=64000
RemainAfterExit=yes
TimeoutSec=5min
Type=oneshot

$ grep KillExcludeUsers /etc/systemd/logind.conf
KillExcludeUsers=root jenkins
<!-- gh-comment-id:414580888 --> @konstruktoid commented on GitHub (Aug 21, 2018): Hi @bendavidpaz, remove the `ProtectHome=true` and `ProtectSystem=full` settings in the .service file in order too exclude any problem with stricter systemd settings. ``` $ cat /etc/systemd/system/jenkins.service [Unit] Description=Jenkins - open source automation server Before=multi-user.target After=network-online.target [Service] ExecStart=/etc/init.d/jenkins start ExecStop=/etc/init.d/jenkins stop CapabilityBoundingSet=~CAP_SYS_PTRACE GuessMainPID=no IgnoreSIGPIPE=no LimitNOFILE=64000 LimitNPROC=64000 RemainAfterExit=yes TimeoutSec=5min Type=oneshot $ grep KillExcludeUsers /etc/systemd/logind.conf KillExcludeUsers=root jenkins ```
Author
Owner

@saurabh896 commented on GitHub (Mar 12, 2020):

Install default jdk solved my problem

<!-- gh-comment-id:598033897 --> @saurabh896 commented on GitHub (Mar 12, 2020): Install default jdk solved my problem
Author
Owner

@warheads commented on GitHub (Mar 24, 2020):

Thanks @saurabh896, installing default JDk really helped..!!!!

<!-- gh-comment-id:603541346 --> @warheads commented on GitHub (Mar 24, 2020): Thanks @saurabh896, installing default JDk really helped..!!!!
Author
Owner

@bugb commented on GitHub (Mar 12, 2021):

Nice! Thanks a lot @konstruktoid konstruktoid c

<!-- gh-comment-id:797334303 --> @bugb commented on GitHub (Mar 12, 2021): Nice! Thanks a lot @konstruktoid konstruktoid c
Author
Owner

@azizonick commented on GitHub (Feb 13, 2022):

@konstruktoid
Hey there, facing the same issue, systemctl doesnt stop doesn trigger the server however "sh jenkins stop" does, and when i kill it manually, systemctl command stucks and does not return back to shell on Centos 7

<!-- gh-comment-id:1038476540 --> @azizonick commented on GitHub (Feb 13, 2022): @konstruktoid Hey there, facing the same issue, systemctl doesnt stop doesn trigger the server however "sh jenkins stop" does, and when i kill it manually, systemctl command stucks and does not return back to shell on Centos 7
Author
Owner

@konstruktoid commented on GitHub (Feb 14, 2022):

Hi @azizonick, this is a repository regarding ubuntu security and I don't have any real experience with jenkins on centos.
I wish you the best of luck finding an answer, but I think someone more focused on centos can provide a much better answer.

<!-- gh-comment-id:1038943114 --> @konstruktoid commented on GitHub (Feb 14, 2022): Hi @azizonick, this is a repository regarding ubuntu security and I don't have any real experience with jenkins on centos. I wish you the best of luck finding an answer, but I think someone more focused on centos can provide a much better answer.
Author
Owner

@parthgofficial commented on GitHub (Mar 12, 2022):

Hi @konstruktoid
Getting the same error please help!

-- The result is failed.
Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: Unit jenkins.service entered failed
Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service failed.
Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service holdoff time over, s
Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: Stopped Jenkins Continuous Integrati
-- Subject: Unit jenkins.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit jenkins.service has finished shutting down.
Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: start request repeated too quickly f
Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: Failed to start Jenkins Continuous I
-- Subject: Unit jenkins.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit jenkins.service has failed.

-- The result is failed.
Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: Unit jenkins.service entered failed
Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service failed.
Mar 12 12:32:19 ip-172-31-83-21.ec2.internal dhclient[2848]: XMT: Solicit on eth0, interval 1
lines 1978-1999/1999 (END)

<!-- gh-comment-id:1065875740 --> @parthgofficial commented on GitHub (Mar 12, 2022): Hi @konstruktoid Getting the same error please help! -- The result is failed. Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: Unit jenkins.service entered failed Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service failed. Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service holdoff time over, s Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: Stopped Jenkins Continuous Integrati -- Subject: Unit jenkins.service has finished shutting down -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit jenkins.service has finished shutting down. Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: start request repeated too quickly f Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: Failed to start Jenkins Continuous I -- Subject: Unit jenkins.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit jenkins.service has failed. -- -- The result is failed. Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: Unit jenkins.service entered failed Mar 12 12:31:31 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service failed. Mar 12 12:32:19 ip-172-31-83-21.ec2.internal dhclient[2848]: XMT: Solicit on eth0, interval 1 lines 1978-1999/1999 (END)
Author
Owner

@konstruktoid commented on GitHub (Mar 12, 2022):

Yeah, it seems to have failed, but do you have any logs that state why it failed, and is that error actually caused by code in this repository?

<!-- gh-comment-id:1065891856 --> @konstruktoid commented on GitHub (Mar 12, 2022): Yeah, it seems to have failed, but do you have any logs that state why it failed, and is that error actually caused by code in this repository?
Author
Owner

@parthgofficial commented on GitHub (Mar 12, 2022):

journalctl -u jenkins.service

  • Logs begin at Sat 2022-03-12 11:52:50 UTC, end at Sat 2022-03-12 16:04:55 UTC. --
    Mar 12 12:15:46 ip-172-31-83-21.ec2.internal systemd[1]: Starting Jenkins Continuous Integration Server...
    Mar 12 12:15:46 ip-172-31-83-21.ec2.internal jenkins[8563]: openjdk version "17.0.2" 2022-01-18 LTS
    Mar 12 12:15:46 ip-172-31-83-21.ec2.internal jenkins[8563]: OpenJDK Runtime Environment Corretto-17.0.2.8.1 (build 17.0.2+8-LTS)
    Mar 12 12:15:46 ip-172-31-83-21.ec2.internal jenkins[8563]: OpenJDK 64-Bit Server VM Corretto-17.0.2.8.1 (build 17.0.2+8-LTS, mixed mode, sharing)
    Mar 12 12:15:46 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
    Mar 12 12:15:46 ip-172-31-83-21.ec2.internal systemd[1]: Failed to start Jenkins Continuous Integration Server.
    Mar 12 12:15:46 ip-172-31-83-21.ec2.internal systemd[1]: Unit jenkins.service entered failed state.
    Mar 12 12:15:46 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service failed.
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service holdoff time over, scheduling restart.
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Stopped Jenkins Continuous Integration Server.
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Starting Jenkins Continuous Integration Server...
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8615]: openjdk version "17.0.2" 2022-01-18 LTS
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8615]: OpenJDK Runtime Environment Corretto-17.0.2.8.1 (build 17.0.2+8-LTS)
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8615]: OpenJDK 64-Bit Server VM Corretto-17.0.2.8.1 (build 17.0.2+8-LTS, mixed mode, sharing)
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Failed to start Jenkins Continuous Integration Server.
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Unit jenkins.service entered failed state.
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service failed.
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service holdoff time over, scheduling restart.
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Stopped Jenkins Continuous Integration Server.
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Starting Jenkins Continuous Integration Server...
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8673]: openjdk version "17.0.2" 2022-01-18 LTS
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8673]: OpenJDK Runtime Environment Corretto-17.0.2.8.1 (build 17.0.2+8-LTS)
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8673]: OpenJDK 64-Bit Server VM Corretto-17.0.2.8.1 (build 17.0.2+8-LTS, mixed mode, sharing)
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Failed to start Jenkins Continuous Integration Server.
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Unit jenkins.service entered failed state.
    Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service failed.
    lines 1-29
<!-- gh-comment-id:1065908928 --> @parthgofficial commented on GitHub (Mar 12, 2022): > journalctl -u jenkins.service - Logs begin at Sat 2022-03-12 11:52:50 UTC, end at Sat 2022-03-12 16:04:55 UTC. -- Mar 12 12:15:46 ip-172-31-83-21.ec2.internal systemd[1]: Starting Jenkins Continuous Integration Server... Mar 12 12:15:46 ip-172-31-83-21.ec2.internal jenkins[8563]: openjdk version "17.0.2" 2022-01-18 LTS Mar 12 12:15:46 ip-172-31-83-21.ec2.internal jenkins[8563]: OpenJDK Runtime Environment Corretto-17.0.2.8.1 (build 17.0.2+8-LTS) Mar 12 12:15:46 ip-172-31-83-21.ec2.internal jenkins[8563]: OpenJDK 64-Bit Server VM Corretto-17.0.2.8.1 (build 17.0.2+8-LTS, mixed mode, sharing) Mar 12 12:15:46 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE Mar 12 12:15:46 ip-172-31-83-21.ec2.internal systemd[1]: Failed to start Jenkins Continuous Integration Server. Mar 12 12:15:46 ip-172-31-83-21.ec2.internal systemd[1]: Unit jenkins.service entered failed state. Mar 12 12:15:46 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service failed. Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service holdoff time over, scheduling restart. Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Stopped Jenkins Continuous Integration Server. Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Starting Jenkins Continuous Integration Server... Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8615]: openjdk version "17.0.2" 2022-01-18 LTS Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8615]: OpenJDK Runtime Environment Corretto-17.0.2.8.1 (build 17.0.2+8-LTS) Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8615]: OpenJDK 64-Bit Server VM Corretto-17.0.2.8.1 (build 17.0.2+8-LTS, mixed mode, sharing) Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Failed to start Jenkins Continuous Integration Server. Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Unit jenkins.service entered failed state. Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service failed. Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service holdoff time over, scheduling restart. Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Stopped Jenkins Continuous Integration Server. Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Starting Jenkins Continuous Integration Server... Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8673]: openjdk version "17.0.2" 2022-01-18 LTS Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8673]: OpenJDK Runtime Environment Corretto-17.0.2.8.1 (build 17.0.2+8-LTS) Mar 12 12:15:47 ip-172-31-83-21.ec2.internal jenkins[8673]: OpenJDK 64-Bit Server VM Corretto-17.0.2.8.1 (build 17.0.2+8-LTS, mixed mode, sharing) Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Failed to start Jenkins Continuous Integration Server. Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: Unit jenkins.service entered failed state. Mar 12 12:15:47 ip-172-31-83-21.ec2.internal systemd[1]: jenkins.service failed. lines 1-29
Author
Owner

@konstruktoid commented on GitHub (Mar 12, 2022):

Are there any actual Jenkins logs? And how is this related to this repository?

<!-- gh-comment-id:1065922841 --> @konstruktoid commented on GitHub (Mar 12, 2022): Are there any actual Jenkins logs? And how is this related to this repository?
Author
Owner

@mangesh-bhosale commented on GitHub (Feb 3, 2023):

● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-02-03 06:00:17 UTC; 13s ago
Process: 15524 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
Main PID: 15524 (code=exited, status=1/FAILURE)

Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Main process exited, code=exited, status=1/FAILURE
Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Failed with result 'exit-code'.
Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: Failed to start Jenkins Continuous Integration Server.
Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Service hold-off time over, scheduling restart.
Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Scheduled restart job, restart counter is at 5.
Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: Stopped Jenkins Continuous Integration Server.
Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Start request repeated too quickly.
Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Failed with result 'exit-code'.
Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: Failed to start Jenkins Continuous Integration Server.
root@ip-172-31-43-178:# sudo vi /etc/init.d/jenkins
root@ip-172-31-43-178:
# systemctl status jenkins.service
● jenkins.service - Jenkins Continuous Integration Server
Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-02-03 06:00:17 UTC; 56s ago
Process: 15524 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
Main PID: 15524 (code=exited, status=1/FAILURE)

<!-- gh-comment-id:1415083762 --> @mangesh-bhosale commented on GitHub (Feb 3, 2023): ● jenkins.service - Jenkins Continuous Integration Server Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2023-02-03 06:00:17 UTC; 13s ago Process: 15524 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE) Main PID: 15524 (code=exited, status=1/FAILURE) Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Main process exited, code=exited, status=1/FAILURE Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Failed with result 'exit-code'. Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: Failed to start Jenkins Continuous Integration Server. Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Service hold-off time over, scheduling restart. Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Scheduled restart job, restart counter is at 5. Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: Stopped Jenkins Continuous Integration Server. Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Start request repeated too quickly. Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: jenkins.service: Failed with result 'exit-code'. Feb 03 06:00:17 ip-172-31-43-178.ap-south-1.compute.internal systemd[1]: Failed to start Jenkins Continuous Integration Server. root@ip-172-31-43-178:~# sudo vi /etc/init.d/jenkins root@ip-172-31-43-178:~# systemctl status jenkins.service ● jenkins.service - Jenkins Continuous Integration Server Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2023-02-03 06:00:17 UTC; 56s ago Process: 15524 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE) Main PID: 15524 (code=exited, status=1/FAILURE)
Author
Owner

@mangesh-bhosale commented on GitHub (Feb 3, 2023):

How to resolve this error ?tried to install Jenkins on Ubuntu 18.04 -Ec2 instance

<!-- gh-comment-id:1415084635 --> @mangesh-bhosale commented on GitHub (Feb 3, 2023): How to resolve this error ?tried to install Jenkins on Ubuntu 18.04 -Ec2 instance
Author
Owner

@konstruktoid commented on GitHub (Feb 3, 2023):

Are there any actual Jenkins logs? And how is this related to this repository?

<!-- gh-comment-id:1415413444 --> @konstruktoid commented on GitHub (Feb 3, 2023): Are there any actual Jenkins logs? And how is this related to this repository?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hardening#8
No description provided.