Why does Jenkins say “This Jenkins instance appears to be offline”

前端 未结 14 1487
野性不改
野性不改 2020-12-04 21:44

I have a fresh install of Jenkins 2.32.2 on Ubuntu. Opened a browser on the instance and get to a page titled Offline, with the message \"This Jenki

相关标签:
14条回答
  • 2020-12-04 21:59

    in my case (macOS), updating jdk to 8 and reinstall jenkins solved the problem.

    0 讨论(0)
  • 2020-12-04 22:04

    For Windows OS, Follow below steps

    1. Go to C:\Users\your user name\.jenkins
    2. Open the file: hudson.model.UpdateCenter.xml
    3. Update the value of "url" from "https://xxx" to "http://xxx"
    0 讨论(0)
  • 2020-12-04 22:05

    The issue is that for some reason Jenkins doesn't have access to the certificates chain of the Jenkins updates service. On Ubuntu 18.04 I had this issue and the next links and instructions helped me to start Jenkins properly without modifying the default url or using a proxy of some sort.

    Installing a new JDK 8(u101+) with JAVA_HOME should do the trick like at:

    • https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-18-04

    is making sure that Lets Encrypt certificates are installed and available on the OS/SYSTEM. To test it you can use the instructions at:

    • Does Java support Let's Encrypt certificates?

    And to install manually if required the Let's encrypt root chain using the next script:

    • https://gist.github.com/Firefishy/109b0f1a90156f6c933a50fe40aa777e
    0 讨论(0)
  • 2020-12-04 22:07

    There is something wrong with the internet connection of update center.I have met the same situation with Jenkins installed on macOS.

    You can try to modify the hudson.model.UpdateCenter.xml file.

    Jenkins installed with .pkg package on macOS,the file path is:
    /Users/Shared/Jenkins/Home/hudson.model.UpdateCenter.xml

    Jenkins installed by Homebrew on macOS,the file path is:
    /Users/{username}/.jenkins/hudson.model.UpdateCenter.xml

    Open the file:

    <?xml version='1.1' encoding='UTF-8'?>
    <sites>
      <site>
        <id>default</id>
        <url>https://updates.jenkins.io/update-center.json</url>
      </site>
    </sites>
    

    You can try to change https://updates.jenkins.io/update-center.json to:

    http://updates.jenkins.io/update-center.json
    

    or

    // If you are in China or near China area,https and http are both OK.
    https://mirrors.tuna.tsinghua.edu.cn/jenkins/updates/current/update-center.json
    

    And then you can restart Jenkins by:

    //loading the URL to restart Jenkins.
    http://localhost:8080/restart
    

    or

    // Use Homebrew command to restart Jenkins if you installed Jenkins LTS version by Homebrew.  
    brew services restart jenkins-lts
    
    0 讨论(0)
  • 2020-12-04 22:07
    jenkins_enable="YES"
    jenkins_home="/usr/local/jenkins"
    jenkins_user="jenkins"
    jenkins_args="--webroot=${jenkins_home}/war --httpListenAddress=*.*.*.*  --httpPort=8180"
    
    #jenkins_java_opts="-Djavax.net.ssl.trustStore=/usr/local/jenkins/cacerts -Djava.net.preferIPv6Addresses=true"
    
    #jenkins_java_opts="-Djavax.net.ssl.trustStore=/usr/local/jenkins/cacerts -Djava.net.preferIPv4Addresses=true"
    
    0 讨论(0)
  • 2020-12-04 22:10

    For macOS users:

    Step -1: Edit /Users/Shared/Jenkins/Home/hudson.model.UpdateCenter.xml and change url to use http instead of https.

    Step -2: Restart jenkins (for instance by going to http:localhost:8080) and reload the website

    Step -3(Optional): If it asks for user and password and if you don't remember creating one; default user is admin and copy the password from

    sudo cat /Users/Shared/Jenkins/Home/secrets/initialAdminPassword
    

    credits - @Alex in this post and @Tuan Pham here and @Joe Walsh for the comment on macOS directory path

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