Cannot connect to new database after migration

project id: 6fbf03b2-6e85-491d-bda7-591922fe9dd7 The database's logs:
2023-11-15 16:09:18.136 UTC [7] LOG: starting PostgreSQL 15.4 (Ubuntu 15.4-2.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit

2023-11-15 16:09:18.137 UTC [7] LOG: listening on IPv4 address "0.0.0.0", port 5432

2023-11-15 16:09:18.137 UTC [7] LOG: listening on IPv6 address "::", port 5432

2023-11-15 16:09:18.141 UTC [7] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"

2023-11-15 16:09:18.148 UTC [34] LOG: database system was interrupted; last known up at 2023-11-15 16:05:16 UTC

2023-11-15 16:09:18.199 UTC [34] LOG: database system was not properly shut down; automatic recovery in progress

2023-11-15 16:09:18.203 UTC [34] LOG: redo starts at 0/13A10DD0

2023-11-15 16:09:18.203 UTC [34] LOG: invalid record length at 0/13A10E08: wanted 24, got 0

2023-11-15 16:09:18.203 UTC [34] LOG: redo done at 0/13A10DD0 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s

2023-11-15 16:09:18.208 UTC [32] LOG: checkpoint starting: end-of-recovery immediate wait

2023-11-15 16:09:18.222 UTC [32] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.006 s, sync=0.002 s, total=0.016 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB

2023-11-15 16:09:18.230 UTC [7] LOG: database system is ready to accept connections

2023-11-15 16:09:18.231 UTC [37] LOG: TimescaleDB background worker launcher connected to shared catalogs
2023-11-15 16:09:18.136 UTC [7] LOG: starting PostgreSQL 15.4 (Ubuntu 15.4-2.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, 64-bit

2023-11-15 16:09:18.137 UTC [7] LOG: listening on IPv4 address "0.0.0.0", port 5432

2023-11-15 16:09:18.137 UTC [7] LOG: listening on IPv6 address "::", port 5432

2023-11-15 16:09:18.141 UTC [7] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"

2023-11-15 16:09:18.148 UTC [34] LOG: database system was interrupted; last known up at 2023-11-15 16:05:16 UTC

2023-11-15 16:09:18.199 UTC [34] LOG: database system was not properly shut down; automatic recovery in progress

2023-11-15 16:09:18.203 UTC [34] LOG: redo starts at 0/13A10DD0

2023-11-15 16:09:18.203 UTC [34] LOG: invalid record length at 0/13A10E08: wanted 24, got 0

2023-11-15 16:09:18.203 UTC [34] LOG: redo done at 0/13A10DD0 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.00 s

2023-11-15 16:09:18.208 UTC [32] LOG: checkpoint starting: end-of-recovery immediate wait

2023-11-15 16:09:18.222 UTC [32] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.006 s, sync=0.002 s, total=0.016 s; sync files=2, longest=0.001 s, average=0.001 s; distance=0 kB, estimate=0 kB

2023-11-15 16:09:18.230 UTC [7] LOG: database system is ready to accept connections

2023-11-15 16:09:18.231 UTC [37] LOG: TimescaleDB background worker launcher connected to shared catalogs
However, I cannot connect to it from my local mac or my railway app.
16 Replies
Percy
Percy13mo ago
Project ID: 6fbf03b2-6e85-491d-bda7-591922fe9dd7
Brody
Brody13mo ago
have you tried re-deploying the database?
lanford33
lanford33OP13mo ago
Just re-deployed it and it is still not work psql: error: connection to server at "roundhouse.proxy.rlwy.net" (xxx), port xxx failed: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The error raised by psql in my mac I expected the migration should be completed in 5 minutes, now it is more than 30 minutes. What if I switch back to the legacy plugin?
Brody
Brody13mo ago
the migration is still running?
lanford33
lanford33OP13mo ago
It is completed, but the database can't be access
lanford33
lanford33OP13mo ago
No description
Brody
Brody13mo ago
you can, just change the namespace of the reference variables for the database variables in the raw editor
lanford33
lanford33OP13mo ago
You mean rollback to the legacy one is fine?
Brody
Brody13mo ago
it can't hurt to try again, re-deploy the new database again for good measure the legacy database is left fully in tact, you would only need to update the namespace on the database variables of your service Postgres -> Legacy Postgres
lanford33
lanford33OP13mo ago
I don't mind to send you the password of the database, could you help me find the reason why the database cannot be connected? there are no any sensitive data
Brody
Brody13mo ago
if you can't connect publicly then I likely won't be able to I'm going to silent tag in @jr here, I know you're dnd, sorry
lanford33
lanford33OP13mo ago
I have rollback to the legacy one, how should I re-migrate later. There is no migrate button now.
jr
jr13mo ago
If you delete the new database then the migrate button will re-appear How are you trying to connect to your database? The database is loading fine in the UI. Can you try connecting with psql? I suspect you might be hitting the network initialization time
lanford33
lanford33OP13mo ago
psql: error: connection to server at "roundhouse.proxy.rlwy.net" (xxx), port xxx failed: server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The error raised by psql in my mac
jr
jr13mo ago
What is the command you are using. It should be psql $DATABASE_URL I am able to connect like this np
lanford33
lanford33OP13mo ago
I see, I can also connect to the database in a digital ocean droplet now, but not in my local env. Maybe it is because I'm using a VPN Now my app can also connect to the database, so I believe the source of the error is 'network initialization time' Which is around half an hour for me
Want results from more Discord servers?
Add your server