[英]When I access Jenkins trough an EC2 I get an error
I got an issue.我有一个问题。 I created a Jenkins AMI that i snapshoted it and created an image from a running ec2 instance with an already configured Jenkins Master on port 8443 with an https certificate.我创建了一个 Jenkins AMI,我对其进行了快照,并从一个正在运行的 ec2 实例创建了一个映像,该实例在端口 8443 上已经配置了 Jenkins Master,并带有 https 证书。 But when I curl to the jenkins instance i get the following: [1]: https://i.stack.imgur.com/K2tz0.png但是当我 curl 到 jenkins 实例时,我得到以下信息:[1]: https://i.stack.imgur.com/K2tz0.png
I checked Jenkins logs and everything was normal.我检查了 Jenkins 日志,一切正常。 And my Elatic Load balancer is healthy which means the security groups and other things are working just fine.我的 Elatic 负载均衡器很健康,这意味着安全组和其他东西运行良好。 Does anybody have a clue why is it giving a 403 Forbidden?有人知道为什么它会给出 403 Forbidden 吗? Another point is that I can even access the GUI另一点是我什至可以访问 GUI
By using curl
you're making your life harder but look at some of what comes back:通过使用curl
,您的生活变得更加艰难,但看看一些返回的内容:
<meta http-equiv='refresh' content='1;url=/login?from=%2F'/>
If you've done HTML programming, this is one way of having the browser execute a redirect.如果您已经完成 HTML 编程,这是让浏览器执行重定向的一种方法。 Why Jenkins doesn't do some sort of HTTP redirect I don't know but the code is telling you that, after 1 second, redirect to the url /login
.为什么 Jenkins 不做某种 HTTP 重定向我不知道,但代码告诉你,1 秒后,重定向到 url /login
。
curl
isn't going to interpret the HTML for you, unlike the browser.与浏览器不同, curl
不会为您解释 HTML。 Jenkins is working fine - you just need to follow what the HTML and JavaScript code is telling you to do through curl. Jenkins 工作正常 - 您只需按照 HTML 和 JavaScript 代码告诉您通过 ZF6E57C9DE709E535480 执行的操作即可。
The 403 error is the Jenkins application specifically saying your current user is not allowed access to the current action. 403 错误是 Jenkins 应用程序特别指出您的当前用户不允许访问当前操作。
It appears you're not logged in so your action is treated as an anonymous user.您似乎没有登录,因此您的操作被视为匿名用户。 If the anonymous user should have the permissions to access this action you will need to add them.如果匿名用户应该有权访问此操作,您将需要添加它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.