Connection refused
I have been running a web app successfully on Railway for some time. This morning I got a Server Error 500 when I navigated to the site. I tried running the development server and received the following error:
django.db.utils.OperationalError: connection to server at "containers-us-west-51.railway.app" (35.230.73.152), port 6509 failed: Connection refused (0x0000274D/10061)
Is the server running on that host and accepting TCP/IP connections?
I haven't changed any settings and there are no messages on Railway indicating issues. I tried restarting but to no avail.
Please advise
Chris
Solution:Jump to solution
you are still attempting to connect to the now shut down legacy database.
please 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...
6 Replies
Project ID:
N/A
Solution
you are still attempting to connect to the now shut down legacy database.
please 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
Ok thanks. I did follow the instructions to migrate the database but obviously need to change the settings at my end.
please follow my instructions and links
All working correctly now. Thanks for your help.
no problem!