App Deployment Warning Despite Successful Access

Hi! I’ve encountered while deploying my application on fly. Despite following the deployment instructions and ensuring my application listens on 0.0.0.0:3000 as specified, I received a warning message during deployment indicating that the app is not listening on the expected address and might not be reachable by fly-proxy.

The exact warning message was as follows:

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 for job
Found these processes inside the machine with open listening sockets:
  PROCESS        | ADDRESSES                            
-----------------*--------------------------------------
  /.fly/hallpass | [fdaa:8:2d93:a7b:fc:d77c:63a9:2]:22  

However, it appears that the application is, in fact, accessible and functioning as intended. I verified that the application is listening on 0.0.0.0:3000, which aligns with both the Dockerfile configuration and the internal_port setting in my fly.toml file. Here are the relevant excerpts from my configuration files and the startup logs confirming that Puma started successfully and is listening on the correct address:

Dockerfile CMD:

FROM ruby:3.2.2

RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs libvips-dev chromium chromium-driver

ENV APP_PATH /myapp

RUN mkdir $APP_PATH
WORKDIR $APP_PATH

COPY Gemfile $APP_PATH/Gemfile
COPY Gemfile.lock $APP_PATH/Gemfile.lock
RUN bundle install

COPY . $APP_PATH

COPY entrypoint.sh /usr/bin/
RUN chmod +x /usr/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]

EXPOSE 3000
CMD ["./bin/rails", "server", "-b", "0.0.0.0"]

fly.toml internal_port:

# fly.toml app configuration file generated for myapp on 2024-03-09T09:06:35+09:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#

app = 'myapp'
primary_region = 'nrt'
console_command = '/rails/bin/rails console'
swap_size_mb = 512

[build]

[deploy]
  release_command = './bin/rails db:prepare'

[http_service]
  internal_port = 3000
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

[[vm]]
  memory = 256
  cpu_kind = 'shared'
  cpus = 1

Startup Log Excerpt:

2024-03-11T02:41:27.581 app[784e667b274628] nrt [info] => Booting Puma

2024-03-11T02:41:27.581 app[784e667b274628] nrt [info] => Rails 7.0.4.3 application starting in production

2024-03-11T02:41:27.581 app[784e667b274628] nrt [info] => Run `bin/rails server --help` for more startup options

2024-03-11T02:41:30.007 app[784e667b274628] nrt [info] Puma starting in single mode...

2024-03-11T02:41:30.007 app[784e667b274628] nrt [info] * Puma version: 5.6.5 (ruby 3.2.2-p53) ("Birdie's Version")

2024-03-11T02:41:30.007 app[784e667b274628] nrt [info] * Min threads: 5

2024-03-11T02:41:30.007 app[784e667b274628] nrt [info] * Max threads: 5

2024-03-11T02:41:30.007 app[784e667b274628] nrt [info] * Environment: production

2024-03-11T02:41:30.008 app[784e667b274628] nrt [info] * PID: 305

2024-03-11T02:41:30.009 app[784e667b274628] nrt [info] * Listening on http://0.0.0.0:3000

2024-03-11T02:41:30.028 app[784e667b274628] nrt [info] Use Ctrl-C to stop

Given this, I’m puzzled by the warning message and concerned about any potential impacts it may have on my application’s performance or availability. Could you please help clarify why this warning might be appearing despite the application being accessible, and if there’s any further action I need to take to ensure my application’s optimal performance on your platform?

2 Likes

Hi. That happens to be the case for one of my toy apps too. I have an expressjs server with puppeteer and it takes a while to boot so flyctl seems eager to point there’s nothing being listened to on the setup port but so far I have no issues with that app.

I’ll check issues on flyctl to see if this is known or I’ll file an issue there.

Thank you for sharing your experience! It’s reassuring to know I’m not alone in encountering this issue.

Your approach to checking flyctl for related issues or filing a new one is a great idea. I’m curious to find out if this is a common occurrence with applications that take a bit longer to boot. In the meantime, I’ll also continue to monitor my app’s performance closely to ensure there are no disruptions.

If you discover anything on flyctl that could be helpful, I’d really appreciate it if you could let me know. Thank you again for your support!

I couldnt find an existing issue then I created one here: FlyCTL is eager to say "The app is not listening on the expected address" when the app takes longer to bind · Issue #3358 · superfly/flyctl · GitHub

Same here. I see this message when deploying:

I noticed that the backups on LiteFS stopped working (they have been working for a week), I think it is related to this proxy error but I can’t find what’s wrong as I haven’t changed the config of Dockerfile, fly.toml nor litefs.yml.

Any suggestion is welcome!

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