“Jenkins error – Starting Jenkins /etc/rc.d/init.d/jenkins: line 115: img-src: command not found”
Daftar Isi
Pengantar
Pada hari ini saya kaget setelah update versi jenkins dari versi 2.319.1-1.1 ke versi 2.319.2-1.1 , jenkins tidak bisa di akses dashboard nya . http://IP:8080. Kemudian saya coba cek status service nya ternyata down.
Problem
- Ketika coba di cek service nya
systemctl status jenkins.service ● jenkins.service - LSB: Jenkins Automation Server Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled) Active: failed (Result: exit-code) since Mon 2022-01-24 13:18:58 WIB; 9s ago Docs: man:systemd-sysv-generator(8) Process: 38486 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=127) Tasks: 0 Memory: 16.7M Jan 24 13:18:58 qoinjenkins01.qoin.id systemd[1]: Starting LSB: Jenkins Automation Server... Jan 24 13:18:58 qoinjenkins01.qoin.id jenkins[38486]: Starting Jenkins /etc/rc.d/init.d/jenkins: line 115: img-src: command not found Jan 24 13:18:58 qoinjenkins01.qoin.id jenkins[38486]: /etc/rc.d/init.d/jenkins: line 115: -DJENKINS_HOME=/var/jenkins/jenkins: No such file or directory Jan 24 13:18:58 qoinjenkins01.qoin.id jenkins[38486]: [FAILED] Jan 24 13:18:58 qoinjenkins01.qoin.id systemd[1]: jenkins.service: control process exited, code=exited status=127 Jan 24 13:18:58 qoinjenkins01.qoin.id systemd[1]: Failed to start LSB: Jenkins Automation Server. Jan 24 13:18:58 qoinjenkins01.qoin.id systemd[1]: Unit jenkins.service entered failed state. Jan 24 13:18:58 qoinjenkins01.qoin.id systemd[1]: jenkins.service failed.
Solved
- Cek settingan berdasarkan error nya
etc/rc.d/init.d/jenkins: line 115: img-src: command not found
- Setelah di cek di config jenkinsnya
nano /etc/sysconfig/jenkins
## Path: Development/Jenkins ## Description: Jenkins Automation Server ## Type: string ## Default: "/var/lib/jenkins" ## ServiceRestart: jenkins # # Directory where Jenkins store its configuration and working # files (checkouts, build reports, artifacts, ...). # JENKINS_HOME="/var/lib/jenkins" #JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.model.DirectoryBrowserSupport.CSP=""default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' 'unsafe-inline' data:;""" ## Type: string ## Default: "" ## ServiceRestart: jenkins # # Java executable to run Jenkins # When left empty, we'll try to find the suitable Java. # JENKINS_JAVA_CMD=""
- Problem nya dikarenakan ada list command berikut -> tinggal di uncomment
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.model.DirectoryBrowserSupport.CSP=""default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' 'unsafe-inline' data:;""" -kasih uncoment #JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Dhudson.model.DirectoryBrowserSupport.CSP=""default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' 'unsafe-inline' data:;"""
- Kemudian restart service
systemctl start jenkins.service
Penutup
Sahabat Blog Learning & Doing demikianlah penjelasan mengenai Jenkins error – Starting Jenkins /etc/rc.d/init.d/jenkins: line 115: img-src: command not found. Semoga Bermanfaat . Sampai ketemu lagi di postingan berikut nya.
(Visited 106 times, 1 visits today)