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

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

问题描述

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

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

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用户添加到根组:sudo usermod -a -G root jenkins

让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天全站免登陆