remote builder down

Not able to build apps using remote-builder, it has exited. Is there any way to spin-up a new one/ get it out of inactivity?

when trying to build using remote-builder

$ LOG_LEVEL=debug fly --app fly-builder-red-thunder-9115 status
DEBUG Loaded flyctl config from/home/diru/.fly/config.yml
DEBUG determined hostname: "pop-os"
DEBUG determined working directory: "/home/diru/Desktop/go-example"
DEBUG determined user home directory: "/home/diru"
DEBUG determined config directory: "/home/diru/.fly"
DEBUG ensured config directory exists.
DEBUG ensured config directory perms.
DEBUG cache loaded.
DEBUG config initialized.
DEBUG initialized task manager.
DEBUG skipped querying for new release
DEBUG client initialized.
DEBUG app config loaded from /home/diru/Desktop/go-example/fly.toml
==> Verifying app config
--> Verified app config
==> Building image
DEBUG trying remote docker daemon
DEBUG Reporting buildDEBUG --> POST https://api.fly.io/graphql {{"query":"mutation($input: StartSourceBuildInput!) { startSourceBuild(input: $input) { sourceBuild { id } } }","variables":{"input":{"appId":"diru-go-example"}}}
}
DEBUG <-- 200 https://api.fly.io/graphql (587.57ms) {"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 --> POST https://api.fly.io/graphql {{"query":"mutation($input: EnsureMachineRemoteBuilderInput!) { ensureMachineRemoteBuilder(input: $input) { machine { id state ips { nodes { family kind ip } } }, app { name organization { id slug } } } }","variables":{"input":{"appName":"diru-go-example","organizationId":null}}}
}
DEBUG <-- 200 https://api.fly.io/graphql (362.22ms) {"data":{"ensureMachineRemoteBuilder":null},"errors":[{"message":"Could not resolve App","locations":[{"line":1,"column":54}],"path":["ensureMachineRemoteBuilder"],"extensions":{"code":"NOT_FOUND"}}]}
DEBUG result image:<nil> error:Could not resolve App
Error failed to fetch an image or build from source: Could not resolve App

status of remote-builder

App
  Name     = fly-builder-red-thunder-9115          
  Owner    = personal                              
  Version  = 0                                     
  Status   = pending                               
  Hostname = fly-builder-red-thunder-9115.fly.dev  

Machines
ID              NAME                    REGION  STATE   CREATED              
0192f6d6        purple-rain-1258        maa     exited  2022-02-09T07:09:38Z

That error is saying the target app you’re deploying to can’t be found.

What’s the contents of your fly.toml file? What happens when you run flyctl status in the directory containing your app source?

the fly.toml file


# fly.toml file generated for diru-go-example on 2022-03-15T23:40:34+05:30

app = "diru-go-example"

kill_signal = "SIGINT"
kill_timeout = 5
processes = []

[build]
  builder = "paketobuildpacks/builder:base"
  buildpacks = ["gcr.io/paketo-buildpacks/go"]

[env]
  PORT = "8080"

[experimental]
  allowed_public_ports = []
  auto_rollback = true

[[services]]
  http_checks = []
  internal_port = 8080
  processes = ["app"]
  protocol = "tcp"
  script_checks = []

  [services.concurrency]
    hard_limit = 25
    soft_limit = 20
    type = "connections"

  [[services.ports]]
    handlers = ["http"]
    port = 80

  [[services.ports]]
    handlers = ["tls", "http"]
    port = 443

  [[services.tcp_checks]]
    grace_period = "1s"
    interval = "15s"
    restart_limit = 0
    timeout = "2s"

fly status gives:

Error failed to get app: Could not resolve App

The error itself is a bit abstract, before I got something like:

Error failed to get app: couldn't connect to docker. Could not resolve App

Now it is working fine, thank you for your response!

I’m glad it’s working.