GithubHelp home page GithubHelp logo

Comments (25)

saurabh896 avatar saurabh896 commented on May 29, 2024 8

Install default jdk solved my problem

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024 7

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

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024 2

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

from hardening.

bugb avatar bugb commented on May 29, 2024 1

Nice! Thanks a lot @konstruktoid konstruktoid c

from hardening.

joharkwan avatar joharkwan commented on May 29, 2024

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

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024

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.

from hardening.

joharkwan avatar joharkwan commented on May 29, 2024

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

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024

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:~$

from hardening.

joharkwan avatar joharkwan commented on May 29, 2024

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

from hardening.

joharkwan avatar joharkwan commented on May 29, 2024

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

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024

You're welcome @joharkwan.
Closing :)

from hardening.

arjunUnniumbath avatar arjunUnniumbath commented on May 29, 2024

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 [email protected] has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit [email protected] 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

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024

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.

from hardening.

bendavidpaz avatar bendavidpaz commented on May 29, 2024

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.

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024

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

from hardening.

warheads avatar warheads commented on May 29, 2024

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

from hardening.

azizonick avatar azizonick commented on May 29, 2024

@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

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024

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.

from hardening.

Parth-PG avatar Parth-PG commented on May 29, 2024

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)

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024

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?

from hardening.

Parth-PG avatar Parth-PG commented on May 29, 2024

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

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024

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

from hardening.

hustler-deo avatar hustler-deo commented on May 29, 2024

● 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)

from hardening.

hustler-deo avatar hustler-deo commented on May 29, 2024

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

from hardening.

konstruktoid avatar konstruktoid commented on May 29, 2024

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

from hardening.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.