apt-get update Connection Timeout 80 on ec2

Asked by Karthik on 2019-09-06

There's a error when doing sudo apt-get update in ec2

root@ip-172-31-46-30:/opt/apache-8# apt-get update
Ign:1 https://pkg.jenkins.io/debian-stable binary/ InRelease
Hit:2 https://pkg.jenkins.io/debian-stable binary/ Release
Err:4 http://ppa.launchpad.net/linuxuprising/java/ubuntu bionic InRelease
  Could not connect to ppa.launchpad.net:80 (91.189.95.83), connection timed out
Err:5 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
  Unable to connect to ppa.launchpad.net:http:
Err:6 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic InRelease
  Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (server_public_ip), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (server_public_ip), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (server_public_ip), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (server_public_ip), connection timed out
Err:7 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-updates InRelease
  Unable to connect to ap-south-1.ec2.archive.ubuntu.com:http:
Err:8 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu bionic-backports InRelease
  Unable to connect to ap-south-1.ec2.archive.ubuntu.com:http:
Err:9 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
  Cannot initiate the connection to apt.postgresql.org:80 (2620:122:b000:7::244). - connect (101: Network is unreachable) Cannot initiate the connection to apt.postgresql.org:80 (2001:4800:3e1:1::246)
......

These the processes i performed before this :

Deployed some wars in Tomcat

Installed and ran apache2.4 to deploy a flask application on VirtualHost port 80, ( which was configured )
following this link https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps

Created Tomcat service

Few Jenkins Deployments

Nothing else.

I've tried almost all types of fixes i could find. I changed the port of Apache as well. Not sure where the issue lies

Question information

Language:
English Edit question
Status:
Needs information
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2019-09-09
Last reply:
2019-09-09
Manfred Hampl (m-hampl) said : #1

"connect (101: Network is unreachable)"

This probably indicates a general network problem on your side.

If you try again now (it's two hours later), do you still get the same errors?

Karthik (karthik-mn93) said : #2

No i'm still getting the same errors as i did before. Is it something like, apache2 interfering with port 80 ? because i had a flask app running at port 80 first, then i changed it to another port . . . I'm still puzzled

Manfred Hampl (m-hampl) said : #3
Karthik (karthik-mn93) said : #4

FOR Ping
----------------------------------------------------------------------------------------------------------------------

PING 80 (0.0.0.80) 56(124) bytes of data.
^C
--- 80 ping statistics ---
13 packets transmitted, 0 received, 100% packet loss, time 12268ms

Curl shows nothing
----------------------------------------------------------------------------------------------------------------------

I made another discovery, i had setup a remote desktop tunnel connection while setting up the server, while using ec2 ubuntu ui, i found that all websites were working, so there is access to internet, not sure what's with port 80 alone

Manfred Hampl (m-hampl) said : #5

Your ping command looks wrong.
It seems that you tried to ping a server named "80" which of course does not exist.

Karthik (karthik-mn93) said : #6

Actually that was the output of the command i used the format :

ping 123.345.23.657 80
curl 123.345.23.657:80

Manfred Hampl (m-hampl) said : #7

As far as I know ping does not allow speifying a port number.
What do you get for
ping -c 5 apt.postgresql.org
ping -c 5 ap-south-1.ec2.archive.ubuntu.com
on the system in question?

Can you help with this problem?

Provide an answer of your own, or ask Karthik for more information if necessary.

To post a message you must log in.