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 Jenkins instance appears to be offline" and offers options to "Configure Proxy" or "Skip Plugin Installation"
The machine clearly isn't offline as I just used the internet connection to do the installation. I also had a previous installation, done exactly the same way, that was working. I removed the previous installation as Pipelines wouldn't work and Google told me it was because of JDK 9. So I removed all the JDK/JRE installations as well as jenkins, fresh installed JDK 8 only, installed Jenkins, and got to here.
Jenkins has worked on this box in the past so what makes it think it is offline?
Update: Found a log file /var/lib/jenkins/logs/tasks/Download metadata.log and it starts with a message FATAL: Connection refused (Connection refused) I would think that indicates that the internet connection is OK, but something else is stopping it getting data?
Update: Based on other research I checked the Update Site in the Plugin Manager. This is listed as http://updates.jenkins-ci.org/update-center.json and, from the command line a wget of this file succeeds. So most definitely not a connection issue. Worked with both http and https, jenkins works with neither.
This section describes how to install Jenkins on a machine that does not have an internet connection. To install Jenkins itself, download the appropriate war file and transfer it to your machine.
In my case, it has something to do with SSL. I manage to fix it by editing /var/lib/jenkins/hudson.model.UpdateCenter.xml
and change url to use http
instead of https
.
Restart jenkins and reload the website, it no longer shows offline.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With