2
votes

I'm in the process of setting up a hadoop cluster for learning purpose. For which I tried to install java and before installing i checked for the prior installation of java by running java -version command and got the below message

The program 'java' can be found in the following packages: * default-jre * gcj-5-jre-headless * openjdk-8-jre-headless * gcj-4.8-jre-headless * gcj-4.9-jre-headless * openjdk-9-jre-headless Try: sudo apt install

As per the advise in one of the threads I ran sudo apt-get update and got the below messages repeatedly

$sudo apt-get update 0% [Connecting to ap-south-1.ec2.archive.ubuntu.com (54.168.13.207)]

Err:1 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu xenial InRelease Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.248.192.197), connection timed out [IP: 54.248.192.197 80]

Err:2 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu xenial-updates InRelease Unable to connect to ap-south-1.ec2.archive.ubuntu.com:http: [IP: 54.248.192.197 80]

Err:3 http://ap-south-1.ec2.archive.ubuntu.com/ubuntu xenial-backports InRelease Unable to connect to ap-south-1.ec2.archive.ubuntu.com:http: [IP: 54.248.192.197 80]

Err:4 http://security.ubuntu.com/ubuntu xenial-security InRelease Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::19). - connect (101: Network is unreachable) [IP: 2001:67c:1562::19 80]

Reading package lists... Done

W: Failed to fetch http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Could not connect to ap-south-1.ec2.archive.ubuntu.com:80 (54.248.192.197), connection timed out [IP: 54.248.192.197 80]

W: Failed to fetch http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Unable to connect to ap-south-1.ec2.archive.ubuntu.com:http: [IP: 54.248.192.197 80]

W: Failed to fetch http://ap-south-1.ec2.archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Unable to connect to ap-south-1.ec2.archive.ubuntu.com:http: [IP: 54.248.192.197 80]

W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Cannot initiate the connection to security.ubuntu.com:80 (2001:67c:1562::19). - connect (101: Network is unreachable) [IP: 2001:67c:1562::19 80]

W: Some index files failed to download. They have been ignored, or old ones used instead.

What should i do now ?

Will i face a similar problem while installin hadoop too ?

Thanks

1
can you show ur instance security grp settings? - user156327
@AmitKhandelwal Security Group: sg-113f2e7 Type Protocol Port Range Destination Description HTTP TCP 80 0.0.0.0/0 for TCP HTTP All traffic All All 0.0.0.0/0 HTTPS TCP 443 0.0.0.0/0 for TCP HTTPS *************** the above table is crumbled to lines. below is the explanation. for HTTP allocated port 80 and destination as 0.0.0.0/0 for HTTPS allocated port 443 and destination as 0.0.0.0/0 above all there is read-only entry by amazon for fail-safe - luckyluke
is your instance is launched in private subnet ? can you ping the ip of ubuntu of site from very you are trying to download. - user156327
@AmitKhandelwal - Sorry, I'm new to networking, I just went by the steps in a document for setting up hadoop cluster. there is no mention about it. Where should i check for private subnet ? - luckyluke
is your instance is behind any firewall ? and are you using your company aws account or your private aws account ? - user156327

1 Answers

1
votes

Looks like the outbound internet access from your EC2 instance is blocked by something. It can be the security group/ACL/the VPN Settings.

Try pinging to some internet address and see if its working. Once that is resolved, it should work fine.