kernoeb / jean_racine_bot

Discord Root-Me bot - built with Discord.js
21 stars 3 forks source link

Error: Couldn't resolve host name #2

Closed LoganTann closed 2 years ago

LoganTann commented 2 years ago

Hello, I tried to run this project with the following docker-compose file :

click to see docker-compose.yml used ``` version: "3" services: rootme_node: # You can use my own image, or build it from scratch image: ghcr.io/kernoeb/jean_racine_bot:main restart: always stdin_open: true tty: true env_file: - .env networks: - rootme volumes: - "/etc/timezone:/etc/timezone:ro" - "/etc/localtime:/etc/localtime:ro" depends_on: - mongodb mongodb: image: docker.io/bitnami/mongodb:4.4 restart: always networks: - rootme ports: - "27017" volumes: - '/opt/jeanracine:/data/db' networks: rootme: driver: bridge ```

(by the way, I had another issue, latest mongo image uses /data/db as storage persistance; not /bitnami/mongodb)

The bot starts, and seems to not be able to resolve discord's hostname. Here is the log :


[19:26:39 pm] [curl.js:3] › cURL instantiated
[19:26:39 pm] [curl.js:15] › PROXIES :  null
[19:26:40 pm] [index.js:30] › ✔  success   Mongo OK
[19:26:40 pm] [mongoose.js:10] › Mongoose connected
[19:26:40 pm] [index.js:32] › ℹ  info      Agenda deleted 2
[19:26:40 pm] [index.js:114] › ℹ  info      Loading challenges, please wait...
[19:26:40 pm] [updates.js:91] › ℹ  info      Fetch and update challenges
[19:26:50 pm] [index.js:119] › ✖  error     Error while loading challenges [Error: Couldn't resolve host name] { code: 6, isCurlError: true }
[19:26:53 pm] [index.js:174] › ✔  success   Agenda started successfully
[19:26:53 pm] [updates.js:109] › ℹ  info      Update users
[19:26:53 pm] [updates.js:91] › ℹ  info      Fetch and update challenges
[19:26:53 pm] [index.js:133] › ✔  success   UPDATE_USERS OK
[19:27:03 pm] [index.js:157] › ✖  error     UPDATE_CHALLENGES ERROR [Error: Couldn't resolve host name] { code: 6, isCurlError: true }
/app/.yarn/cache/discord.js-npm-13.8.1-f93190cd66-1311aa3be7.zip/node_modules/discord.js/src/rest/RequestHandler.js:201
        throw new HTTPError(error.message, error.constructor.name, error.status, request);
              ^

HTTPError [FetchError]: request to https://discord.com/api/v9/gateway/bot failed, reason: getaddrinfo EAI_AGAIN discord.com
    at RequestHandler.execute (/app/.yarn/cache/discord.js-npm-13.8.1-f93190cd66-1311aa3be7.zip/node_modules/discord.js/src/rest/RequestHandler.js:201:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async RequestHandler.push (/app/.yarn/cache/discord.js-npm-13.8.1-f93190cd66-1311aa3be7.zip/node_modules/discord.js/src/rest/RequestHandler.js:51:14)
    at async WebSocketManager.connect (/app/.yarn/cache/discord.js-npm-13.8.1-f93190cd66-1311aa3be7.zip/node_modules/discord.js/src/client/websocket/WebSocketManager.js:134:9)
    at async Client.login (/app/.yarn/cache/discord.js-npm-13.8.1-f93190cd66-1311aa3be7.zip/node_modules/discord.js/src/client/Client.js:254:7) {
  code: 500,
  method: 'get',
  path: '/gateway/bot',
  requestData: { json: undefined, files: [] }
}```
kernoeb commented 2 years ago

Hello, if you don't use Tor nodes, Root-Me will ban you if you do some requests :) ! It looks you just have been temporary banned by the website (When you're banned, the website is not even pingable)

LoganTann commented 2 years ago

Hello, thanks for the quick reply.

I don't use tor node, which is why it's removed in the docker-compose I just sent.

kernoeb commented 2 years ago

And that's weird for mongo, I'm using /bitnami/mongodb with the last version

LoganTann commented 2 years ago

Oh sorry, I mistunderstood your comment... i'll see into tor nodes then. It's just I had issues with it, containers won't start.

kernoeb commented 2 years ago

Hello, thanks for the quick reply.

I don't use tor node, which is why it's removed in the docker-compose I just sent.

So there's nothing you can do, maybe slow down the requests to one request every 30 seconds, with the PAUSE environment variable

kernoeb commented 2 years ago

Oh sorry, I mistunderstood your comment... i'll see into tor nodes then. It's just I had issues with it, containers won't start.

Tor is not mandatory, but root-me will just ban the bot (Do you have Discord or Telegram, it's easier to talk here ?)

Ah mais t'es français