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?