Why is our app being assigned the wrong port?

Our fly.toml file indicates that the app listen on port 8080 but when we check our logs they show that the app is listening to port 22, we tried changing the port from 8080 to 22 but that doesn’t help either.

fly.toml file:

# fly.toml file generated for payments on 2021-05-12T21:17:03+02:00

app = "payments"

kill_signal = "SIGINT"
kill_timeout = 5

[experimental]
  auto_rollback = true
  private_network= true

[[services]]
  internal_port = 8080
  protocol = "tcp"

#  [services.concurrency]
#    hard_limit = 30
#    soft_limit = 25
#    type = "connections"

  # [[services.ports]]
  #   handlers = ["http"]
  #   port = 80

  # [[services.ports]]
  #   handlers = ["tls", "http"]
  #   port = 443

  [[services.http_checks]]
    interval = 10000
    grace_period = "2s"
    method = "get"
    path = "/healthz"
    protocol = "http"
    timeout = 2000
    restart_limit = 6
    [services.http_checks.headers]


[metrics]
  port = 8080
  path = "/metrics" # default for most prometheus clients%

App logs:

2021-08-16 11:04:34	
{"message":"opening database connection","severity":"info","timestamp":"2021-08-16T09:04:34Z"}
2021-08-16 11:04:34	
{"message":"starting engine version Build Details:\n\tVersion:\tunset\n\tDate:\t\tunset","severity":"info","timestamp":"2021-08-16T09:04:34Z"}
2021-08-16 11:04:34	
2021/08/16 09:04:34 listening on [fdaa:0:1af2:a7b:a98:9b7f:2043:2]:22 (DNS: [fdaa::3]:53)

That “listening” message is not from your app, that’s our SSH service (that gets used when you run fly ssh console). The app itself determines which point to listen on.