D
Dokployβ€’7mo 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
BloomOPβ€’7mo ago
not sure what else to try I have to be missing something simple here
Bloom
BloomOPβ€’7mo ago
No description
Siumauricio
Siumauricioβ€’7mo ago
you have firewall setup?
Bloom
BloomOPβ€’7mo 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
Siumauricioβ€’7mo ago
can you run docker ps
Bloom
BloomOPβ€’7mo ago
No description
Siumauricio
Siumauricioβ€’7mo ago
Looks good The database port is being exposed In the database field can you try Postgres?
Bloom
BloomOPβ€’7mo ago
same issue
Siumauricio
Siumauricioβ€’7mo ago
Did you modify the mounts ?
Bloom
BloomOPβ€’7mo 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
Siumauricioβ€’7mo ago
πŸ‘
Bloom
BloomOPβ€’7mo ago
yea same thing
Siumauricio
Siumauricioβ€’7mo ago
let me try are you deploying in remote server or dokploy server?
Bloom
BloomOPβ€’7mo ago
what do you mean exactly? Im using one vps dokploy on the same machine
Siumauricio
Siumauricioβ€’7mo ago
hmm I tested and it was working
Bloom
BloomOPβ€’7mo ago
I used a completely new project now, same issue I can screen share if it helps
Siumauricio
Siumauricioβ€’7mo ago
No description
No description
Siumauricio
Siumauricioβ€’7mo ago
just of curiosity, can you try to create a new db with the database name as postgres?
Bloom
BloomOPβ€’7mo ago
just did that, before I also tried leaving it blank
Siumauricio
Siumauricioβ€’7mo ago
Can you share the credentials of your server?
Bloom
BloomOPβ€’7mo ago
I dm'd you
Siumauricio
Siumauricioβ€’7mo 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
BloomOPβ€’7mo ago
oh interesting! let me try with a simple one
Siumauricio
Siumauricioβ€’7mo 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
BloomOPβ€’7mo ago
yep thats it! strange since I used a similar password on my old system
Siumauricio
Siumauricioβ€’7mo ago
Weird, I will fix this tonight, thanks
Bloom
BloomOPβ€’7mo 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
Siumauricioβ€’7mo ago
very strange I will read more about that, thanks !
Dymar
Dymarβ€’7mo 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
Siumauricioβ€’7mo ago
it should be fixed already in a newest version if im not wrong?
Dymar
Dymarβ€’7mo 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
Siumauricioβ€’7mo ago
ooops, looks like I have duplicated functions and very probably are still using another function can you share what password generated?
Dymar
Dymarβ€’7mo ago
i can tell you what caracters i remove from password: #, ?, $ but probably has more
Siumauricio
Siumauricioβ€’7mo ago
But i'm seeing I have duplicated files so I need to check if is using older reference
Dymar
Dymarβ€’7mo ago
but it let me create the database.. maybe that function removes the caracters?
Siumauricio
Siumauricioβ€’7mo ago
what version you have?
Dymar
Dymarβ€’7mo ago
last version
Siumauricio
Siumauricioβ€’7mo 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
Dymarβ€’7mo 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
Siumauricioβ€’7mo ago
Yeah please create!
Dymar
Dymarβ€’7mo 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
Siumauricioβ€’7mo 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
Siumauricioβ€’7mo 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
Dymarβ€’7mo ago
No description
Siumauricio
Siumauricioβ€’7mo ago
did you copy the internal url from the database?
Dymar
Dymarβ€’7mo ago
yes
Siumauricio
Siumauricioβ€’7mo ago
I need to see more details
Dymar
Dymarβ€’7mo ago
they are both on dokploy
Siumauricio
Siumauricioβ€’7mo ago
If your password has strange characters try what I said above please
Dymar
Dymarβ€’7mo ago
how you build this? because im using dockerfile
Siumauricio
Siumauricioβ€’7mo ago
using nixpacks read the instructions in the readme
Dymar
Dymarβ€’7mo ago
let me test that im using nest js, but its similar
Siumauricio
Siumauricioβ€’7mo ago
yeah it should be similar

Did you find this page helpful?