Hello, I’m cross-posting this from the aws forums, let me know if this is not allowed.
I’m having trouble accessing the url after deploying a sample application on Elastic Beanstalk. I’m deploying on cn-north-1 (Beijing) and already have past experience with this. What I’ve already tried:
Made sure the security group allows inbound connections from the 80 port.
Made sure I can ssh into the EC2 instance, and performed ‘curl -v 127.0.0.1’, and it responded successfully with the sample application contents.
Tried restarting and creating from scratch both the EC2 instance and the EBS app.
Created everything from scratch, side by side with my us-east console version, applying the same configuration. I could connect to the us-east url.
Tried all of the above while connected to a computer located in China.
Accessing the public ip of the console also doesn’t work. I’m not using load balancers or Route 53, I’m launching a single-instance.
Also, the health status is ok and logs don’t show any problems.
I’m trying to access the domain to use the application deployed with elastic beanstalk, but it times out, despite everything looking right. Also thanks for your advice on the ssh port
Haven’t tinkered with beanstalk in a while now but let’s try.
Timeout means you’re probably not reaching the environment, that’s why not logs are produced, since no traffic is reaching nginx.
I suggest you to inspect what dns resolution, and see if the ebs domain is pointing at the ec2 public ip correctly. If you do try and curl the ec2 public ip and get a response from nginx, that’s your problem then.
I’m trying to launch the sample python application, it runs on a nginx server. It seems to be running normally, since I can ssh into it, and curl to localhost. When I try to access the public ipv4 or the elasticbeanstalk url, it fails with “Connection Timed Out”
I doubled checked and both the service role and instance profile have the required policies. One strange thing, however, is that I can request logs on Elastic Beanstalk, but can’t view/download them unless I manually get them on the s3 bucket. Otherwise, I get a “You are not authorized to perform this operation” error.
Using curl on the public ip fails, it only works if I ssh into the environment and curl localhost.
I also double checked the VPC configuration (I’m using the default VPC). The Network ACL is connected to three subnets, each with inbound and outbound rules permitting all traffic. These subnets are linked to a route table that directs traffic to an internet gateway. I compared this setup with the functioning instance in the us-east region, and nothing seems out of normal.
Fails how? Timeout or refused?
I was just about to say the instance resides in a private subnet but looks like your covered that.
Set up a simple ec2 instance in the same box and subnet and see whether it can reach the instance/application.
There might be a policy blocking access to certain regions / countries. Are you in the US?
It fails with “Connection Timed Out”. I’m in Brazil, but I have access to a Chinese machine from where I tried both deploying and accessing the url. I’m actually trying to deploy the sample python application
It may be possible either the app of nginx (maybe both) are not binding to all Ethernet interfaces, and only to the loop one (127.0.01).
Try adjusting them to use 0.0.0.0 (all interfaces) and see it anything’s different.
Btw is anything hitting nginx at all? Any log entries through all those tries?
Check the machine it it’s port are opened, and try establishing a connection on 0.0.0.0 using telnet and nc
Attention: by default port 80&443 are blocked in China. This is due to legal reasons. To make this possible you have to talk to AWS support they then open the ports.
I was very surprised that 8080 worked but http/s not.
And also don’t forget you need an icp license for a website hosted in China mainland.