6 months ago
I have a postgres db connect to my n8n architecture. Everything works fine, I am able to save and consult the db , but I am not able to access the database through url.
When i try to access I always get this error
6 Replies
6 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open chandrika • 6 months ago
6 months ago
Postgres doesn't have a web client; that URL is used to connect to the drivers (in fact, that URL looks incorrect, perhaps you added it manually?).
A client accesses the web using an HTTP request, and that URL only listens for TCP (and some of Postgres's weird stuff).
To access the database, you need:
1 - A client like PgAdmin
2 - Use the Railway web client: Go to the database, DATA section, and you'll see the tables:
Note: take a look at that URL, it doesn't look good, my database looks like this:
5 months ago
going in the same tab called Data to see the data you were mention. My keeps constantly loading. Even after long time waiting
Attachments
5 months ago
i have seen that before, your best bet is delete the service and re-add it make sure you backup any data you care about first and then restore them in the new db service
or you could just add a new postgres service without removing the existing one and connect to that one via your app to see it the issue is resolved and then migrate any data you care about
5 months ago
You might also try to remove the http server and instead use a tcp proxy on port 5432 (that's typically how postgres templates are configured)
Attachments
5 months ago
Since your URL is wrong, you should see something like:
No idea why it's not showing, but in any case, lets fix it:
1 - Go to Networking and delete the current domain
2 - Click the + TCP Proxy button and add the port, for postgres is 5432
3 - Redeploy the service and you will see something like:
Now you can connect again to the service
NOTE: most important thing here is to add the network as a TCP Proxy, no HTTP
Attachments
5 months ago
BTW, the fact that you say:
Everything works fine, I am able to save and consult the dbIt's probably because you n8n connect to your DB throw internal network
So you basically just need to fix the public network to connect from an external client (maybe even the original template don't have the public network enabled, so you need to follow this steps to configure it)
Status changed to Solved brody • 5 months ago