Failed to deploy with --remote-only

Got an error while trying to deploy dockerized documentation.
Everything works fine with local docker, but failing with remote. Both local and CI/CD (GitHub Actions).

Output from local (with debug enabled)

$ LOG_LEVEL=debug fly deploy --remote-only
DEBUG Loaded flyctl config from/Users/yzinets/.fly/config.yml
DEBUG determined hostname: "krk-mpacs"
DEBUG determined working directory: "/Users/yzinets/Repositories/Personal/KyotoFramework/kyoto/docs/v0"
DEBUG determined user home directory: "/Users/yzinets"
DEBUG determined config directory: "/Users/yzinets/.fly"
DEBUG ensured config directory exists.
DEBUG ensured config directory perms.
DEBUG cache loaded.
DEBUG config initialized.
DEBUG initialized task manager.
DEBUG started querying for new release
Update available 0.0.318 -> v0.0.320.
Run "fly version update" to upgrade.
DEBUG client initialized.
DEBUG app config loaded from /Users/yzinets/Repositories/Personal/KyotoFramework/kyoto/docs/v0/fly.toml
==> Verifying app config
--> Verified app config
==> Building image
DEBUG trying remote docker daemon
DEBUG Reporting buildDEBUG --> POST {{"query":"mutation($input: StartSourceBuildInput!) { startSourceBuild(input: $input) { sourceBuild { id } } }","variables":{"input":{"appId":"kyoto-docs-v0"}}}
DEBUG querying for release resulted to v0.0.320
DEBUG <-- 200 (436.98ms) {"errors":[{"message":"StartSourceBuildInput isn't a defined input type (on $input)","locations":[{"line":1,"column":10}],"path":["mutation"],"extensions":{"code":"variableRequiresValidType","typeName":"StartSourceBuildInput","variableName":"input"}},{"message":"Field 'startSourceBuild' doesn't exist on type 'Mutations'","locations":[{"line":1,"column":44}],"path":["mutation","startSourceBuild"],"extensions":{"code":"undefinedField","typeName":"Mutations","fieldName":"startSourceBuild"}},{"message":"Variable $input is declared by anonymous mutation but not used","locations":[{"line":1,"column":1}],"path":["mutation"],"extensions":{"code":"variableNotUsed","variableName":"input"}}]}
DEBUG Failed storing buildDEBUG Trying 'Buildpacks' strategy
DEBUG no buildpack builder configured, skipping
DEBUG result image:<nil> error:<nil>
DEBUG Trying 'Dockerfile' strategy
DEBUG --> POST {{"query":"mutation($input: EnsureMachineRemoteBuilderInput!) { ensureMachineRemoteBuilder(input: $input) { machine { id state ips { nodes { family kind ip } } }, app { name organization { id slug } } } }","variables":{"input":{"appName":"kyoto-docs-v0","organizationId":null}}}
DEBUG <-- 500 (37.04s) {"errors":[{"message":"An unknown error occured.","extensions":{"code":"SERVER_ERROR"}}],"data":{}}
DEBUG result image:<nil> error:error connecting to docker: An unknown error occured.
Error failed to fetch an image or build from source: error connecting to docker: An unknown error occured.


This is likely entirely unrelated but I see the fly.toml has port 80 …

Is that the port the app is listening on? There is no PORT set in the [env] and so perhaps that is correct. Normally on Fly I’ve seen apps use e.g 8080 internally, exposing 80/443 to the outside world.

Another random thought: it may be a temporary fault with that remote builder. You could destroy that remote builder (you can see its name using fly apps list). And next deploy will simply make a brand new fresh one. That’s worth trying once. If it fails again, you’d know that was not the issue either.

Else … it’s something for Fly to look at, like if it’s an issue with the API (500).

1 Like

Thank you very much for reply!

Yes, 80 is the default port for internal caddy server.
It’s definitely not related to port, as far as I was able to deploy with local docker enabled.
Removed existing builder, new builder was issued but … same error occurs.

Information is very poor, 500 error might mean a lot.

1 Like

Hi yuriizinets, it’s likely that the remote builder is failing because you’re not able to connect to our wireguard network using UDP. We’ve seen this happen for previous users using a VPN. Our prerelease version of flyctl has an option to use websockets over port 443.

Can you try out the prerelease version:

Install the prerelease:

curl -L | sh -s pre


fly wireguard websockets enable
fly deploy
1 Like

I was struck by the same problem. No VPN, but maybe caused by some connection settings of the Dutch internet provider ‘Ziggo’.

fly wireguard websockets enable resolved the issue. :blush: