So the problem I’m facing is that I can’t reach my app over https but I can reach it over http via curl.
I can also ssh into my machine and reach it on http but again not https but I’m guessing thats to be expected because It’s my understanding that fly does SSL termination at the proxy so the proxy can communicate with my app over HTTP.
Why can’t I reach my website from the outside via HTTPS? Is there something wrong with my code/config?!
fly doctor shows everything appears to be working:
Testing authentication token... PASSED
Testing flyctl agent... PASSED
Testing local Docker instance... Nope
Pinging WireGuard gateway (give us a sec)... PASSED
Testing WireGuard DNS... PASSED
Testing WireGuard Flaps... PASSED
App specific checks for ***:
Checking that app has ip addresses allocated... PASSED
Checking A record for *** ... PASSED
Checking AAAA record for ***... PASSED
Build checks for ***:
Checking docker context size (this may take little bit)... PASSED (35 MB)
Checking for .dockerignore... PASSED
How are you accessing your app? If you want to access it from the public internet, use appname.fly.dev. This will do the TLS bit for you, and then your app only needs to reply in HTTP.
Yeah, I am wondering whether IPs has something to do with it. I have this:
halfer@halfer-VirtualBox:~/Development$ flyctl ip list
VERSION IP TYPE REGION CREATED AT
v6 2a09:8280:1::30:105:0 public (dedicated) global Mar 31 2024 18:18
v4 66.241.125.210 public (shared) Jan 1 0001 00:00
VERSION IP TYPE REGION CREATED AT
v4 137.66.34.183 public (dedicated, $2/mo) global May 17 2024 08:30
v6 2a09:8280:1::35:a003:0 public (dedicated) global May 14 2024 19:18
Although I have now just released the IP and switching to a shared IP (don’t need it anymore anyways), hopefully it will fix.
Hmm, OK. I’d next look at flyctl ip private, I have one IPv6 in here, which if memory serves was auto-allocated. I would assume the Fly proxy flows through that.
As far as I can remember, my apps just bind to 0.0.0.0 i.e. IPv4. It looks like you have that.
While I can’t spot any problems, I’m guessing that something is wrong with your toml.
If you don’t already have it, try installing jq. If you don’t want to install jq, you can manually extract the services section from the output of fly machines list --json.
Here’s what I see on a working app (there are two services sections listed as there are two machines):
% fly machine list --json | jq '.[].config.services'
3 hours ago a lot of my apps across several organisations went down with SSL errors. Might be related. If it’s still not working, then it’s probably something else
curl https://my-app.fly.dev/ -v
* Host my-app.fly.dev:443 was resolved.
* IPv6: (none)
* IPv4: XX.XX.XX.XX
* Trying XX.XX.XX.XX:443...
* Connected to my-app.fly.dev (XX.XX.XX.XX) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to my-app.fly.dev:443
* Closing connection
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to my-app.fly.dev:443
flyctl ip private - outputs 3 ID’s and their IPV6 address. Which seems right, the ID’s correspond with the 2 web processes I have and 1 for the cron job.
Out of curiosity halfer, do you have any certificates associated with your app? I’m wondering if mine got nuked when I bought the dedicated IPv4 and even though I’ve allocated the shared IPv4 it’s not set up the certs?