The app is not listening ... will not be reachable by fly-proxy

I get the following error when deploying my Phoenix LiveView app. I’ve tried various settings in my fly.toml and runtime.exs but haven’t found the right combination. Anyone know the right settings or have a pointer to comprehensive docs for Phx LV app? Or perhaps is a transient artifact of rolling deployments?

WARNING The app is not listening on the expected address and will not be reachable by fly-proxy.
You can fix this by configuring your app to listen on the following addresses:

  • 0.0.0.0:8080 90801679a1e2d8 is now in a good state
    Found these processes inside the machine with open listening sockets:
    PROCESS | ADDRESSES
    ------------------------------------*---------------------------------------
    /.fly/hallpass | [fdaa:3:3462:a7b:305:2d8e:2d52:2]:22
    /app/erts-14.2.5/bin/epmd -daemon | 0.0.0.0:4369, [::]:4369

[fly.toml]
app = ‘shoe-game’
primary_region = ‘iad’
kill_signal = ‘SIGTERM’

[build]

[deploy]
release_command = ‘/app/bin/migrate’

[env]
PHX_HOST = ‘shoe-game.fly.dev
PORT = ‘8080’

[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = “stop”
auto_start_machines = true
min_machines_running = 1
processes = [‘app’]

[http_service.concurrency]
type = ‘requests’
# hard_limit = 1000
# soft_limit = 1000

[[vm]]
memory = ‘1gb’
cpu_kind = ‘shared’
cpus = 1

Check your logs?

If your application eventually starts up and processes requests, you might need to adjust your grace period: App configuration (fly.toml) · Fly Docs

If your app is crashing and never able to process requests, then that is the issue that needs to be resolved.

Thanks for your reply.

My app seems to function just fine. I figured I don’t have something configured properly because I get the proxy warning.

I tried adding a section for to extend the grace_period but then my deploys failed. I need to research what ports are expected vs what my app listens on. For example, I think, maybe my app only handles 443.

[[http_service.checks]]
  grace_period = "10s"
  interval = "30s"
  method = "GET"
  timeout = "5s"
  path = "/"

The request needs to return with a 200 OK to be successful. If your app redirects / to another path you will need to update it. It might also be worth adding:

protocol = "https"