D
Dokploy14mo ago
Bloom

postgres template - wrong credentials

I tried to launch the postgres template but when I try to connect, I get a FATAL: password authentication failed for user "postgres" I made sure to expose the external port, I also tried different volume mapping, redeploying, other db client, other db users, manually setting the env for user/pass with no luck.
No description
No description
54 Replies
Bloom
BloomOP14mo ago
not sure what else to try I have to be missing something simple here
Bloom
BloomOP14mo ago
No description
Siumauricio
Siumauricio14mo ago
you have firewall setup?
Bloom
BloomOP14mo ago
not that im aware of, just setup a clean hetzner vps adn Im reaching the db itelf, it also tells me in the logs: password authentication failed for user "postgres"
Siumauricio
Siumauricio14mo ago
can you run docker ps
Bloom
BloomOP14mo ago
No description
Siumauricio
Siumauricio14mo ago
Looks good The database port is being exposed In the database field can you try Postgres?
Bloom
BloomOP14mo ago
same issue
Siumauricio
Siumauricio14mo ago
Did you modify the mounts ?
Bloom
BloomOP14mo ago
no, not on this one. just deployed this fresh for my sanity Ill create a new one again so we are on the same page 100%
Siumauricio
Siumauricio14mo ago
👍
Bloom
BloomOP14mo ago
yea same thing
Siumauricio
Siumauricio14mo ago
let me try are you deploying in remote server or dokploy server?
Bloom
BloomOP14mo ago
what do you mean exactly? Im using one vps dokploy on the same machine
Siumauricio
Siumauricio14mo ago
hmm I tested and it was working
Bloom
BloomOP14mo ago
I used a completely new project now, same issue I can screen share if it helps
Siumauricio
Siumauricio14mo ago
No description
No description
Siumauricio
Siumauricio14mo ago
just of curiosity, can you try to create a new db with the database name as postgres?
Bloom
BloomOP14mo ago
just did that, before I also tried leaving it blank
Siumauricio
Siumauricio14mo ago
Can you share the credentials of your server?
Bloom
BloomOP14mo ago
I dm'd you
Siumauricio
Siumauricio14mo ago
hmm looks like the Generation password is including characters like #$#%^&*(()!! and I don't know if that is the main issue because I receive this error could not connect to server: could not initiate GSSAPI security context: The operation or option is not available could not initiate GSSAPI security context: Credential for asked mech-type mech not found in the credential handle FATAL: password authentication failed for user "postgres" after creating a database with a simple password 9417e9789e5de6f2 it works
Bloom
BloomOP14mo ago
oh interesting! let me try with a simple one
Siumauricio
Siumauricio14mo ago
It's strange I've never had that happen before or was it just coincidence that the generation of the password included those characters lol but try to create a new database and assign a password with letters and numbers
Bloom
BloomOP14mo ago
yep thats it! strange since I used a similar password on my old system
Siumauricio
Siumauricio14mo ago
Weird, I will fix this tonight, thanks
Bloom
BloomOP14mo ago
a8p!+DK@YhyB7b4G <- this works, so not sure which chars exactly (#?) but good to know! If its a postgres limitation maybe a frontend validation would be cool for people in the future getting this issue. otherwise thank you for the fix and for looking into this!
Siumauricio
Siumauricio14mo ago
very strange I will read more about that, thanks !
Dymar
Dymar13mo ago
this error keeps happening, I spent 3 hours trying to figure out why I couldn't connect... I removed the special characters and it worked @Siumauricio
Siumauricio
Siumauricio13mo ago
it should be fixed already in a newest version if im not wrong?
Dymar
Dymar13mo ago
i think not because today is my first time with dokploy but it help me a lot, really good job on this tool! pls keep upgrading this tool 🙂
Siumauricio
Siumauricio13mo ago
ooops, looks like I have duplicated functions and very probably are still using another function can you share what password generated?
Dymar
Dymar13mo ago
i can tell you what caracters i remove from password: #, ?, $ but probably has more
Siumauricio
Siumauricio13mo ago
But i'm seeing I have duplicated files so I need to check if is using older reference
Dymar
Dymar13mo ago
but it let me create the database.. maybe that function removes the caracters?
Siumauricio
Siumauricio13mo ago
what version you have?
Dymar
Dymar13mo ago
last version
Siumauricio
Siumauricio13mo ago
umm ok, very probably is using a reference from another function, I will check in the meantime just create a password without those characters
Dymar
Dymar13mo ago
i used this comamnd to install curl -sSL https://dokploy.com/install.sh | sh i assume this is the last version sure, thank you. if you want i can create one issue on github let me know
Siumauricio
Siumauricio13mo ago
Yeah please create!
Dymar
Dymar13mo ago
but i keep with the problem :/ my backend on dokploy cant read database_url from environment variables but i put them there
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database

Error: P1013: The provided database string is invalid. invalid port number in database URL
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database

Error: P1013: The provided database string is invalid. invalid port number in database URL
Siumauricio
Siumauricio13mo ago
GitHub
examples/t3 at main · Dokploy/examples
Examples to deploy on Dokploy. Contribute to Dokploy/examples development by creating an account on GitHub.
Siumauricio
Siumauricio13mo ago
is using a nextjs application with a mysql database it also uses prisma the idea should be the same if you use another application in the readme are the instructions
Dymar
Dymar13mo ago
No description
Siumauricio
Siumauricio13mo ago
did you copy the internal url from the database?
Dymar
Dymar13mo ago
yes
Siumauricio
Siumauricio13mo ago
I need to see more details
Dymar
Dymar13mo ago
they are both on dokploy
Siumauricio
Siumauricio13mo ago
If your password has strange characters try what I said above please
Dymar
Dymar13mo ago
how you build this? because im using dockerfile
Siumauricio
Siumauricio13mo ago
using nixpacks read the instructions in the readme
Dymar
Dymar13mo ago
let me test that im using nest js, but its similar
Siumauricio
Siumauricio13mo ago
yeah it should be similar

Did you find this page helpful?