Changed `internal_port` but fly is still looking for old port

In my fly.toml, I’ve changed the internal_port for several services from 3000 to other numbers (e.g., 3050, 4050, etc):

processes = ["myprocess"]
http_checks = []
internal_port = 3050
protocol = "tcp"
handlers = ["tls", "http"]
port = 3050

Yet, when I run fly deploy, I see that warnings that fly-proxy will not be able to reach my services because it’s still looking for port 3000:

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:

And in my fly logs, I see:

instance refused connection. is your app listening on make sure it is not only listening on (hint: look at your startup logs, servers often print the address they are listening on)

Am I missing some other config? I’ve tried manually scaling the machine count to 0 and back up.

Hi @flea, nothing’s really coming to mind, but a shot in the dark since there are no other responses: is the number 3000 really not in your fly.toml anywhere? e.g. in an http_service block populated on launch?

Yeah, there’s no 3000 anywhere in the fly.toml I’m deploying. Other than the [[services]] block I have above, I have a couple other blocks:

dockerfile = ''

internal_port = 8080
force_https = true
min_machines_running = 0
processes = ["web-app"]

cpu_kind = "shared"
cpus = 1
memory_mb = 1024

web-app = "..."

So I thought perhaps fly is looking at my Dockerfile and somehow assuming the port should be 3000? But that doesn’t make too much sense, because I’d imagine internal_port directly controls which port fly should be looking for.

Oh, I solved the problem - it was a silly mistake. I was using the command:

fly deploy --app my-app

when I should have been using:

fly deploy --config my-app.toml

The former command works for everything other than toml changes, so I’ve gotten in the habit of mindlessly using the former. Thanks for the reply @catflydotio

1 Like

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