Error: smoke checks for ... failed: the app appears to be crashing

Deployment fails with 502 ERROR since 6/16.
I have rebooted and read articles about similar errors but could not solve the problem.

Is this related to the fact that I set up my own domain on 6/16?
Immediately after that, I was able to access the site without any problems.

❯❯❯fly deploy

  Tasks: TOP => db:prepare
  (See full trace by running task with --trace)
   INFO Main child exited normally with code: 1
   INFO Starting clean up.
   WARN hallpass exited, pid: 514, status: signal: 15 (SIGTERM)
  2023/06/18 06:10:06 listening on [fdaa:2:1661:a7b:ff:9bf6:5e8d:2]:22 (DNS: [fdaa::3]:53)
  [    3.121473] reboot: Restarting system
  machine did not have a restart policy, defaulting to restart
Error: smoke checks for 91857272a44328 failed: the app appears to be crashing
❯❯❯flyctl logs

2023-06-18T06:48:44Z app[148ed5d2b73e38] nrt [info]Tasks: TOP => db:prepare
2023-06-18T06:48:44Z app[148ed5d2b73e38] nrt [info](See full trace by running task with --trace)
2023-06-18T06:48:45Z app[148ed5d2b73e38] nrt [info] INFO Main child exited normally with code: 1
2023-06-18T06:48:45Z app[148ed5d2b73e38] nrt [info] INFO Starting clean up.
2023-06-18T06:48:45Z app[148ed5d2b73e38] nrt [info] WARN hallpass exited, pid: 515, status: signal: 15 (SIGTERM)
2023-06-18T06:48:45Z app[148ed5d2b73e38] nrt [info]2023/06/18 06:48:45 listening on [fdaa:2:1661:a7b:fc:f86c:48:2]:22 (DNS: [fdaa::3]:53)
2023-06-18T06:48:46Z app[148ed5d2b73e38] nrt [info][    4.115009] reboot: Restarting system
2023-06-18T06:48:47Z runner[148ed5d2b73e38] nrt [info]machine did not have a restart policy, defaulting to restart
❯❯❯fly apps restart credo-quest

Restarting machine 91857272a44328
No health checks found
Machine 91857272a44328 restarted successfully!
Restarting machine 148ed5d2b73e38
No health checks found
Machine 148ed5d2b73e38 restarted successfully!
❯❯❯fly status

App
  Name     = credo-quest                                        
  Owner    = personal                                           
  Hostname = credo-quest.fly.dev                                
  Image    = credo-quest:deployment-01H36HZ8VXVN28A0V7N53CDEVN  
  Platform = machines                                           

Machines
PROCESS	ID            	VERSION	REGION	STATE  	CHECKS	LAST UPDATED         
app    	148ed5d2b73e38	62     	nrt   	stopped	      	2023-06-18T06:11:36Z	
app    	91857272a44328	67     	nrt   	stopped	      	2023-06-18T06:11:23Z
❯❯❯fly services list -a credo-quest

Services
PROTOCOL	PORTS      	HANDLERS  	FORCE HTTPS	PROCESS GROUP	REGIONS	MACHINES 
TCP     	80 => 3000 	[HTTP]    	True       	app          	nrt    	2       	
TCP     	443 => 3000	[HTTP,TLS]	False      	app          	nrt    	2

I try fly apps destroy fly-builder but not worked.

❯❯❯fly apps list                                                         [main]
NAME                          	OWNER   	STATUS   	PLATFORM	LATEST DEPLOY 
credo-quest                   	personal	suspended	machines	4h20m ago    	
credo-quest-db                	personal	deployed 	machines	             	
fly-builder-autumn-flower-8598	personal	suspended	machines
❯❯❯fly apps destroy fly-builder-autumn-flower-8598                                             [main]
Destroying an app is not reversible.
? Destroy app fly-builder-autumn-flower-8598? Yes
Destroyed app fly-builder-autumn-flower-8598
❯❯❯fly deploy                                                                                  [main]
==> Verifying app config
Validating /Users/furukawaeiichi/PF/CREDO_QUEST/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
WARN Failed to start remote builder heartbeat: You hit a Fly API error with request ID: 01H370ZWEBE2SJ44V1BFPC41G5-nrt
Error: failed to fetch an image or build from source: error connecting to docker: You hit a Fly API error with request ID: 01H37103ZBHXYCH8R4DV83WVQJ-nrt
❯❯❯fly apps list                                                                               [main]
NAME                      	OWNER   	STATUS   	PLATFORM	LATEST DEPLOY 
credo-quest               	personal	suspended	machines	4h27m ago    	
credo-quest-db            	personal	deployed 	machines	             	
fly-builder-cold-bush-1441	personal	pending  	machines

I referred to this article on the same obstacle, but it did not solve the problem.

❯❯❯fly deploy --local-only                                               [main]
==> Verifying app config
Validating /Users/furukawaeiichi/PF/CREDO_QUEST/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
Error: failed to fetch an image or build from source: docker is unavailable to build the deployment image
❯❯❯fly deploy --remote-only                                              [main]
==> Verifying app config
Validating /Users/furukawaeiichi/PF/CREDO_QUEST/fly.toml
Platform: machines
✓ Configuration is valid
--> Verified app config
==> Building image
WARN Failed to start remote builder heartbeat: You hit a Fly API error with request ID: 01H396A2FGWHWSZGBHWDTN6P5Y-nrt
Error: failed to fetch an image or build from source: error connecting to docker: You hit a Fly API error with request ID: 01H396A3JFX2GRFSA3NYK7JANP-nrt

Docker is functioning properly.

❯❯❯docker version                                                        [main]
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
Client:
 Cloud integration: v1.0.22
 Version:           20.10.13
 API version:       1.41
 Go version:        go1.16.15
 Git commit:        a224086
 Built:             Thu Mar 10 14:08:44 2022
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true
❯❯❯docker run hello-world                                                [main]
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
719385e32844: Pull complete 
Digest: sha256:c2e23624975516c7e27b1b25be3682a8c6c4c0cea011b791ce98aa423b5040a0
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

This article helped me get back to the beginning.

❯❯❯flyctl version upgrade
❯❯❯flyctl agent restart
❯❯❯fly deploy
...
  Tasks: TOP => db:prepare
  (See full trace by running task with --trace)
   INFO Main child exited normally with code: 1
   INFO Starting clean up.
   WARN hallpass exited, pid: 514, status: signal: 15 (SIGTERM)
  2023/06/19 07:27:16 listening on [fdaa:2:1661:a7b:ff:9bf6:5e8d:2]:22 (DNS: [fdaa::3]:53)
Error: smoke checks for 91857272a44328 failed: the app appears to be crashing```

I reconfirmed that I have my own domain set up and it looks fine.

❯❯❯flyctl certs show -a credo-quest credo-quest.com                                 [main]
The certificate for credo-quest.com has been issued.

Hostname                  = credo-quest.com
DNS Provider              = dnsv
Certificate Authority     = Let's Encrypt
Issued                    = rsa,ecdsa
Added to App              = 5 days ago
Source                    = fly

The following resolved the issue.
Thank you.

bin/rails db:prepare

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