The app is not listening on the expected address and will not be reachable by fly-proxy.

Hello, i´m trying to deploy to fly and i´m getting this error. Any ideas on how to fix this?

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:3000
    Found these processes inside the machine with open listening sockets:
    PROCESS | ADDRESSES
    ----------------------------*--------------------------------------
    node lib/server/server.js | [::]:1337
    /.fly/hallpass | [fdaa:3:2f7b:a7b:ea:30c9:dd83:2]:22

WARN failed to release lease for machine 148edd65be2568: lease not found

toml:
[[services]]
protocol = “tcp”
internal_port = 3000
processes = [“app”]

[[services.ports]]
port = 80
handlers = [“http”]
force_https = true

[[services.ports]]
port = 443
handlers = [“tls”, “http”]
[services.concurrency]
type = “connections”
hard_limit = 25
soft_limit = 20

[[services.tcp_checks]]
interval = “15s”
timeout = “2s”
grace_period = “1s”

Likely related,

internal_port = 1337 changes to 3000 in .toml file after deploying.

hi @nssophia

We have some docs about what do do when you get this error:

Let us know if they help!

I´ve been troubleshooting this documentation for some time now, without sucess. I think my app listens to 1337 port, how do I change it from 3000 to 1337? When I deploy my .toml changes internal_port from 1337 to 3000.

I´ve checked dockerfile and it says:

USER node
EXPOSE 1337

If you application code is expecting 1337, then change the [[services]] section in fly.toml from:

[[services]]
protocol = “tcp”
internal_port = 3000
processes = [“app”]

to:

[[services]]
protocol = “tcp”
internal_port = 1337
processes = [“app”]

The internal_port parameter is the port that Fly proxy will forward incoming request to.

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