- Más nuevo
- Más votos
- Más comentarios
I am assuming you have verified the server portion of your application is up and running on the server. The issue may be a change in IP address. When you create an EC2 instance and let the creation process assign a public IP address - this address is not permanent. When your EC2 server reboots, it will pull a new public IP. I am guessing you may be rebooting the server every 26 days and this is happening. To ensure you keep the same public IP address between reboots, you need to allocate an elastic IP address manually and assign it to your EC2 instance.
If this is not the answer, can you describe what you do to restore service after the 26 day problem occurs?
The Ubuntu OS is trying to reach ap-south-1.ec2.archive.ubuntu.com and security.ubuntu.com, both on port 80, but is not able to establish the connection.
That single rule in the outbound security group rule should be anough to allow this, unless there is also a NACL in place that would restrict this (by default there isn't, it would have to be something that was added) but it's still worth checking there isn't a NACL in place for the subnet that the EC2 is in https://docs.aws.amazon.com/vpc/latest/userguide/vpc-network-acls.html
Assuming the SG is alright and there is no NACL blocking things, how do you connect onto the EC2? Do you use SSH over the internet, because if you do then that means the associated infrastructure (internet gateway, route tabe, etc.) is likely all good. If it's another method, e.g. over Direct Connect or VPN, or via a bastion, then can you describe that.
From the host are you able to connect to other sites on the intenet, e.g. curl www.google.com
?
I am able to ping.
Contenido relevante
- OFICIAL DE AWSActualizada hace 7 meses
- OFICIAL DE AWSActualizada hace 8 meses
- OFICIAL DE AWSActualizada hace 3 años
No, I did not restart until I started seeing these issues. I have allocated the Elastic IP as well that you have mentioned but I still have the same issue.
I am not able to restore services unless I recreate another instance and redeploy my applications there
Are you able to verify all ports are up, service running and responding locally on the server... or from a server in the same subnet? Taking some more guesses that perhaps an attached drive has filled and is preventing a service from starting as it might not be able to write logs or such??
Nop. No memory issue. I am now facing this issue on a newly setup server.
I reread your question and wanted to take a different route. Based on the output you provided, it looks like you have a Ubuntu Jammy EC2 instance and running an apt update (or such). It is failing as it can't reach the various package managers. So a few more questions: