无法连接到 Jenkins 服务器 (Amazon Linux AMI) [英] Unable to Connect to Jenkins Server (Amazon Linux AMI)

查看:150
本文介绍了无法连接到 Jenkins 服务器 (Amazon Linux AMI)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我按照 http://bhargavamin.com/how-to-do/install-jenkins-on-amazon-linux-aws/

安装后我可以通过浏览器打开 Jenkins,但是当我选择选项安装插件"时它显示错误为无法连接到 Jenkins 服务器."

After installation I was able to open Jenkins through browser but when I selected option "Install Plugins" it showed error as "Unable to connect to Jenkins Server."

那么如何解决这个问题呢??

So then how to troubleshoot this issue??

推荐答案

这里的问题很简单,如果你在你的主机上做 curl http://127.0.0.1:8080 ,你应该收到一条消息,说明:

The problem here is pretty simple, if you do curl http://127.0.0.1:8080 on your host machine, you should get a message stating:

Authentication required
<!--
You are authenticated as: anonymous
Groups that you are in:

Permission you need to have (but didn't): hudson.model.Hudson.Administer
-->

这意味着 jenkins 具有不允许任何连接的匿名权限.

This means that jenkins has anonymous priviledges which is not allowing any connection.

要解决此问题,您必须进行两项更改:

To solve this issue, you will have to do two changes:

  1. 将 Jenkins 用户添加到 root 组:sudo usermod -a -G root jenkins

通过编辑文件 /etc/sysconfig/jenkins 并更改 JENKINS_LISTEN_ADDRESS="0.0.0.0"

Make Jenkins listen to all external IPs by editing file /etc/sysconfig/jenkins and changing the JENKINS_LISTEN_ADDRESS="0.0.0.0"

完成后,重新启动 jenkins 服务器,然后尝试为 jenkins 安装插件.

Once this is done, restart the jenkins server and then try to install plugins for jenkins.

这篇关于无法连接到 Jenkins 服务器 (Amazon Linux AMI)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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