PG::ConnectionBad: connection to server at "34.105.6.235", port 6449 failed: Connection refused
One of my 3 applications is failing. I did migrate the data successfully on all 3 applications.
Logs for worker and web both say:
PG::ConnectionBad: connection to server at "34.105.6.235", port 6449 failed: Connection refused
Tried restarting Postgres:
And restarting my apps, but same message.
Project #: 9ddc4dfb-ab3f-4809-8481-9657a0c52a43Solution:Jump to solution
you are still attempting to connect to the legacy database.
re-migrate the legacy database https://docs.railway.app/guides/database-migration-guide#re-initiating-migration
and then look for any hardcoded database credentials and replace them with environment variables and reference variables, more about this in the docs here https://docs.railway.app/guides/database-migration-guide#switching-over-connections...
5 Replies
Project ID:
9ddc4dfb-ab3f-4809-8481-9657a0c52a43
I checked the variables and everything looks correct between the Postgres container and my other services.
Solution
you are still attempting to connect to the legacy database.
re-migrate the legacy database https://docs.railway.app/guides/database-migration-guide#re-initiating-migration
and then look for any hardcoded database credentials and replace them with environment variables and reference variables, more about this in the docs here https://docs.railway.app/guides/database-migration-guide#switching-over-connections
How can that be when my variables look like this: ?
Nevermind, I figured it out. I did have hard-coded variables in my Rails
credentials.yml
file. Thanks!no problem!