failed to start error!

I’m getting the following errors when attempting to deploy. This wasn’t happening yesterday but I need this to be running asap

Failed to start remote builder heartbeat: server returned a non-200 status code: 500

Error: failed to fetch an image or build from source: error connecting to docker: server returned a non-200 status code: 500

4 Likes

Hi there,

Could you please rerun your deploy with

LOG_LEVEL=debug fly deploy | tee deploy.log

This will store a copy of the detailed log in deploy.log - it’s likely it’ll error out anyway but this way you have a capture of the logs, I’d love if you could share that with us.

If it blows up as it’s likely to happen, the fastest way to get around this is to identify your builder app in

fly apps list

it’ll be named fly-builder-something. Then, destroy it unceremoniously:

fly app destroy fly-builder-somethingsomething

at this point you can retry your deploy and a new app will be created for that, and it will hopefully work this time.

Regards,

  • Daniel

Hello! I am also running into this issue today.
I tried your potential solution @roadmr but I still get the same behavior.

What is the best way to share the log result with you?
LOG_LEVEL=debug fly deploy | tee deploy.log

if you are already working on this, I will standby while you folks happen to find the solution. Thanks!

Hi! Same issue here. This is the fragment with the error, but it’s not much descriptive. I also can share my entire log if you need it. What is the best way to do it?

==> Building image
DEBUG trying remote docker daemon
DEBUG --> POST https://api.fly.io/graphql

DEBUG {
  "query": "mutation($input: EnsureMachineRemoteBuilderInput!) { ensureMachineRemoteBuil
{ machine { id state ips { nodes { family kind ip } } }, app { name organization { id sl
  "variables": {
    "input": {
      "appName": "shift-staging",
      "organizationId": null
    }
  }
}


DEBUG {}
DEBUG <-- 500 https://api.fly.io/graphql (1.21s)

DEBUG {
  "errors": [
    {
      "message": "You hit a Fly API error with request ID: 01HCK0FR4ZFPWWZ4PXZ7HVC7D0-cd
      "extensions": {
        "code": "SERVER_ERROR",
        "fly_request_id": "01HCK0FR4ZFPWWZ4PXZ7HVC7D0-cdg"
      }
    }
  ],
  "data": {}
}

WARN Failed to start remote builder heartbeat: server returned a non-200 status code: 50
1 Like

Same issue here

DEBUG --> POST https://api.fly.io/graphql

DEBUG {
  "query": "\n# @genqlient\nmutation ResolverCreateBuild ($input: CreateBuildInput!) {\n\tcreateBuild(input: $input) {\n\t\tid\n\t\tstatus\n\t}\n}\n",
  "variables": {
    "input": {
      "appName": "mix-api",
      "builderType": "remote",
      "clientMutationId": "",
      "imageOpts": {
        "buildArgs": {},
        "buildPacks": null,
        "builder": "",
        "builtIn": "",
        "builtInSettings": null,
        "dockerfilePath": "",
        "extraBuildArgs": null,
        "imageLabel": "",
        "imageRef": "",
        "noCache": false,
        "publish": true,
        "tag": "registry.fly.io/mix-api:deployment-01HCK21VVBGA2VB9E9140GMH7R",
        "target": ""
      },
      "machineId": "",
      "strategiesAvailable": [
        "Buildpacks",
        "Dockerfile",
        "Builtin"
      ]
    }
  },
  "operationName": "ResolverCreateBuild"
}

DEBUG {0x14000cd1ad0}
DEBUG <-- 200 https://api.fly.io/graphql (62.16ms)

DEBUG {
  "data": {
    "createBuild": {
      "id": "3854175",
      "status": "started"
    }
  }
}

DEBUG Trying 'Buildpacks' strategy

DEBUG no buildpack builder configured, skipping
DEBUG result image:<nil> error:<nil>

DEBUG Trying 'Dockerfile' strategy

DEBUG --> POST https://api.fly.io/graphql

DEBUG {
  "query": "mutation($input: EnsureMachineRemoteBuilderInput!) { ensureMachineRemoteBuilder(input: $input) { machine { id state ips { nodes { family kind ip } } }, app { name organization { id slug } } } }",
  "variables": {
    "input": {
      "appName": "mix-api",
      "organizationId": null
    }
  }
}


DEBUG {}
DEBUG <-- 500 https://api.fly.io/graphql (385.05ms)

DEBUG {
  "errors": [
    {
      "message": "You hit a Fly API error with request ID: 01HCK21VYPBVCNPYZVNN21MJY0-lga",
      "extensions": {
        "code": "SERVER_ERROR",
        "fly_request_id": "01HCK21VYPBVCNPYZVNN21MJY0-lga"
      }
    }
  ],
  "data": {}
}

DEBUG result image:<nil> error:error connecting to docker: server returned a non-200 status code: 500

DEBUG --> POST https://api.fly.io/graphql

DEBUG {
  "query": "\n# @genqlient\nmutation ResolverFinishBuild ($input: FinishBuildInput!) {\n\tfinishBuild(input: $input) {\n\t\tid\n\t\tstatus\n\t\twallclockTimeMs\n\t}\n}\n",
  "variables": {
    "input": {
      "appName": "mix-api",
      "buildId": "3854175",
      "builderMeta": {
        "builderType": "",
        "buildkitEnabled": false,
        "dockerVersion": "",
        "platform": "",
        "remoteAppName": "",
        "remoteMachineId": ""
      },
      "clientMutationId": "",
      "finalImage": {
        "id": "",
        "sizeBytes": 0,
        "tag": ""
      },
      "logs": "error connecting to docker: server returned a non-200 status code: 500",
      "machineId": "",
      "status": "failed",
      "strategiesAttempted": [
        {
          "error": "",
          "note": "no buildpack builder configured, skipping",
          "result": "failed",
          "strategy": "Buildpacks"
        },
        {
          "error": "error connecting to docker: server returned a non-200 status code: 500",
          "note": "",
          "result": "failed",
          "strategy": "Dockerfile"
        }
      ],
      "timings": {
        "buildAndPushMs": 387,
        "buildMs": 386,
        "builderInitMs": 386,
        "contextBuildMs": -1,
        "imageBuildMs": -1,
        "pushMs": -1
      }
    }
  },
  "operationName": "ResolverFinishBuild"
}

DEBUG {0x14000c7a750}
DEBUG <-- 200 https://api.fly.io/graphql (141.74ms)

DEBUG {
  "data": {
    "finishBuild": {
      "id": "3854175",
      "status": "failed",
      "wallclockTimeMs": 524
    }
  }
}

DEBUG Task manager done
Error: failed to fetch an image or build from source: error connecting to docker: server returned a non-200 status code: 500

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.