title: Error: listen EADDRNOTAVAIL: address not available **.***.***.**:3004
body: <p>I have installed <strong>node.js</strong> on a google cloud server. But I'm getting an error while running the command <strong>sudo node test.js</strong>. The web root is /var/www/*******/ and the virtual host file is /etc/apache2/*****.conf</p>
  
  <p>I'm trying to access it through the port 3004. I have enabled it in the firewall as well.</p>
  
  <p><strong>Virtual host configuration</strong>:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
          ServerName domainname.com
          ServerAdmin test@gmail.com
          DocumentRoot "/var/www/******/"
  
          &lt;Directory "/var/www/******/"&gt;
                  Options -Indexes
                  AllowOverride All
                  Require all granted
          &lt;/Directory&gt;
  
  &lt;/Virtualhost&gt;
  
  &lt;VirtualHost *:3004&gt;
          ServerName domainname.com
          ServerAdmin test@gmail.com
          DocumentRoot "/var/www/******/"
  
          &lt;Directory "/var/www/******/"&gt;
                  Options -Indexes
                  AllowOverride All
                  Require all granted
          &lt;/Directory&gt;
  
  &lt;/Virtualhost&gt;
  </code></pre>
  
  <p>===============================================================</p>
  
  <p><strong>Error</strong>:</p>
  
  <pre><code>Server running at http://domainname.com:3004/
  events.js:173
        throw er; // Unhandled 'error' event
        ^
  
  Error: listen EADDRNOTAVAIL: address not available **.***.***.**:3004
      at Server.setupListenHandle [as _listen2] (net.js:1239:19)
      at listenInCluster (net.js:1304:12)
      at GetAddrInfoReqWrap.doListen [as callback] (net.js:1443:7)
      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:63:10)
  Emitted 'error' event at:
      at emitErrorNT (net.js:1283:8)
      at processTicksAndRejections (internal/process/next_tick.js:76:17)
  </code></pre>
  
  <p>Please help.</p>
  
  <p>Thanks,
  Vishnu.</p>