Jitendra Pancholi
Jitendra Pancholi

Reputation: 7562

AWS Linux (Ubuntu) hosted application is not accessible from public ip

I hosted a nodejs(express hello world app) application on AWS Linux(Ubuntu 16.04) on free-tier. When i do wget http://localhost:8080 it runs successfully and saved the output in index.html file. But when i do the same thing with the public ip (wget http://35.154.40.189:8080) of my instance, it says

Connecting to 35.154.40.189:8080... failed: No route to host.

I also used the steps given in http://www.lauradhamilton.com/how-to-set-up-a-nodejs-web-server-on-amazon-ec2 to forward all ipv4 traffic to my application but it doesn't work.

I also enabled port 8080 from aws console. enter image description here

netstat -atn says 

enter image description here

netstate -ntlp says

enter image description here

I tried everything which i get on internet but unable to resolve the issue. Now i'm too much frustrated. Any help would be highly appreciable.

Upvotes: 0

Views: 455

Answers (1)

Adiii
Adiii

Reputation: 60144

  • MAke Your Instance in AWS first
  • Enable inbound rule as u mention in picutre

  • Enable user group after ssh connection with AWS ubuntu instance

  • once instance start running then Install node properly
  • sudu apt-get update
  • sudo apt-get install libssl-dev g++ make
  • download source code of node from web node.tar.gz wih command wget link https://nodejs.org/dist/v6.9.1/node-v6.9.1.tar.gz
  • tar -xvf node -v0.10.32.tar.gz
  • now goto node after unzip .gz
  • ./configure && make && sudo make && sudo make install

boom your node server is ready on new AWS instances

or watch this https://www.youtube.com/watch?v=WxhFq64FQzA&t=1693s

Upvotes: 1

Related Questions