2 years ago
I'm trying to connect to a postgresql link but it keeps timing out, and the web shows a 404.
Created it about an hour ago.
49 Replies
2 years ago
I'm not sure what postgres has to do with generating a domain? perhaps you are misunderstanding something, could you provide more context?
2 years ago
n/a
2 years ago
psql -h postgres-production-c626.up.railway.app -p 8080 -U railway -d railway
psql: error: connection to server at "postgres-production-c626.up.railway.app" (35.213.158.48), port 8080 failed: Operation timed out
Is the server running on that host and accepting TCP/IP connections?
2 years ago
you need to use a TCP proxy for databases
2 years ago
Before I look how to do that, I'm trying to reset my umami password and they're saying I have to do it in the DB. Is there a quicker way? Tried the CLI tools, but that's not going to plan either lol (% railway connect
Select service Postgres
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: FATAL: role "railway" does not exist)
2 years ago
they are correct, you would need to access the database to do that, and to access the database you need to use the tcp proxy
2 years ago
adding a TCP proxy is covered in the template overview
2 years ago
Ok, will have a look there. Thanks 🙂
2 years ago
Hmm, not sure why this isn't working still. I added the 5432 TCP proxy, redeployed with new settings. psql -h roundhouse.proxy.rlwy.net -p 35459 -U railway -d railway
psql: error: connection to server at "roundhouse.proxy.rlwy.net" (35.213.135.65), port 35459 failed: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
2 years ago
show me a screenshot of your public networking please
2 years ago

2 years ago
and 5432 is set as a variable
2 years ago
what is the start command in use?
2 years ago
/bin/sh -c "unset PGPORT; docker-entrypoint.sh postgres --port=5432"
2 years ago
That's just the template default I think
2 years ago
yep that's correct, that's what I've set it to, just needed to make sure it wasn't removed or modified
2 years ago
please send the deployment logs for postgres -
2 years ago
are you perhaps behind a firewall of some kind? hotel, work, school, etc
2 years ago
no, using my phone's hotspot
2 years ago
ISP firewall?
2 years ago
With the CLI tools, using railway connect should work regardless right?
2 years ago
No firewall afaik
2 years ago
No, the cli simply calls out to psql with pre defined flags
2 years ago
don;t have any issues connecting to anything
2 years ago
most things don't run on port 35459
2 years ago
nmap -p 35459 roundhouse.proxy.rlwy.net
Starting Nmap 7.95 ( https://nmap.org ) at 2024-07-25 13:14 AWST
Nmap scan report for roundhouse.proxy.rlwy.net (35.213.135.65)
Host is up (0.29s latency).
rDNS record for 35.213.135.65: 65.135.213.35.bc.googleusercontent.com
PORT STATE SERVICE
35459/tcp open unknown
Nmap done: 1 IP address (1 host up) scanned in 0.71 seconds
2 years ago
can you re-deploy (not restart) the database?
2 years ago
ok
2 years ago
hmm, seems something is working
2 years ago
we like when things work!
2 years ago
Ok, I might have to update psql from 14 to 15 too.
2 years ago
I have too many templates to remember, what version of Postgres is in use for umami?
2 years ago
15 alpine
2 years ago
but also, you can deploy dbgate into the project and use that to manage your database, I've used dbgate to reset a password on umami before with great success
2 years ago
Right, now me and chatgpt are going to figure this one out https://github.com/umami-software/umami/discussions/2483 <:poggers:720701334659268700>
2 years ago
with dbgate you can just go in and update that value and done
2 years ago
where do I set that up? Variables?
2 years ago
Or just deploy that on the same instance?
2 years ago
you simply deploy the dbgate template
2 years ago
yeah, playing with it now
2 years ago
fkn hell, remind me not to lose my umami password again lol
2 years ago
time to start using a password manager
2 years ago
but hey, as long as you've done it once the second time will be easy
2 years ago
I do, it just didn't save for some reason haha Yeah, best way to learn
2 years ago
sweet, that worked!
2 years ago
Thanks for the help
2 years ago
Should I delete the logs etc from here? Looks like it's not provate
2 years ago
it's not private, but nothing sensitive was shared
Status changed to Solved brody • over 1 year ago