#Connect to docker redis from local django app

31 messages · Page 1 of 1 (latest)

brave crypt
vague viper
brave crypt
#

But it is not working!

vague viper
#

did you restart it?

brave crypt
#

I got this error: conn = _connect(dsn, connection_factory=connection_factory, **kwasync) django.db.utils.OperationalError: connection to server at "127.0.0.1", port 5432 failed: FATAL: password authentication failed for user "mayan" connection to server at "127.0.0.1", port 5432 failed: FATAL: password authentication failed for user "mayan"

brave crypt
vague viper
#

You got through to redis

brave crypt
vague viper
#

did you read what the error says?

brave crypt
#

Seems like the host isn't correct

vague viper
#

no

#

that's not the error

#

Read the last part of the error

#

It's quite obvious if you ask me

#

The password you used is wrong

brave crypt
#

Isn't it the same password show on docker when I inspect the container ?

vague viper
#

what?

brave crypt
#

I noticed it was trying to connect to another postgres database running on my machine, after stopping it, I got this error instead:

 conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: connection to server at "127.0.0.1", port 5432 failed: Connection refused
        Is the server running on that host and accepting TCP/IP connections?
brave crypt
vague viper
#

the passwords may be different

brave crypt
#

Yeah I got that .. I think redis is working, but the database connection is the one that is failing

vague viper
#

Well, postgres has not been ported to your localhost:5432

#

Try bringing up compose again

brave crypt
brave crypt
#

@vague viper I decided to use vscode dev containers, it should be easier than this, I've installed the extention and attached to container, what should I do next?

vague viper
#

I haven’t used dev containers

#

Compose is not supposed to be difficult