Hi!
I’m trying to deploy an internal application that I host on GitHub.
I use GitHub actions for CI, I was looking to implement something simple like https://fly.io for CD.
I’m following 1-1 the GitHub - fly-apps/go-example: A minimal Go application for tutorials. My app isn’t even slightly different from the go-example, which worked when I tested.
My fly.toml
file is the one generated by flyctl launch
, same for Dockerfile
. I did not changed anything.
Its just an API, with some generated code from OpenAPI specification, that listens on the same port as the example, :8080.
But instead of working when I go to the url, the following just loops over:
2024-10-27 20:42:44.772
INFO [fly api proxy] listening at /.fly/api
2024-10-27 20:42:44.771
INFO Preparing to run: `/<name>` as root
2024-10-27 20:42:44.630
INFO Starting init (commit: 693c179a)...
2024-10-27 20:42:44.404
[ 0.280114] PCI: Fatal: No config space access function found
2024-10-27 20:42:44.038
2024-10-27T19:42:44.038483089 [01JB7R01BSN2108N39FM67VH01:main] Running Firecracker v1.7.0
2024-10-27 20:42:42.762
[ 1.673933] reboot: Restarting system
2024-10-27 20:42:42.760
WARN could not unmount /rootfs: EINVAL: Invalid argument
2024-10-27 20:42:42.759
INFO Starting clean up.
2024-10-27 20:42:42.743
INFO Main child exited normally with code: 1
2024-10-27 20:42:41.904
2024/10/27 19:42:41 INFO SSH listening listen_address=[fdaa:a:da35:a7b:f3:3f5e:81b3:2]:22 dns_server=[fdaa::3]:53
2024-10-27 20:42:41.877
Machine started in 960ms
2024-10-27 20:42:41.805
2024/10/27 19:42:41 ws connection error: new ws client: dial: tls: failed to verify certificate: x509: certificate signed by unknown authority
2024-10-27 20:42:41.774
2024/10/27 19:42:41 Initializing client
2024-10-27 20:42:41.774
2024/10/27 19:42:41 Getting rpcURL and wsURL, dev mode is: false
2024-10-27 20:42:41.774
2024/10/27 19:42:41 Starting server, listening on port 8080, production mode
And, when I go to .fly.dev, 502 error is shown. I can try anything, it just won’t load.
While, it should send back a JSON message with the version. Its a really simple endpoint, as simple as the one from the example, I just added it to my API in order to test fly.io service. It is fully working locally. It literally just shows: {"version": "1.0.0"}
I can know that my app is started when I try to reach the endpoint because of the logs that are shown:
2024-10-27 20:42:41.774
2024/10/27 19:42:41 Initializing client
2024-10-27 20:42:41.774
2024/10/27 19:42:41 Getting rpcURL and wsURL, dev mode is: false
2024-10-27 20:42:41.774
2024/10/27 19:42:41 Starting server, listening on port 8080, production mode
I’ve been struggling since 2 hours, verified everything, but nothing seems to work.
I feel like the error is related to certificates, since 2024/10/27 19:42:41 ws connection error: new ws client: dial: tls: failed to verify certificate: x509: certificate signed by unknown authority
is the only log tagged as error.
I do not use my personal domain though… I just use the one provided by fly.io, <name>.fly.dev
… So it should work, just like it did in the example…
Also, RootFS is always in pending sync, I don’t know what it means… RootFS Sizes * [Pending Sync]