fastapi-alembic-sqlmodel-async icon indicating copy to clipboard operation
fastapi-alembic-sqlmodel-async copied to clipboard

Cannot connect to Redis error

Open AaronWChen opened this issue 1 year ago • 2 comments

Hello! Saw this template and figured I'd give it a try. Cloning and running instructions as is has 7 containers running, but I get this error: consumer: Cannot connect to redis://redis_server_test:6379//: Error -2 connecting to redis_server_test:6379. Name or service not known

And a CONNECTION_REFUSED when I try to open the app in my browser.

I'm using WSL2 (Ubuntu) on Windows 10 and initially tried to apply the steps listed here because Docker and WSL2 can act a little weird before I thought to ask about the traceback above.

Using poetry with python 3.12.4 and fastapi 0.111.0 and that's all.

AaronWChen avatar Jun 27 '24 00:06 AaronWChen

Hello @AaronWChen I am sorry for the late reply. Do you still have this error? The correct URL of redis should be redis_server not redis_server_test

image image

jonra1993 avatar Aug 02 '24 19:08 jonra1993

Thanks for checking in!

I couldn't find an instance of redis_server_test in my code, so I'm not sure what I can change.

To be honest, I realized this template has a lot of stuff in it and I decided to simplify and piece together things to learn how they all fit together. I'm hoping it'll help me understand how to better set up some of the services in the template.

AaronWChen avatar Aug 06 '24 04:08 AaronWChen