Unable to connect to my Postgres db for my rails app

Hi all,

I’m trying to migrate my local postgres data onto the fly postgres database, and I’m unable to connect. I keep getting this error message, and I’m a bit stuck.

fly postgres connect -a my-app-db
Connecting to fdaa:1:604:a7b:16d:f756:fbd3:2… complete
fork/exec /usr/local/bin/connect: input/output error
Error: ssh shell: wait: remote command exited without exit status or exit signal

Anybody have a solution for this?

Hi… Try fly logs -a my-app-db and then repeat the connection attempt (in another terminal). This might be another incarnation of the mysterious vsock glitch…

Hey, thanks for the reply, the logs show something like this:

2024-09-17T21:17:40Z app[17811093f40d98] sjc [info]monitor | Voting member(s): 2, Active: 2, Inactive: 0, Conflicts: 0
2024-09-17T21:18:01Z app[5683e41b14168e] sjc [info][ 0.134084] PCI: Fatal: No config space access function found
…a bunch of stuff including this: sjc [info][WARN] Zombie lock detected!

2024-09-17T21:18:04Z app[17811093f40d98] sjc [info]2024/09/17 21:18:04 unexpected error executing command: fork/exec /usr/local/bin/connect: input/output error
2024-09-17T21:18:04Z app[9080e45dc535d8] sjc [info]proxy | [WARNING] (375) : Server bk_db/pg3 is going DOWN for maintenance (No IP for server ). 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
2024-09-17T21:18:05Z app[17811093f40d98] sjc [info]proxy | [WARNING] (28063) : Server bk_db/pg3 was DOWN and now enters maintenance (No IP for server ).
2024-09-17T21:18:37Z app[17811093f40d98] sjc [info]repmgrd | [2024-09-17 21:18:37] [INFO] monitoring primary node “fdaa:1:604:a7b:16d:f756:fbd3:2” (ID: 1065521011) in normal state
2024-09-17T21:19:51Z app[5683e41b14168e] sjc [info][ 0.148807] PCI: Fatal: No config space access function found

Any ideas?

This is probably the culprit. Is this a new Postgres database (the one on Fly.io)?

(Generally, repmgr clusters should have 3 members or (for development) just 1.)

Well I created it about a year ago and haven’t actually done anything with it until now. It’s got 3 members I believe

Hey, I just went ahead and did fly machines restart -a my-app-db and now I can connect! probably should’ve tried that at first. Thank you for the help though, weird error.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.