fly postgres attach - no such host

I’m having trouble attaching my postgres to the app.

When running fly postgres attach --app equipe-ffe equipe-ffe-db

It returns

Error Get "http://equipe-ffe-db.internal:5500/commands/databases/equipe_ffe": dial: lookup equipe-ffe-db.internal. on fdaa:0:bf2e::3: no such host

What have I done wrong?

Thanks
Jon

1 Like

You’re probably not doing anything wrong here-- we’re investigating an issue with .internal DNS resolution; most likely this is why you’re getting a “no such host” error for your app.

Check out our status page for updates on this issue:

Having exactly the same problem since late last night but deploying a freshly generated phoenix app using fly launch, it falls over at -

Error Failed attaching minted-phx-app-db to the Postgres cluster minted-phx-app: Get "http://minted-phx-app-db.internal:5500/commands/databases/minted-phx-app": dial: lookup minted-phx-app-db.internal. on fdaa:0:be8c::3: no such host.\nTry attaching manually with 'fly postgres attach --app minted-phx-app minted-phx-app-db'


tcg@runbsd minted-phx-app % fly postgres attach --app minted-phx-app minted-phx-app-db
Error Get "http://minted-phx-app-db.internal:5500/commands/databases/minted-phx-app": dial: lookup minted-phx-app-db.internal. on fdaa:0:be8c::3: no such host

It also seems that I can’t use an app name with underscores -

**?** **App Name (leave blank to use an auto-generated name):** example_name

Automatically selected personal organization: xxxxxx@xx.xx

**?** **Select region:** lhr (London, United Kingdom)

Error Validation failed: Name may only contain numbers, lowercase letters and dashes

But the elixir convention is an underscore -

**** (Mix) Application name must start with a letter and have only lowercase letters, numbers and underscore**

Thanks, new a newly created database the attach worked :+1:t2:

1 Like

Has this issue been resolved? The status page would suggest so, but I’m trying to deploy a fresh Redwood.js app and running into the same issue:

fly postgres attach --app promptcraft promptcraft-db
Error Get "http://promptcraft-db.internal:5500/commands/databases/promptcraft": dial: lookup promptcraft-db.internal. on fdaa:0:c075::3: no such host

Same. Trying to deploy a fresh Phoenix application. :frowning:

Still seeing this behavior in DFW

For what it’s worth we initially saw this in a CI process, where we attempt to connect an application server to a Postgres server immediately after spinning up both.

As a temporary workaround we’ve had better luck waiting a few minutes before attempting to connect.

I’m trying out fly.io for the first time to see if it’s a good fit for my project. I’m trying to create my first service and getting this error so not sure how I can proceed. This thread is two days old, is there any update? Is it normal for things to go down for days at a time here?

Same here mate, seems to be Fly service.
Usually works good, wait a few minutes / hours and give it a try.

Seems like it works now!

We are working on a delayed DNS issue that’s breaking flyctl when it tries to attach to a Postgres right after it’s provisioned. We’ll have a workaround soon, hopefully!

1 Like