Jenkins fails when running “service start jenkins”

前端 未结 21 2251
不知归路
不知归路 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:32

    Still fighting the same error on both ubuntu, ubuntu derivatives and opensuse. This is a great way to bypass and move forward until you can fix the actual issue.

    Just use the docker image for jenkins from dockerhub.

    docker pull jenkins/jenkins

    docker run -itd -p 8080:8080 --name jenkins_container jenkins

    Use the browser to navigate to:

    localhost:8080 or my_pc:8080

    To get at the token at the path given on the login screen:

    docker exec -it jenkins_container /bin/bash

    Then navigate to the token file and copy/paste the code into the login screen. You can use the edit/copy/paste menus in the kde/gnome/lxde/xfce terminals to copy the terminal text, then paste it with ctrl-v

    War File

    Or use the jenkins.war file. For development purposes you can run jenkins as your user (or as jenkins) from the command line or create a short script in /usr/local or /opt to start it.

    Download the jenkins.war from the jenkins download page:

    https://jenkins.io/download/

    Then put it somewhere safe, ~/jenkins would be a good place.

    mkdir ~/jenkins; cp ~/Downloads/jenkins.war ~/jenkins

    Then run:

    nohup java -jar ~/jenkins/jenkins.war > ~/jenkins/jenkins.log 2>&1

    To get the initial admin password token, copy the text output of:

    cat /home/my_home_dir/.jenkins/secrets/initialAdminPassword

    and paste that into the box with ctrl-v as your initial admin password.

    Hope this is detailed enough to get you on your way...

提交回复
热议问题