liaoliaots / nestjs-redis

Redis module for Nest framework (node.js). Support node-redis & ioredis.
MIT License
385 stars 71 forks source link

WRONGPASS invalid username-password with docker compose #334

Open ammarvoloder opened 2 years ago

ammarvoloder commented 2 years ago

As I have changed from https://github.com/skunight/nestjs-redis to your nestjs-client(because your package is a lot better maintained), my core service is not able to connect to redis and throws all the time this error: image Even though the redis config seems to be okay (e2e testing with a redis-testcontainer is working), the microservice is not starting.

My config: image

I also tried to hardcode the URL, in the case that the envs are not the right one.

image

My docker-compose redis config:

image

Is there anything wrong in the config or am I missing something?

Thanks a lot in advance !

ammarvoloder commented 2 years ago

It seems that this is some kind of URL parsing issue. Package node-redis had similar problems as it seems. @liaoliaots do you have anything so far?

liaoliaots commented 2 years ago

You can connect to redis through some desktop manager(RESP, etc...) with the URL to check if the URL is correct. If something goes wrong, please check your docker compose.

If the URL is right, please check your nestjs configuration and code, and test the url directly via node-redis or ioredis.

Also check out the url specification: https://www.iana.org/assignments/uri-schemes/prov/redis