EnriqCG / rcon-srcds

A zero-dependency Typescript library for the Source/Minecraft RCON Protocol
https://www.npmjs.com/package/rcon-srcds
MIT License
60 stars 20 forks source link

code: 'ETIMEDOUT' on authentication #18

Closed alexvolley closed 2 years ago

alexvolley commented 2 years ago

Hi, I'm using this to try connect to a left 4 dead 2 server.

Using the code exactly in the docs is giving me a ETIMEDOUT error code. Am I doing something wrong here?

import Rcon from "rcon-srcds";
const server = new Rcon({ host: "IP", port: 27015 });
      server
        .authenticate("RCON_PASS")
        .then(() => {
          console.log("authenticated");
          return server.execute("status");
        })
        .then(console.log)
        .catch(console.error);`

Response I'm getting

Error: connect ETIMEDOUT IP:27015
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
  errno: -4039,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: 'IP',
  port: 27015
}
alexvolley commented 2 years ago

I'm dumb and this was a firewall issue...