Deploy times out waiting for machine to start

I’m trying to deploy an existing V2 Machine, and it’s hanging while waiting for the machine to start:

Error: timeout reached waiting for machine to started failed to wait for VM 3d8d342a1d7389 in started state

It’s a one-task machine (runs a binary that talks to a fly postgres db once per day, no public address). Here’s the fly.toml:

app = "foobarbaz"
primary_region = "fra"
kill_signal = "SIGINT"
kill_timeout = "5s"

  auto_rollback = true

  dockerfile = "Dockerfile"

  RUST_LOG = "info"

How can I find out what’s going wrong? I’ve verified that the DATABASE_URL secret is set by removing and re-attaching the db app.

what results when you run the fly logs command?

2023-06-02T12:38:44Z runner[3d8d342a1d7389] fra [info]Successfully prepared image (625.686692ms)

Then nothing, until it times out.

I think the issue is that somewhere along the way (maybe the V1 → V2 change?) the way that machines respond to flyctl deploy --remote-only --auto-confirm (running on CI) changed: V1 machines would always run on deploy, then run according to their schedule, meaning that the deploy command would successfully complete.

But this is no longer happening: once the image is deployed, the machine doesn’t start automatically, so the deploy times out after 60 seconds and I get a failure report.

But it turns out that the new machine is fine: I can run it using fly m start [id] and it behaves exactly as it’s supposed to (starts up, talks to db, exits with 0). I can also list its schedule, and it’s also correct.

So maybe I’m missing a fly.toml entry telling the machine what to do when it’s deployed, or I need to change my CI deploy command (although I can’t see anything obvious I can change in the fly deploy command.

1 Like

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