Fly machine with private IP, cannot assign http_service internal_port anymore

Hey, I’m deploying a machine to fly with a rather simple configuration and using tired-proxy to shutdown the machine when it doesn’t get any requests.

This worked fine until recently, now the http_service configuration option is suddenly invalid and I can’t figure out how to make it work again.

I assigned a flycast internal IPv6 to the app and was able to make requests from other apps.

app = "app-name"
primary_region = "xy"

[http_service]
  internal_port = 8080 # The port where tired-proxy runs

[env]
  PORT = "9090" # The port which tired-proxy proxies to
  TIME_TO_SHUTDOWN = "600" # The idle time for tired-proxy in seconds

The linting issue:

╰─➤  fly config validate -a app-name -c fly.toml
Validating fly.toml
Error unknown attribute 'http_service' for AppConfig.

          raise UnknownAttributeError.new(self, k.to_s)
          ^^^^^

Hi @kombustor

What version of the fly.io cli are you using? (you can use fly version to find out)

The newest one, v0.0.420

Looks like the validation uses an API endpoint which doesn’t like the [http_service] section.

Looking at the fly.io cli source code the [http_service] section is magic that gets converted to to a full [services] config when running deploy commands so either the API hasn’t been updated to understand this section or this section shouldn’t be sent to the API during validation.

Maybe @tvdfly can provide further insight.

Thank you, that solved it!

I just needed to define it myself

[[services]]
  internal_port = 8080 # The port where tired-proxy runs
  protocol = "tcp"
  [[services.ports]]
    handlers = ["http"]
    port = 8080