Help with understanding how to reach .internal

Hi,

I am facing some problems with how to reach my .internal version of the app:

this is my fly.toml

fly.toml app configuration file generated for testapp-bereal on 2025-01-04T13:56:28+01:00

See App configuration (fly.toml) · Fly Docs for information about how to use this file.

app = ‘testapp-bereal’
primary_region = ‘ams’
kill_signal = ‘SIGINT’
kill_timeout = ‘5s’

[build]

[env]
PORT = ‘8080’

[[mounts]]
source = ‘fly_fastapi_data’
destination = ‘/data’

[http_service]
internal_port = 8080
force_https = true
auto_stop_machines = ‘stop’
auto_start_machines = true
min_machines_running = 0
processes = [‘app’]

[[services]]
protocol = ‘tcp’
internal_port = 8080

[[services.ports]]
port = 80
handlers = [‘http’]

[[services.ports]]
port = 443
handlers = [‘tls’, ‘http’]

[services.concurrency]
hard_limit = 25
soft_limit = 20

[[vm]]
memory = ‘1gb’
cpu_kind = ‘shared’
cpus = 1

[[statics]]
guest_path = ‘/app/public’
url_prefix = ‘/static/’

Accessing the public version works fine but when I try to reach the .internal version after connecting with fly ssh console I get an error:

2867000a79e478:/app# wget https://testapp-bereal.internal:8080/greetings && cat greetings && rm greetings
Connecting to testapp-bereal.internal:8080 ([fdaa:a:3557:a7b:32e:2f6b:43ac:2]:8080)
wget: can’t connect to remote host: Connection refused

I am sure I am missing some knowledge why this is happening but cannot figure it out, does anyone have any tips?

I’m not sure if this will fix your problem but you have both http_service and services blocks on the same port. If you have both it causes issues so remove one of them.

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