galnir / Master-Bot

A Discord music bot and dashboard with slash commands, playlist support, Spotify, music quiz, saved playlists, lyrics, gifs and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alternate redis settings

DracoMilesX opened this issue · 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)

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

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'

commented

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?

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

master|
master| > master-bot@1.0.0 dev
master| > npm run build && npm run copy-scripts && npm run start
master|
master|
master| > master-bot@1.0.0 build
master| > tsc
master|
master|
master| > master-bot@1.0.0 copy-scripts
master| > npx ncp ./scripts ./dist/
master|
master|
master| > master-bot@1.0.0 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

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