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

447
Views
Elastic Beanstalk: Deploy Nodejs status Degraded Following services are not running: web

I just use eb deploy and also tried upload with zip, the elatic beanstalk environment show "degraded".

The log when I click in to see is

Overall 
Degraded

Impaired services on all instances.

Severe
Following services are not running: web.

My app.js file:

const express = require('express');
const app = express();

app.listen(3000, () => {
    console.log("Sever console log.")
});

package.json content

{
  "name": "project_api",
  "version": "1.0.0",
  "engines": {
    "node": "12.18.3"
  },
  "description": "the server side of the api",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "Businsoft Limited",
  "license": "ISC",
  "dependencies": {
    "dropbox": "^5.2.1",
    "express": "^4.17.1",
    "isomorphic-fetch": "^2.2.1",
    "nodemon": "^2.0.4"
  }
}

I think this is the simpliest start with Elastic Beanstalk, but somehow it fails. Any idea to solve it?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

After debug for a while, I managed to figure out the issue.

In package.json

I need to remove this line:

"main": "app.js",

And the add the "start" in the "scripts" like this:

"scripts":
  "start": "node app.js"

And then update the

app.listen(3000, () => {
    console.log("Sever console log.")
});

to

const port = process.env.port || 3000;
app.listen(port, () => {
    console.log("Sever console log.")
});

And then go to AWS Console > Elastic Beanstalk's environment > Configuration > Software Edit > add a properties at Environment properties

Name port Value 8080

Finally reupload the source code, and it works.

over 4 years ago · Santiago Trujillo 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!