When trying to start my node express service, I am having trouble with the infamous error "listen EADDRINUSE."
Here's the line where I attempt to call listen:
var server = app.listen(3000, function() {
console.log("listening on port %d", server.address().port);
});
The thing is, I can't find any other node process running, nor does anything show running on port 3000.
Here are the results I get for those inquiries:
$ ps aux | grep node
ec2-user 7780 0.0 0.0 110280 848 pts/1 S+ 17:41 0:00 grep node
$ nestat -anp | grep 3000
<nothing>
This is quite baffling. I could try to recycle the box, but it's running a live site and I'm reluctant to do that.
Is there anything else I can do to try to troubleshoot this?
EDIT: Thanks, Ali, for suggesting the obvious thing that I somehow missed. I am now up and running on port 3300. But, when I check netstat I don't see 3300 in there either. Which suggests to me that I have some sort of process running on 3000 that I don't know how to find. For the record, this is an AWS Linux AMI.