为什么 Jenkins 会说“这个 Jenkins 实例似乎处于离线状态"? [英] Why does Jenkins say "This Jenkins instance appears to be offline"

查看:277
本文介绍了为什么 Jenkins 会说“这个 Jenkins 实例似乎处于离线状态"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Ubuntu 上全新安装了 Jenkins 2.32.2.在实例上打开浏览器并转到标题为离线的页面,其中显示消息此 Jenkins 实例似乎处于离线状态",并提供配置代理"或跳过插件安装"

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"

机器显然没有离线,因为我只是使用互联网连接进行安装.我也有一个以前的安装,以完全相同的方式完成,它正在工作.我删除了之前的安装,因为 Pipelines 不起作用,Google 告诉我这是因为 JDK 9.所以我删除了所有 JDK/JRE 安装以及 jenkins,仅全新安装的 JDK 8,安装了 Jenkins,然后到了这里.

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 过去曾研究过这个盒子,那么是什么让它认为它是离线的?

Jenkins has worked on this box in the past so what makes it think it is offline?

更新: 找到一个日志文件/var/lib/jenkins/logs/tasks/Download metadata.log并以消息FATAL:拒绝连接(连接被拒绝)开头我认为这表明互联网连接正常,但其他原因阻止它获取数据?

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?

更新:根据其他研究,我检查了插件管理器中的更新站点.这被列为 http://updates.jenkins-ci.org/update-center.json 并且,从命令行对该文件的 wget 成功.所以绝对不是连接问题.使用 http 和 https,jenkins 两者都不使用.

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.

推荐答案

就我而言,它与 SSL 有关.我设法通过编辑 /var/lib/jenkins/hudson.model.UpdateCenter.xml 并更改 url 以使用 http 而不是 https 来修复它>.

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.

重启 jenkins 并重新加载网站,它不再显示离线.

Restart jenkins and reload the website, it no longer shows offline.

这篇关于为什么 Jenkins 会说“这个 Jenkins 实例似乎处于离线状态"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆