Unable to reach recently deployed apps at .fly.dev address (502s)

Barring any Fly-related proxy issues, 502 means the app (upstream) is non-responsive. And so, check if your app process is healthy, up, and running, if you haven’t already?

fly status --all -a <app-name> shows app status (incl health checks, if defined).

➜ fly status --all -a app      
App
  Name     = app          
  Owner    = me           
  Version  = 2               
  Status   = running           
  Hostname = app.fly.dev  
  Platform = nomad             

Instances
ID      	PROCESS	VERSION	REGION	DESIRED	STATUS 	HEALTH CHECKS      	RESTARTS	CREATED              
deadbeef	app    	434 ⇡  	aws   	run    	running	2 total, 2 passing 	0       	2022-09-28T21:38:31Z
beefdead	app    	425    	aws   	evict  	failed 	2 total, 2 critical	0       	2022-08-18T13:25:20Z	

…then, one may check for individual VM statuses, like so:

➜  fly vm status deadbeef -a app      
Instance
  ID            = deadbeef              
  Process       = app                   
  Version       = 2                   
  Region        = aws                   
  Desired       = run                   
  Status        = running               
  Health Checks = 2 total, 2 passing    
  Restarts      = 0                     
  Created       = 2020-08-18T01:08:31Z  

Events
TIMESTAMP           	TYPE      	MESSAGE                 
2020-08-18T01:08:11Z	Received  	Task received by client	
2020-08-18T01:08:41Z	Task Setup	Building Task Directory	
2020-08-18T01:09:01Z	Started   	Task started by client 	

Checks
ID                      SERVICE  	STATE  	     OUTPUT                                 
<some-id-0>	tcp-880 	passing	    TCP connect  172.x.y.z:880: Success 	
<some-id-1>	tcp-100	    passing	    TCP connect  172.a.b.c:100: Success	

fly ssh console -s -a <app-name> to gain access to the VM and verify if netstat -alpn or top show up expected app processes listening on expected port numbers.

1 Like