title: MQTT-over-Websockets Error: listen EADDRINUSE
body: <p>Following this doc
  <a href="https://github.com/mcollina/mosca/wiki/MQTT-over-Websockets" rel="nofollow">https://github.com/mcollina/mosca/wiki/MQTT-over-Websockets</a></p>
  
  <p>I set up the broker in my localhost like</p>
  
  <pre><code>var settings = {
    http: {
      port: 1884,
      bundle: true,
      static: './'
    }
  };
  
  //here we start mosca
  var server = new mosca.Server(settings);
  </code></pre>
  
  <p>but when I run</p>
  
  <blockquote>
    <p>node broker</p>
  </blockquote>
  
  <p>I've got this ugly error</p>
  
  <pre><code>events.js:85
        throw er; // Unhandled 'error' event
              ^
  Error: listen EADDRINUSE
      at exports._errnoException (util.js:746:11)
      at Server._listen2 (net.js:1146:14)
      at listen (net.js:1172:10)
      at net.js:1270:9
      at dns.js:85:18
      at process._tickCallback (node.js:355:11)
      at Function.Module.runMain (module.js:503:11)
      at startup (node.js:129:16)
      at node.js:814:3
  </code></pre>
  
  <p>to check if I've got other process</p>
  
  <pre><code>ps -ax | grep node
  5266 pts/2    R+     0:00 grep --colour=auto node
  kill -9 5266
  bash: kill: (5266) - No such process
  </code></pre>
  
  <p>Do you what's the problem ?</p>
  
  <h2>UPDATE</h2>
  
  <p>Thanks to @hardillb and @ralight
  I worked it out with</p>
  
  <pre><code>sudo lsof -i TCP:1883
  </code></pre>
  
  <p>if there is mosquitto simple
  run</p>
  
  <pre><code>sudo service mosquitto stop
  </code></pre>