Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

289
Views
AWS EC2 instance connection refused on port 8085

I have a new EC2 instance in AWS where I'm hosting a webpage too. i associated the instance to a security group, and some rules work (like connect to mysql or vesta). I have created a simple server with nodeJS and I want to listen a request from port 8085 (I could choose any....). I have create a inbound rule in the security group to listen to port 8085, and it seems it wants to listen, but the connection is refused: As it is refused, I don't think it is security group problem.

enter image description here

This is inbound security rules:

enter image description here enter image description here

I tried as other post mention "netstat -a -n | grep 8085" and "netstat -an | grep 8085" but I get nothing enter image description here "

I even disable firewall just in case enter image description here

This is my code to create the server

    const express = require('express');

    const app = express();
    
    const PORT = 8085;
    
    app.get('/', (req, res) => {
      res.send("testing");
    });
    
    app.listen(PORT, () => {
      console.log(`Server running at: http://localhost:${PORT}/`);
    });

When I run it I get the "Server running at http://localhost:8085/" in the console, but as when I type the IP address:8085 in the browser I get The site can't be reached. (port is not listening)

What am I doing wrong?

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

I'm not much of a telnet guy, so maybe I'm missing something. You do have a connection to the machine otherwise you would get a timeout error, so your security group is ok. But notice that you are listening for http requests. As I said before I'm not a telnet guy but I don't think that you are using http protocol in the terminal, as @EdsonCSouza mentioned. Try using curl and see what you get.

about 4 years ago · Juan Pablo Isaza Report

0

Your code seems ok. I tested here, your security groups seem ok too... Can you check if the node process are running when you check if the port are listening please? This is not clear from the information you have given.

about 4 years ago · Juan Pablo Isaza Report

0

Another thing that was missing was the firewall in VESTA. I did everything again and it didn't work until i configured it.

enter image description here

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!