jenkins学习2-首次输入密码后卡在空白页不加载

前言

如果在jenkins安装完成后,首次输入密码后,一直卡着空白页,加载不出选择插件的页面,需修改update-center.json的地址

出现问题

输入密码界面,按提示输入密码

如果一直在这样界面,卡着不动了,无法出现选择安装插件的页面

这个是因为更新地址是国外的被墙了,需修改成国内的地址

修改update-center.json地址

在/home/jenkins目录找到文件 hudson.model.UpdateCenter.xml

[root@VM_0_2_centos jenkins]# pwd
/home/jenkins
[root@VM_0_2_centos jenkins]# ll
total 72
-rw-r--r--  1 1000 1000 1666 Dec 29 16:26 config.xml
-rw-r--r--  1 1000 1000   50 Dec 29 16:18 copy_reference_file.log
-rw-r--r--  1 1000 1000  156 Dec 29 16:18 hudson.model.UpdateCenter.xml
-rw-------  1 1000 1000 1712 Dec 29 16:18 identity.key.enc
-rw-r--r--  1 1000 1000 1783 Dec 29 16:39 jenkins.install.InstallUtil.installingPlugins
-rw-r--r--  1 1000 1000    7 Dec 29 16:18 jenkins.install.UpgradeWizard.state
-rw-r--r--  1 1000 1000  171 Dec 29 16:18 jenkins.telemetry.Correlator.xml
drwxr-xr-x  2 1000 1000 4096 Dec 29 16:18 jobs
drwxr-xr-x  3 1000 1000 4096 Dec 29 16:18 logs
-rw-r--r--  1 1000 1000  907 Dec 29 16:18 nodeMonitors.xml
drwxr-xr-x  2 1000 1000 4096 Dec 29 16:18 nodes
drwxr-xr-x 11 1000 1000 4096 Dec 29 16:30 plugins
-rw-r--r--  1 1000 1000   64 Dec 29 16:18 secret.key
-rw-r--r--  1 1000 1000    0 Dec 29 16:18 secret.key.not-so-secret
drwx------  4 1000 1000 4096 Dec 29 16:18 secrets
drwxr-xr-x  2 1000 1000 4096 Dec 29 16:20 updates
drwxr-xr-x  2 1000 1000 4096 Dec 29 16:18 userContent
drwxr-xr-x  3 1000 1000 4096 Dec 29 16:18 users
drwxr-xr-x 11 1000 1000 4096 Dec 29 16:18 war
[root@VM_0_2_centos jenkins]# 

先查看文件内容

[root@VM_0_2_centos jenkins]# cat hudson.model.UpdateCenter.xml 
<?xml version='1.1' encoding='UTF-8'?>
<sites>
  <site>
    <id>default</id>
    <url>https://updates.jenkins.io/update-center.json</url>
  </site>

用vi编辑文件,修改https://updates.jenkins.io/update-center.jsonhttp://mirror.xmission.com/jenkins/updates/update-center.json修改之后:wq保存退出

重启jenkins

修改完成后重启下jenkins,在浏览器url地址后面加上 restart 重启jenkins ,如 http://ip:9090/restart

点yes即可重启了

posted @ 2019-12-29 16:47  上海-悠悠  阅读(5020)  评论(0编辑  收藏  举报