title: connect ECCONREFUSED ::1:50106
body: <p>I'm making a discord bot with Node.js and erela.js, but when I try to get the server that handles erela on, it shows me this error:</p>
  
  <pre><code> A node error occured: connect ECONNREFUSED ::1:50106
  2020-05-01T21:23:19.367157+00:00 app[worker.1]: events.js:287
  2020-05-01T21:23:19.367175+00:00 app[worker.1]:       throw er; // Unhandled 'error' event
  2020-05-01T21:23:19.367176+00:00 app[worker.1]:       ^
  2020-05-01T21:23:19.367176+00:00 app[worker.1]: 
  2020-05-01T21:23:19.367177+00:00 app[worker.1]: Error: connect ECONNREFUSED ::1:50106
  2020-05-01T21:23:19.367178+00:00 app[worker.1]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
  2020-05-01T21:23:19.367179+00:00 app[worker.1]: Emitted 'error' event on WebSocket instance at:
  2020-05-01T21:23:19.367179+00:00 app[worker.1]:     at ClientRequest.&lt;anonymous&gt; (/app/node_modules/ws/lib/websocket.js:554:15)
  2020-05-01T21:23:19.367179+00:00 app[worker.1]:     at ClientRequest.emit (events.js:310:20)
  2020-05-01T21:23:19.367180+00:00 app[worker.1]:     at Socket.socketErrorListener (_http_client.js:426:9)
  2020-05-01T21:23:19.367181+00:00 app[worker.1]:     at Socket.emit (events.js:310:20)
  2020-05-01T21:23:19.367181+00:00 app[worker.1]:     at emitErrorNT (internal/streams/destroy.js:92:8)
  2020-05-01T21:23:19.367181+00:00 app[worker.1]:     at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
  2020-05-01T21:23:19.367182+00:00 app[worker.1]:     at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  2020-05-01T21:23:19.367185+00:00 app[worker.1]:   errno: 'ECONNREFUSED',
  2020-05-01T21:23:19.367185+00:00 app[worker.1]:   code: 'ECONNREFUSED',
  2020-05-01T21:23:19.367185+00:00 app[worker.1]:   syscall: 'connect',
  2020-05-01T21:23:19.367186+00:00 app[worker.1]:   address: '::1',
  2020-05-01T21:23:19.367186+00:00 app[worker.1]:   port: 50106
  </code></pre>
  
  <p>The index.js code is:</p>
  
  <pre><code>const discord = require("discord.js");
  const fs = require("fs");
  const bot = new discord.Client({disableEveryone: true});
  const prefix = "."
  const token = process.env.token;
  const { ErelaClient } = require('erela.js');
  
  function server () {
    require ("./server.js");
  }
  
  
  // When bot ready
  bot.on("ready", async () =&gt; {
  server(); 
    bot.music = new ErelaClient(bot, [
      {
        host: process.env.HOST,
        port: process.env.PORT,
        password: process.env.PASSWORD
      }
    ]);  
    bot.music.on("nodeConnect", node =&gt; console.log("New node connected, music is now working on the bot!"));
  bot.music.on("nodeError", (node, error) =&gt;  console.log(`A node error occured: ${error.message}`));
  </code></pre>
  
  <p>And the server.js code is:</p>
  
  <pre><code>var express = require('express');
  var app = express();
  
  app.get('/', function (req, res) {
    res.send('Hello World!');
  });
  
  app.listen(7000, function () {
    console.log('Example app listening on port 7000, so erela will work!');
   });
  </code></pre>
  
  <p>I don't know why it's happening. If someone has an answer for this. I'd be grateful</p>