0

I started a NodeJS application with forever start app.js. The code had a bug and the server is not running and not responding. When I launch it again with npm start, I see that the port is already in use:

events.js:288
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE: address already in use :::3000
    at Server.setupListenHandle [as _listen2] (net.js:1309:16)

When I list the processes using that port, I see none:

$ sudo  netstat -ltnp | grep -w ':3000'
$ fuser 3000/tcp
$ lsof -i :3000

How can I stop an application started with forever start?

miguelmorin
  • 249
  • 1
  • 5
  • 13

1 Answers1

0

I did not see any processes using that port because there weren't any. I had two calls to listening on that port, due to legacy code from listening to webhooks. Removing one of them solved the problem.

miguelmorin
  • 249
  • 1
  • 5
  • 13