Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

198
Vistas
How to resolve persistent node error "EADDRINUSE"?

I'm trying to run an http server through node but I keep getting the EADDRINUSE error with specifically port 5000 (trying various others works fine). I have tried using sudo lsof -i tcp:5000 and sudo kill -9 [PID]. Here is one of those shell lines:

Borealis:BackEnd grepgrok$ sudo lsof -i tcp:5000
COMMAND     PID  USER       FD   TYPE             DEVICE SIZE/OFF NODE NAME
ControlCe 34117  grepgrok   26u  IPv4 0x64883005c755e215      0t0  TCP *:commplex-main (LISTEN)
ControlCe 34117  grepgrok   27u  IPv6 0x64883005c59ef42d      0t0  TCP *:commplex-main (LISTEN)
Borealis:BackEnd grepgrok$ sudo kill -9 34117
Borealis:BackEnd grepgrok$ 

Yet I still get

Borealis:BackEnd grepgrok$ node ./bin/www
Port 5000 is already in use

Note: I am basing this off the npx express-generator sample project which includes this for errors:

function onError(error) {
  if (error.syscall !== 'listen') {
    throw error;
  }

  var bind = typeof port === 'string'
    ? 'Pipe ' + port
    : 'Port ' + port;

  // handle specific listen errors with friendly messages
  switch (error.code) {
    case 'EACCES':
      console.error(bind + ' requires elevated privileges');
      process.exit(1);
      break;
    case 'EADDRINUSE':
      console.error(bind + ' is already in use');
      process.exit(1);
      break;
    default:
      throw error;
  }
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

What ended up working (mostly except for a bit of funk) is using kill-port 5000; nodemon app.js as my npm run dev script.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda