Master-Bot icon indicating copy to clipboard operation
Master-Bot copied to clipboard

Alternate redis settings

Open DracoMilesX opened this issue 2 years ago • 4 comments

While trying to start the bot with Docker it tries to connect to redis. But so far I could find there is nowhere mentioned how to adjust the redis settings so it seems only the default options of localhost:6379 unsecured is available.

Would it be possible that we can provide a redis url and password for this instead?

[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379 at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1187:16)

DracoMilesX avatar Jul 29 '22 12:07 DracoMilesX

Howdy,

i am unable to test at the moment, i should be able to fully test compatibility in a few days (out of town) welcome to try this (Edit: moved to a pr) https://github.com/Bacon-Fixation/Master-Bot/tree/redis-options

add the following to your "config.json"

  "redis_host": "localhost",
  "redis_port": 6384,
  "redis_password": "",
  "redis_db": 0

these options should be optional just add the one you want

Much Love -Bacon

Bacon-Fixation avatar Jul 31 '22 13:07 Bacon-Fixation

Hey Bacon,

Yup that has solved my issue indeed the redis connection refused error is gone. Thank you.

Now it runs into a different issue but I will have to check what the cause of that is:

node:internal/process/promises:279 triggerUncaughtException(err, true /* fromPromise */); ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by >rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] { code: 'ERR_UNHANDLED_REJECTION'

DracoMilesX avatar Aug 02 '22 08:08 DracoMilesX

Hey Bacon,

Yup that has solved my issue indeed the redis connection refused error is gone. Thank you.

Now it runs into a different issue but I will have to check what the cause of that is:

node:internal/process/promises:279 triggerUncaughtException(err, true /* fromPromise */); ^ [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by >rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#".] { code: 'ERR_UNHANDLED_REJECTION'

Is that the full error message you got?

galnir avatar Aug 02 '22 09:08 galnir

This is the full output from the logs that I get from docker. So kinda yes

master|
master| > [email protected] dev
master| > npm run build && npm run copy-scripts && npm run start
master|
master|
master| > [email protected] build
master| > tsc
master|
master|
master| > [email protected] copy-scripts
master| > npx ncp ./scripts ./dist/
master|
master|
master| > [email protected] start
master| > node dist/index.js
master|
master| node:internal/process/promises:279
master|             triggerUncaughtException(err, true /* fromPromise */);
master|             ^
master|
master| [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] {
master|   code: 'ERR_UNHANDLED_REJECTION'
master| }
master exited with code 1

DracoMilesX avatar Aug 02 '22 09:08 DracoMilesX

Howdy, Have a look at #738 it may help with your error. In trying to replicate your issue, I noticed the master-bot docker setup is outdated

i know this wasn't part of the original request but........... this is feature request is sorta required to update the docker method of installation.

Much Love -Bacon

Bacon-Fixation avatar Aug 12 '22 07:08 Bacon-Fixation