简体   繁体   English

无法访问EC2实例

[英]Unable to access EC2 instance

I am using AWS and i created Auto scaling launch configuration using shell Script: 我正在使用AWS并使用Shell脚本创建了自动缩放启动配置:

#!/bin/sh
curl -L https://us-west-2-aws-training.s3.amazonaws.com/awsu-spl/spl03-working-elb/static/bootstrap-elb.sh | sh

After creating this and the load balancer, two instances were created. 在创建此实例和负载均衡器之后,创建了两个实例。 I then copied the DNS Name and pasted it in browser, but it says: 然后,我复制了DNS名称并将其粘贴在浏览器中,但是它说:

This site can’t be reached

internal-elb-asg-167368762.us-east-1.elb.amazonaws.com took too long to respond.
Go to http://amazonaws.com/
Search Google for internal elb asg 167368762 east amazonaws
ERR_CONNECTION_TIMED_OUT

EDIT 编辑

I followed your steps and it failed. 我按照您的步骤操作,但失败了。

You have to change this part of the User Data: 您必须更改用户数据的这一部分:

#!/bin/sh curl -L https://us-west-2-aws-training.s3.amazonaws.com/awsu-spl/spl03-working-elb/static/bootstrap-elb.sh | sh

With this: 有了这个:

#!/bin/sh
curl -L https://us-west-2-aws-training.s3.amazonaws.com/awsu-spl/spl03-working-elb/static/bootstrap-elb.sh | sh

Edit: As @john-rotenstein mentioned is not necessary to use sudo. 编辑:由于@ john-rotenstein提到使用sudo并不是必需的。

Also, check this: 另外,请检查以下内容:

  • You have the correct security groups on EC2 and with your ELB. 您在EC2上和ELB上具有正确的安全组。
  • Check if you are listening to the port 80 in you ELB. 检查您是否正在监听ELB中的端口80。
  • The port 80 must be opened in your EC2 security group to your ELB security group and the port 80 must be opened worldwide (0.0.0.0) in your ELB security group. 必须在EC2安全组中向ELB安全组打开端口80,并且必须在ELB安全组中在全球范围内打开端口80(0.0.0.0)。

Finally, are you sure that you are not using an internal load balancer right? 最后,您确定您没有使用内部负载均衡器吗?

Hope it helps you. 希望对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM