App is deployed but error "DNS address could not be found."

Hi,

I have deployed a SpringBoot app via Docker. However trying to access the fly.dev address fails with the message “DNS address could not be found”.
With Heroku you pretty much just deploy the app and it’s available.
Is there an extra step that I need to perform? The app is set to run with 256MB of memory.
When I check the logs with fly logs I can see that the app started correctly.
For the record the app is a simple Strava Oauth2 front end with no database.

Here’s the fly.toml file:

app = '<<redacted>>'
primary_region = 'mad'

[build]
  dockerfile = 'Dockerfile'

[http_service]
  internal_port = 8080
  force_https = true
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0

  [http_service.concurrency]
    type = 'requests'
    hard_limit = 250
    soft_limit = 200

[[vm]]
  size = 'shared-cpu-1x'

And here’s the Docker file:

FROM amazoncorretto:17

ADD target/<<appname>>-0.0.1.jar /home/server.jar

ENV PORT 8080
EXPOSE 8080

CMD java -XX:MaxRAM=128m -jar /home/server.jar

what do you get when you run dig +short <app-name>.fly.dev

Hi, thanks for helping out!
That command returns nothing.

Curling the address returns “curl: (6) Could not resolve host:”.
I’m thinking the Fly app URL is not public.

Do note I’m on a trial plan, have not yet added a credit card, not sure if that matters.

Hey @fpezzini, can you resolve other apps like debug.fly.dev? Also, please check if you have an IP assigned to your app using fly ips list.

Thanks for helping out.
Yes, I can open debug.fly.dev.

No, there are no IPs assigned to my app. Do I have to do that manually?
I’d think if there’s a [http_service] tag it would assign that automatically ?

Thanks in advance,

I think it asks you to set up a shared IP during the initial app setup. It may not be true if you used something like fly apps create.

Also you can allocate a shared v4 using fly ips allocate-v4 --shared.

thank you @AkshitGarg , it worked!

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