Agile_Data_Code_2 icon indicating copy to clipboard operation
Agile_Data_Code_2 copied to clipboard

Ec2 won't connect to internet

Open aashnashroff1 opened this issue 5 years ago • 3 comments

Failed to connect to https://changelogs.ubuntu.com/meta-release. Check your Internet connection or proxy settings

ubuntu@ip:~$ sudo apt update Err:1 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu cosmic InRelease
Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.248.204.122), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.168.13.207), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.199.72.88), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.248.192.197), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.168.29.123), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.248.22.77), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.248.7.22), connection timed out Err:2 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu cosmic-updates InRelease
Unable to connect to ap-south-1.ec2.archive.ubuntu.com:http: Err:3 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu cosmic-backports InRelease Unable to connect to ap-south-1.ec2.archive.ubuntu.com:http: Err:4 http://security.ubuntu.com/ubuntu cosmic-security InRelease Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::16). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1560:8001::14). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8001::21). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1560:8001::11). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8001::17). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::19). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.14), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.24), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.23), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.174), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.26), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.24), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.31), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.173), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.162), connection timed out Reading package lists... Done
Building dependency tree
Reading state information... Done All packages are up to date. W: Failed to fetch http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/dists/cosmic/InRelease Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.248.204.122), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.168.13.207), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.199.72.88), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.248.192.197), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.168.29.123), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.248.22.77), connection timed out Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.248.7.22), connection timed out W: Failed to fetch http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/dists/cosmic-updates/InRelease Unable to connect to ap-south-1.ec2.archive.ubuntu.com:http: W: Failed to fetch http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/dists/cosmic-backports/InRelease Unable to connect to ap-south-1.ec2.archive.ubuntu.com:http: W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/cosmic-security/InRelease Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::16). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1560:8001::14). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8001::21). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1560:8001::11). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1360:8001::17). - connect (101: Network is unreachable) Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::19). - connect (101: Network is unreachable) Could not connect to security.ubuntu.com:80 (91.189.91.14), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.24), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.23), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.149), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.174), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.26), connection timed out Could not connect to security.ubuntu.com:80 (91.189.91.24), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.31), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.173), connection timed out Could not connect to security.ubuntu.com:80 (91.189.88.162), connection timed out W: Some index files failed to download. They have been ignored, or old ones used instead.

ubuntu@ip:~$ pyspark pyspark: command not found ubuntu@ip:~$ pip install pyspark

Command 'pip' not found, but can be installed with:

sudo apt install python-pip

ubuntu@:~$ sudo apt install python-pip Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package python-pip

aashnashroff1 avatar Feb 22 '20 06:02 aashnashroff1

@aashnashroff1 It looks like the instance can't connect to the internet. Was this transient or did it go away?

rjurney avatar Feb 22 '20 14:02 rjurney

Still getting this error:

ubuntu@:/home$ sudo add-apt-repository -y ppa:openjdk-r/ppa Ign:1 http://us-east-2.ec2.archive.ubuntu.com/ubuntu cosmic InRelease Ign:2 http://us-east-2.ec2.archive.ubuntu.com/ubuntu cosmic-updates InRelease
Ign:3 http://us-east-2.ec2.archive.ubuntu.com/ubuntu cosmic-backports InRelease Err:4 http://us-east-2.ec2.archive.ubuntu.com/ubuntu cosmic Release
404 Not Found [IP: 52.15.159.198 80] Err:5 http://us-east-2.ec2.archive.ubuntu.com/ubuntu cosmic-updates Release
404 Not Found [IP: 52.15.159.198 80] Err:6 http://us-east-2.ec2.archive.ubuntu.com/ubuntu cosmic-backports Release
404 Not Found [IP: 52.15.159.198 80] Ign:7 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Err:8 http://security.ubuntu.com/ubuntu cosmic-security Release
404 Not Found [IP: 91.189.91.14 80] Hit:9 http://ppa.launchpad.net/openjdk-r/ppa/ubuntu cosmic InRelease Reading package lists... Done E: The repository 'http://us-east-2.ec2.archive.ubuntu.com/ubuntu cosmic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://us-east-2.ec2.archive.ubuntu.com/ubuntu cosmic-updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://us-east-2.ec2.archive.ubuntu.com/ubuntu cosmic-backports Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://security.ubuntu.com/ubuntu cosmic-security Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

aashnashroff1 avatar Feb 23 '20 11:02 aashnashroff1

I am still getting the error too. Is this because Java 8 SDK requires an Oracle account or the ec2 cannot connect to the internet? I had to manually upload the SDK from a tar file and got pyspark to work.

kayne10 avatar Mar 29 '20 23:03 kayne10

@kayne10 sorry for the ancient reply, but you can now just use the Dockerfile and docker-compose.

rjurney avatar Aug 10 '22 18:08 rjurney