Unable to connect to postgres db

I’m trying to connect to my postgres db using fly connect and fly postgres connect and both are failing.

Error: can't build tunnel for nala-sat: websocket: failed to WebSocket dial: failed to send handshake request: Get "https://iad2.gateway.6pn.dev:443/": dial tcp 104.225.8.39:443: connect: operation timed out

Also, this is what I get when I run it using the debug flag:

....
DEBUG --> POST https://api.fly.io/graphql

DEBUG {
  "query": "mutation($input: ValidateWireGuardPeersInput!) { validateWireGuardPeers(input: $input) { invalidPeerIps } }",
  "variables": {
    "input": {
      "peerIps": [
        "fdaa:0:e25b:a7b:8cfe:0:a:2",
        "fdaa:1:3d0:a7b:8cfe:0:a:2",
        "fdaa:0:e591:a7b:8cfe:0:a:2",
        "fdaa:0:714f:a7b:8cfe:0:a:2",
        "fdaa:0:fc48:a7b:8cfe:0:a:2"
      ]
    }
  }
}


DEBUG {}
DEBUG <-- 200 https://api.fly.io/graphql (130.85ms)

DEBUG {
  "data": {
    "validateWireGuardPeers": {
      "invalidPeerIps": []
    }
  }
}

DEBUG Task manager done
Error: can't build tunnel for nala-sat: websocket: failed to WebSocket dial: failed to send handshake request: Get "https://iad2.gateway.6pn.dev:443/": dial tcp 104.225.8.39:443: connect: operation timed out

Hey there,

I see you are having some troubles trying to connect to your postgres db. It’s definitely odd both the commands you ran are failing. Have you tried running fly doctor? If so what’s the output you are getting from that? Is there an error at all? Also what version of flyctl are you on?

Here’s some documentation about postgres on fly as well for reference- Fly Postgres · Fly Docs

Looks like it suddenly started working again, I didn’t change anything so not sure what happened there.

Thank you anyways.

1 Like

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