Struggle to deploy a new Rails application (Litestream + Tigris)

fly launch is failing for me

This has worked before, I’m wondering if something off

Here is the application I’m trying to deploy

In what fashion is it failing? Do you perhaps get an error? If so, would you put the error here?

Error creating Tigris object storage: input:3: createAddOn domain name is required

createAddOn domain name is one error


No machines in group app, launching a new machine
WARN failed to release lease for machine 148e32edb70d58 [app]: lease not found

-------
 ✖ Failed: timeout reached waiting for health checks to pass for machine 148e32edb70d58: failed to get VM 148e32edb70d58: Get "https://ap…
-------
Error: timeout reached waiting for health checks to pass for machine 148e32edb70d58: failed to get VM 148e32edb70d58: Get "https://api.machines.dev/v1/apps/somaliska-svenska-kompis-klubben/machines/148e32edb70d58": net/http: request canceled

See https://fly.io/docs/rails/getting-started/existing/#common-initial-deployment-issues
for suggestions on how to resolve common deployment issues.

Fly logs

fly logs
2025-04-07T20:32:00Z app[148e32edb70d58] arn [info]/dev/vdc: clean, 15/64512 files, 8799/258048 blocks
2025-04-07T20:32:00Z app[148e32edb70d58] arn [info] INFO Mounting /dev/vdc at /data w/ uid: 1000, gid: 1000 and chmod 0755
2025-04-07T20:32:00Z app[148e32edb70d58] arn [info] INFO Resized /data to 1056964608 bytes
2025-04-07T20:32:00Z app[148e32edb70d58] arn [info] INFO Preparing to run: `/rails/bin/docker-entrypoint ./bin/rake litestream:run ./bin/rails server` as 1000
2025-04-07T20:32:00Z app[148e32edb70d58] arn [info] INFO [fly api proxy] listening at /.fly/api
2025-04-07T20:32:00Z runner[148e32edb70d58] arn [info]Machine started in 1.218s
2025-04-07T20:32:00Z app[148e32edb70d58] arn [info]2025/04/07 20:32:00 INFO SSH listening listen_address=[fdaa:13:cf1a:a7b:3e7:b0e9:f24d:2]:22
2025-04-07T20:32:04Z app[148e32edb70d58] arn [info]time=2025-04-07T20:32:04.971Z level=INFO msg=litestream version=v0.3.13
2025-04-07T20:32:04Z app[148e32edb70d58] arn [info]time=2025-04-07T20:32:04.971Z level=ERROR msg="failed to run" error="bucket required for s3 replica"
2025-04-07T20:32:05Z app[148e32edb70d58] arn [info] INFO Main child exited normally with code: 1
2025-04-07T20:32:05Z app[148e32edb70d58] arn [info] INFO Starting clean up.
2025-04-07T20:32:06Z app[148e32edb70d58] arn [info] INFO Umounting /dev/vdc from /data
2025-04-07T20:32:06Z app[148e32edb70d58] arn [info] WARN could not unmount /rootfs: EINVAL: Invalid argument
2025-04-07T20:32:06Z app[148e32edb70d58] arn [info][    7.057813] reboot: Restarting system
2025-04-07T20:32:09Z app[148e32edb70d58] arn [info]2025-04-07T20:32:09.089796348 [01JR8Z5P8C6VH4375EBSQ2EN5P:main] Running Firecracker v1.7.0
2025-04-07T20:32:10Z app[148e32edb70d58] arn [info] INFO Starting init (commit: 8040bc2d)...
2025-04-07T20:32:10Z app[148e32edb70d58] arn [info] INFO Checking filesystem on /data
2025-04-07T20:32:10Z app[148e32edb70d58] arn [info]/dev/vdc: clean, 15/64512 files, 8799/258048 blocks
2025-04-07T20:32:10Z app[148e32edb70d58] arn [info] INFO Mounting /dev/vdc at /data w/ uid: 1000, gid: 1000 and chmod 0755
2025-04-07T20:32:10Z app[148e32edb70d58] arn [info] INFO Resized /data to 1056964608 bytes
2025-04-07T20:32:10Z app[148e32edb70d58] arn [info] INFO Preparing to run: `/rails/bin/docker-entrypoint ./bin/rake litestream:run ./bin/rails server` as 1000
2025-04-07T20:32:10Z app[148e32edb70d58] arn [info] INFO [fly api proxy] listening at /.fly/api
2025-04-07T20:32:10Z runner[148e32edb70d58] arn [info]Machine started in 1.179s
2025-04-07T20:32:10Z app[148e32edb70d58] arn [info]2025/04/07 20:32:10 INFO SSH listening listen_address=[fdaa:13:cf1a:a7b:3e7:b0e9:f24d:2]:22
2025-04-07T20:32:14Z app[148e32edb70d58] arn [info]time=2025-04-07T20:32:14.622Z level=INFO msg=litestream version=v0.3.13
2025-04-07T20:32:14Z app[148e32edb70d58] arn [info]time=2025-04-07T20:32:14.622Z level=ERROR msg="failed to run" error="bucket required for s3 replica"
2025-04-07T20:32:15Z app[148e32edb70d58] arn [info] INFO Main child exited normally with code: 1
2025-04-07T20:32:15Z app[148e32edb70d58] arn [info] INFO Starting clean up.
2025-04-07T20:32:16Z app[148e32edb70d58] arn [info] INFO Umounting /dev/vdc from /data
2025-04-07T20:32:16Z app[148e32edb70d58] arn [info] WARN could not unmount /rootfs: EINVAL: Invalid argument
2025-04-07T20:32:16Z app[148e32edb70d58] arn [info][    7.352629] reboot: Restarting system
2025-04-07T20:32:20Z app[148e32edb70d58] arn [info]2025-04-07T20:32:20.793856403 [01JR8Z5P8C6VH4375EBSQ2EN5P:main] Running Firecracker v1.7.0
2025-04-07T20:32:21Z app[148e32edb70d58] arn [info] INFO Starting init (commit: 8040bc2d)...
2025-04-07T20:32:21Z app[148e32edb70d58] arn [info] INFO Checking filesystem on /data
2025-04-07T20:32:21Z app[148e32edb70d58] arn [info]/dev/vdc: clean, 15/64512 files, 8799/258048 blocks
2025-04-07T20:32:21Z app[148e32edb70d58] arn [info] INFO Mounting /dev/vdc at /data w/ uid: 1000, gid: 1000 and chmod 0755
2025-04-07T20:32:21Z app[148e32edb70d58] arn [info] INFO Resized /data to 1056964608 bytes
2025-04-07T20:32:21Z app[148e32edb70d58] arn [info] INFO Preparing to run: `/rails/bin/docker-entrypoint ./bin/rake litestream:run ./bin/rails server` as 1000
2025-04-07T20:32:21Z app[148e32edb70d58] arn [info] INFO [fly api proxy] listening at /.fly/api
2025-04-07T20:32:21Z runner[148e32edb70d58] arn [info]Machine started in 1.176s
2025-04-07T20:32:22Z app[148e32edb70d58] arn [info]2025/04/07 20:32:22 INFO SSH listening listen_address=[fdaa:13:cf1a:a7b:3e7:b0e9:f24d:2]:22
2025-04-07T20:32:26Z app[148e32edb70d58] arn [info]time=2025-04-07T20:32:26.403Z level=INFO msg=litestream version=v0.3.13
2025-04-07T20:32:26Z app[148e32edb70d58] arn [info]time=2025-04-07T20:32:26.404Z level=ERROR msg="failed to run" error="bucket required for s3 replica"
2025-04-07T20:32:26Z app[148e32edb70d58] arn [info] INFO Main child exited normally with code: 1
2025-04-07T20:32:26Z app[148e32edb70d58] arn [info] INFO Starting clean up.
2025-04-07T20:32:30Z app[148e32edb70d58] arn [info] INFO Umounting /dev/vdc from /data
2025-04-07T20:32:30Z app[148e32edb70d58] arn [info] WARN could not unmount /rootfs: EINVAL: Invalid argument
2025-04-07T20:32:30Z app[148e32edb70d58] arn [info][    9.579018] reboot: Restarting system
2025-04-07T20:32:39Z app[148e32edb70d58] arn [info]2025-04-07T20:32:39.534510459 [01JR8Z5P8C6VH4375EBSQ2EN5P:main] Running Firecracker v1.7.0
2025-04-07T20:32:40Z app[148e32edb70d58] arn [info] INFO Starting init (commit: 8040bc2d)...
2025-04-07T20:32:40Z app[148e32edb70d58] arn [info] INFO Checking filesystem on /data
2025-04-07T20:32:40Z app[148e32edb70d58] arn [info]/dev/vdc: clean, 15/64512 files, 8799/258048 blocks
2025-04-07T20:32:40Z app[148e32edb70d58] arn [info] INFO Mounting /dev/vdc at /data w/ uid: 1000, gid: 1000 and chmod 0755
2025-04-07T20:32:40Z app[148e32edb70d58] arn [info] INFO Resized /data to 1056964608 bytes
2025-04-07T20:32:40Z app[148e32edb70d58] arn [info] INFO Preparing to run: `/rails/bin/docker-entrypoint ./bin/rake litestream:run ./bin/rails server` as 1000
2025-04-07T20:32:40Z app[148e32edb70d58] arn [info] INFO [fly api proxy] listening at /.fly/api
2025-04-07T20:32:40Z runner[148e32edb70d58] arn [info]Machine started in 1.196s
2025-04-07T20:32:40Z app[148e32edb70d58] arn [info]2025/04/07 20:32:40 INFO SSH listening listen_address=[fdaa:13:cf1a:a7b:3e7:b0e9:f24d:2]:22
2025-04-07T20:32:45Z app[148e32edb70d58] arn [info]time=2025-04-07T20:32:45.051Z level=INFO msg=litestream version=v0.3.13
2025-04-07T20:32:45Z app[148e32edb70d58] arn [info]time=2025-04-07T20:32:45.051Z level=ERROR msg="failed to run" error="bucket required for s3 replica"
2025-04-07T20:32:45Z app[148e32edb70d58] arn [info] INFO Main child exited normally with code: 1
2025-04-07T20:32:45Z app[148e32edb70d58] arn [info] INFO Starting clean up.
2025-04-07T20:32:47Z app[148e32edb70d58] arn [info] INFO Umounting /dev/vdc from /data
2025-04-07T20:32:47Z app[148e32edb70d58] arn [info] WARN could not unmount /rootfs: EINVAL: Invalid argument
2025-04-07T20:32:47Z app[148e32edb70d58] arn [info][    7.545616] reboot: Restarting system
2025-04-07T20:33:11Z app[148e32edb70d58] arn [info]2025-04-07T20:33:11.473704832 [01JR8Z5P8C6VH4375EBSQ2EN5P:main] Running Firecracker v1.7.0
2025-04-07T20:33:12Z app[148e32edb70d58] arn [info] INFO Starting init (commit: 8040bc2d)...
2025-04-07T20:33:12Z app[148e32edb70d58] arn [info] INFO Checking filesystem on /data
2025-04-07T20:33:12Z app[148e32edb70d58] arn [info]/dev/vdc: clean, 15/64512 files, 8799/258048 blocks
2025-04-07T20:33:12Z app[148e32edb70d58] arn [info] INFO Mounting /dev/vdc at /data w/ uid: 1000, gid: 1000 and chmod 0755
2025-04-07T20:33:12Z app[148e32edb70d58] arn [info] INFO Resized /data to 1056964608 bytes
2025-04-07T20:33:12Z app[148e32edb70d58] arn [info] INFO Preparing to run: `/rails/bin/docker-entrypoint ./bin/rake litestream:run ./bin/rails server` as 1000
2025-04-07T20:33:12Z app[148e32edb70d58] arn [info] INFO [fly api proxy] listening at /.fly/api
2025-04-07T20:33:12Z runner[148e32edb70d58] arn [info]Machine started in 1.233s
2025-04-07T20:33:12Z app[148e32edb70d58] arn [info]2025/04/07 20:33:12 INFO SSH listening listen_address=[fdaa:13:cf1a:a7b:3e7:b0e9:f24d:2]:22
2025-04-07T20:33:17Z app[148e32edb70d58] arn [info]time=2025-04-07T20:33:17.122Z level=INFO msg=litestream version=v0.3.13
2025-04-07T20:33:17Z app[148e32edb70d58] arn [info]time=2025-04-07T20:33:17.122Z level=ERROR msg="failed to run" error="bucket required for s3 replica"
2025-04-07T20:33:17Z app[148e32edb70d58] arn [info] INFO Main child exited normally with code: 1
2025-04-07T20:33:17Z app[148e32edb70d58] arn [info] INFO Starting clean up.
2025-04-07T20:33:19Z app[148e32edb70d58] arn [info] INFO Umounting /dev/vdc from /data
2025-04-07T20:33:19Z app[148e32edb70d58] arn [info] WARN could not unmount /rootfs: EINVAL: Invalid argument
2025-04-07T20:33:19Z app[148e32edb70d58] arn [info][    8.259827] reboot: Restarting system
2025-04-07T20:34:03Z app[148e32edb70d58] arn [info]2025-04-07T20:34:03.012066214 [01JR8Z5P8C6VH4375EBSQ2EN5P:main] Running Firecracker v1.7.0
2025-04-07T20:34:03Z app[148e32edb70d58] arn [info] INFO Starting init (commit: 8040bc2d)...
2025-04-07T20:34:04Z app[148e32edb70d58] arn [info] INFO Checking filesystem on /data
2025-04-07T20:34:04Z app[148e32edb70d58] arn [info]/dev/vdc: clean, 15/64512 files, 8799/258048 blocks
2025-04-07T20:34:04Z app[148e32edb70d58] arn [info] INFO Mounting /dev/vdc at /data w/ uid: 1000, gid: 1000 and chmod 0755
2025-04-07T20:34:04Z app[148e32edb70d58] arn [info] INFO Resized /data to 1056964608 bytes
2025-04-07T20:34:04Z app[148e32edb70d58] arn [info] INFO Preparing to run: `/rails/bin/docker-entrypoint ./bin/rake litestream:run ./bin/rails server` as 1000
2025-04-07T20:34:04Z app[148e32edb70d58] arn [info] INFO [fly api proxy] listening at /.fly/api
2025-04-07T20:34:04Z runner[148e32edb70d58] arn [info]Machine started in 1.238s
2025-04-07T20:34:04Z app[148e32edb70d58] arn [info]2025/04/07 20:34:04 INFO SSH listening listen_address=[fdaa:13:cf1a:a7b:3e7:b0e9:f24d:2]:22
2025-04-07T20:34:08Z app[148e32edb70d58] arn [info]time=2025-04-07T20:34:08.660Z level=INFO msg=litestream version=v0.3.13
2025-04-07T20:34:08Z app[148e32edb70d58] arn [info]time=2025-04-07T20:34:08.660Z level=ERROR msg="failed to run" error="bucket required for s3 replica"
2025-04-07T20:34:09Z app[148e32edb70d58] arn [info] INFO Main child exited normally with code: 1
2025-04-07T20:34:09Z app[148e32edb70d58] arn [info] INFO Starting clean up.
2025-04-07T20:34:10Z app[148e32edb70d58] arn [info] INFO Umounting /dev/vdc from /data
2025-04-07T20:34:10Z app[148e32edb70d58] arn [info] WARN could not unmount /rootfs: EINVAL: Invalid argument
2025-04-07T20:34:10Z app[148e32edb70d58] arn [info][    7.665066] reboot: Restarting system
2025-04-07T20:34:11Z runner[148e32edb70d58] arn [info]machine has reached its max restart count of 10

```

I’m using Ruby on Rails with sqlite as database, I have had success in deploying in the past

@halfer Any idea what the problem can be?

This has worked out-of-the-box in the past

What does fly secrets list show? I recently added support for automatic backups of sqlite3 databases to tigris using litestream. The intent was that you could opt out by either unsetting or never setting BUCKET_NAME, but that may not be working correctly.

It looks like there were two problems, one of which has already been fixed:

You should be able to run fly storage create, then fly deploy and be up and running.

I’ll look into the second problem tomorrow.

Thanks, this is a client work. First time building a prototype using ruby on rails for that, in fact I learned RoR through your book Agile web development and it’s an honour having the author of that book responding back to me. Even to this day, that book is still phenomenal programming book and the hardcover always sits on my desk.

I have had success deploying another rails project before easily with Fly.io

Is there a changelog I can subscribe to where I get updated when fixes are being made? Some news channel of some sort


$ fly secrets list
NAME            	DIGEST          	CREATED AT
RAILS_MASTER_KEY	4511f03f6d8aae33	10h15m ago

It works fine now

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