Jenkins fails when running “service start jenkins”

前端 未结 21 2300
不知归路
不知归路 2021-01-30 20:46

I installed jenkins on Cnetos 7 using the following:

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --impor         


        
相关标签:
21条回答
  • 2021-01-30 21:36

    I had the same issue, and when I checked if Java is installed I realised it's not, so installing Java solved the problem for me.

    Check for java:

    java -version
    

    If Java is installed in the system, the command will return the java version otherwise it will show a message like this.

    The program 'java' can be found in the following packages:
     * default-jre
     * gcj-5-jre-headless
     * openjdk-8-jre-headless
     * gcj-4.8-jre-headless
     * gcj-4.9-jre-headless
     * openjdk-9-jre-headless
    

    To install java use the following command.

    sudo apt-get install default-jre
    
    0 讨论(0)
  • 2021-01-30 21:37

    For ubuntu 16.04, there is firewall issue. You need to open 8080 port using following command:

    sudo ufw allow 8080
    

    Detailed steps are given here: https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-16-04

    0 讨论(0)
  • 2021-01-30 21:39

    ERROR: Linux / Centos:

    Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.

    Solution:

    • Edit the Jenkins init file by doing

      sudo vi /etc/init.d/jenkins
      
    • Add your own Java path, for example:

      /opt/oracle/product/java/jdk1.8.0_45/bin/java
      
    • Restart the service:

      sudo service jenkins start
      sudo service jenkins status
      sudo service jenkins stop
      
    0 讨论(0)
提交回复
热议问题