novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
34.47k stars 3.51k forks source link

šŸ› Bug Report: Self hosted docker doesn't work if you try and specify a different redis port #4854

Open isaiahdahl opened 10 months ago

isaiahdahl commented 10 months ago

šŸ“œ Description

I'm trying to run Novu locally along side another docker service and 6379 is already taken.

So I'm trying to connect the novu services to a redis running on a 6378

šŸ‘Ÿ Reproduction steps

Follow the instructions to run novu locally with docker https://github.com/novuhq/novu/tree/next/docker

Change the redis port in the .env to 6380

update the docker-compose so that the redis container runs redis on port 6380.

šŸ‘ Expected behavior

It should just work with redis on a different port

šŸ‘Ž Actual Behavior with Screenshots

the api container just throws this error:

2023-11-15 14:38:41 [22:38:41.422] ERROR (17): [Provider: MemoryDB] There has been an error in the InMemory provider client
2023-11-15 14:38:41     serviceName: "@novu/api"
2023-11-15 14:38:41     serviceVersion: "0.20.0"
2023-11-15 14:38:41     platform: "Docker"
2023-11-15 14:38:41     tenant: "OS"
2023-11-15 14:38:41     context: "InMemoryProviderService"
2023-11-15 14:38:41     err: {
2023-11-15 14:38:41       "type": "Error",
2023-11-15 14:38:41       "message": "connect ECONNREFUSED 192.168.144.2:6378",
2023-11-15 14:38:41       "stack":
2023-11-15 14:38:41           Error: connect ECONNREFUSED 192.168.144.2:6378
2023-11-15 14:38:41               at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
2023-11-15 14:38:41       "errno": -111,
2023-11-15 14:38:41       "code": "ECONNREFUSED",
2023-11-15 14:38:41       "syscall": "connect",
2023-11-15 14:38:41       "address": "[REDACTED]",
2023-11-15 14:38:41       "port": 6378
2023-11-15 14:38:41     }

Novu version

0.21.0

npm version

na

node version

na

šŸ“ƒ Provide any additional context for the Bug.

No response

šŸ‘€ Have you spent some time to check if this bug has been raised before?

šŸ¢ Have you read the Contributing Guidelines?

Are you willing to submit PR?

None

Cliftonz commented 6 months ago

@isaiahdahl Just to specify the 6380 port is usually a TLS enabled port which requires you to set certificates and other env variables. I want to confirm are you tring to use redis ssl port or just have a different port your redis instance is exposed on.

isaiahdahl commented 6 months ago

Just trying to run redis on a different port. I already have a redis on this machine running on 6379 and wanted to keep the Redis for Novu separate.

My understanding is though 6380 is commonly used for secure connection, it should still just work.

I could be wrong though and if it works on like 6378 that would solve my problem.

Cliftonz commented 6 months ago

6380 usually expects TLS connections, etc.

However, if your just changing the port then you will need to update the env variables and you should be good.

Cliftonz commented 6 months ago

You also need to ensure the service on the docker container is proxied correctly to the actual redis port that the service is opening on the container.