Jenkins failed to start in linux

后端 未结 6 1012
北荒
北荒 2021-02-12 10:30

go to run jenkins after doing an upgrade, and get the following:

start jenkins
start: Job failed to start

That\'s it...nothing shows up in jenk

相关标签:
6条回答
  • 2021-02-12 11:12

    I got from this link: https://serverfault.com/questions/710680/jenkins-not-starting-in-ubuntu

    It might be caused by a full disk. To be really sure, try running it manually. Like this: /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 --ajp13Port=-1

    0 讨论(0)
  • 2021-02-12 11:15

    The following worked for me:

    sudo rm /etc/init/jenkins.conf
    sudo update-rc.d jenkins defaults
    sudo service jenkins start
    

    Then....

    root@core:/# service jenkins start
    * Starting Jenkins Continuous Integration Server jenkins                    [ OK ] 
    

    Borrowed from: https://groups.google.com/forum/#!msg/jenkinsci-users/eW_yEWLojFc/tFhb8DKoRHUJ

    0 讨论(0)
  • 2021-02-12 11:19

    So, knowing it was a pre-start error allowed me to investigate more deeply.

    Further digging allowed me to figure out that the exact line in the /etc/init/jenkins.conf file was one pointing to the /usr/share/jenkins/bin/maintain-plugins.sh

    Looking at this location, I found it was not present (ie. no bin directory). This means that jenkins-common was no longer installed for some reason...odd indeed...going into apt-get and doing an install of this component again led to the error:

    dpkg error processing /var/cache/apt/archives/jenkins-common_1.409.1-0ubuntu4.2_all.deb ...
    

    having seen this error before and refreshing my memory via google gave the following solution:

    dpkg -i --force-overwrite /var/cache/apt/archives/jenkins-common_1.409.1-0ubuntu4.2_all.deb
    

    This allowed the installation of common to proceed as normal. After this, all I had to do was replace the /usr/share/jenkins/jenkins.war with my backed up copy (because ubuntu is far behind the latest release version), and I was able to start the server again.

    I am not exactly sure what caused the problem to begin with, but it was likely during an apt-get upgrade/clean process...and because of the weirdness with jenkins conflicting with jenkins-common, it did not repopulate the /usr/share/jenkins directory properly.

    regardless, am glad it is working again. :)

    0 讨论(0)
  • 2021-02-12 11:22

    Ubuntu 18.04 LTS use Java 9 as default java

    Jenkins 2.107.2 still use Java 8

    [Solution]

    Install Java 8 before install Jenkins

    sudo add-apt-repository ppa:webupd8team/java
    sudo apt install oracle-java8-installer
    wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
    sudo apt-add-repository "deb https://pkg.jenkins.io/debian-stable binary/"
    sudo apt install jenkins
    

    See https://stackoverflow.com/a/49937744/900684

    0 讨论(0)
  • 2021-02-12 11:26

    I went to see the jenkins logs tail -f /var/log/jenkins/jenkins.log

    In my case it didn't start because I used incompatible java version. Update and make sure it sees correct java (In my case it should have been opened using JRE 1.7. To check, please use java -version command) and all should work

    0 讨论(0)
  • 2021-02-12 11:28

    Instead, you can run the following before the install to properly clean up any conffiles left by the distro version:

    sudo apt-get purge jenkins
    

    Then install the correct version.

    0 讨论(0)
提交回复
热议问题