title: listen EADDRINUSE: address already in use -> No matter what port I use?
body: <p>NodeJS version: LTS 12.17 installed like this:</p>
  
  <pre><code>curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
  sudo apt install nodejs
  </code></pre>
  
  <p>I have a pretty weird issue:</p>
  
  <p>One of my NodeJS app suddenly reports: <code>listen EADDRINUSE: address already in use</code> and it doesn't help anything no matter what port # I try to change it to?</p>
  
  <p>The full trace-stack looks like this:</p>
  
  <pre><code>Error: listen EADDRINUSE: address already in use 0.0.0.0:6080
      at Server.setupListenHandle [as _listen2] (net.js:1313:16)
      at listenInCluster (net.js:1361:12)
      at doListen (net.js:1498:7)
      at processTicksAndRejections (internal/process/task_queues.js:85:21)
  </code></pre>
  
  <p>I'm listening like this (_wl = a Winston logger instance):</p>
  
  <pre><code>&gt; _server.listen(_port, '0.0.0.0', function () { _wl.info('SERVER STARTED! (listening on port # ' + _port + ')')});
  </code></pre>
  
  <p>I have just setup this AWS EC2 Ubuntu 20.04 instance - so I guess somehow it has something to do with this. It has been working for years on a lot of different instance earlier Windows (I guess I have never run it on Ubuntu earlier).</p>
  
  <p>I  execute like like:</p>
  
  <pre><code>1. cd into folder
  2. node ./server.js (I have also tried to use Sudo)
  </code></pre>
  
  <p>Can it have something to do with permissions?</p>
  
  <p>I have tried to allow all in /out going traffic in the server atteched Security Group.</p>
  
  <p>I have check that the firewall in Ubuntu 20.04 is disabled as well.</p>
  
  <p>Also, on the same server I'm running a Python app which exposes a web socket server and the NodeJS app has no issue to subscribe to this connection...</p>
  
  <p>And yes - I have tried to check all ports in use at the server and only few ports are in use.
  The NodeJS app also try to expose a websocket server at a given port - but no matter what port I try to use I get the error above.</p>