I have decided to give fly a try but unfortunately was not successful. First of all the amsterdam region was failing to create the resources (Timeout) and then I tried a few other regions which were creating the resource but I was not able to connect to the deployments. flyctl gave me the following error:
> fly postgres connect -a my-db-name
Error ssh: can't build tunnel for personal: Post "https://api.fly.io/graphql": unexpected EOF
and also
> fly ssh console -a my-db-name
Error ssh: can't build tunnel for personal: server returned a non-200 status code: 504
Is the fly CLI showing any errors at your end if you run fly doctor?
$ fly doctor
Testing authentication token... PASSED
Testing flyctl agent... PASSED
Testing local Docker instance... Nope
Pinging WireGuard gateway (give us a sec)... PASSED
Are you able to connect to https://api.fly.io/graphql? The first error suggests perhaps not. To check try loading https://api.fly.io/graphql in your browser - do you see the GraphQL page? I don’t know if that’s officially supported, auth etc, however it would at least check you are able to make requests to it. If not, that will cause problems.
I’ve tried the fly doctor but got the same result.
Testing authentication token... PASSED
Testing flyctl agent... PASSED
Testing local Docker instance... PASSED
Pinging WireGuard gateway (give us a sec)... FAILED
(Error: ping gateway: pinger: Post "https://api.fly.io/graphql": unexpected EOF)
We can't establish connectivity with WireGuard for your personal organization.
WireGuard runs on 51820/udp, which your local network may block.
I’ve also tried with my mobile hotspot but no difference. But I can open the graphql url in browser and it shows the playground. Also every other command in flyctl work!
Hmm. Given your fly doctor reports it was unable to connect using Wireguard (compared to mine which could) that certainly looks to be the problem.
Fly apparently have added websocket support in the latest version and so that may help. Can’t hurt to try! Download the latest version (fly version update, I think), then try
fly wireguard websockets enable
… and having done that, then try both fly doctor and also your fly ssh console again. See if that fixes it or at least returns a different error.
I tried that but also the same result. But I found out that the problem is the ams region. If I do fly wireguard create org fra it works but the same command with ams does not work. Where should I report this issue?
Ans also is it possible to configure flyctl to use a different region? It is possible using the FLYCTL_WG_REGION environment variable. I ran export FLYCTL_WG_REGION=fra and the ssh and fly doctor are working now.