Outage?

Is there an unreported outage happening right now? All I’m getting back from the CLI is:

Error failed retrieving app {toml file}: Could not resolve

(Have tried deploy, status, logs and open and no command is working)

Nope! Can you do flyctl apps list? Are you in the same directory as your fly.toml?

flyctl apps list

lists all my apps!

And yep I’m in the right directory. :thinking:

(Including one pending deployment which seems to have stalled)

Happy to take a look at this! Would you mind running one of the failing commands again with LOG_LEVEL=debug set? This will definitely help narrow down the problem space a bit.

You might also want to take a look at @greg’s post from a few days ago-- it’s an awesome overview of some good general troubleshooting steps for issues on our platform.

1 Like

Absolutely! And will take a look through that post as well :pray:

DEBUG Loaded flyctl config from/Users/david/.fly/config.yml
DEBUG determined hostname: "Davids-Mac-mini.local"
DEBUG determined working directory: "/Users/david/Code/carriage"
DEBUG determined user home directory: "/Users/david"
DEBUG determined config directory: "/Users/david/.fly"
DEBUG ensured config directory exists.
DEBUG ensured config directory perms.
DEBUG cache loaded.
DEBUG config initialized.
DEBUG initialized task manager.
DEBUG started querying for new release
DEBUG client initialized.
DEBUG no app config found at /Users/david/Code/carriage/fly.toml; skipped.
DEBUG --> POST https://api.fly.io/graphql {{"query":"query ($appName: String!) { app(name: $appName) { id name hostname deployed status version appUrl platformVersion currentRelease { evaluationId status inProgress version } config { definition } organization { id slug } services { description protocol internalPort ports { port handlers } } ipAddresses { nodes { id address type createdAt } } imageDetails { repository version } machines{ nodes { id name config state region createdAt app { name } ips { nodes { family kind ip maskSize } } host { id } } } postgresAppRole: role { name } } }","variables":{"appName":"fly-prod.toml"}}
}
DEBUG querying for release resulted to v0.0.325
DEBUG <-- 200 https://api.fly.io/graphql (888.62ms) {"data":{"app":null},"errors":[{"message":"Could not resolve ","locations":[{"line":1,"column":29}],"path":["app"],"extensions":{"code":"NOT_FOUND"}}]}
Error failed to get app: Could not resolve

Quick follow up:

❯ fly version update
Error no available update

❯ fly doctor
Testing authentication token... PASSED
Testing flyctl agent... PASSED
Testing local Docker instance... Nope
Pinging WireGuard gateway (give us a sec)... PASSED

Few thoughts from me, given that:

  1. Is there a fly.toml file in the folder you are running the fly commands from? Not entirely clear from your previous post, and if not, that would explain the issue: Fly needs to know an app name which it gets from that file or by using the --app app-name flag in the command

  2. Does your app have a valid name? The output of that prior command included fly-prod.toml ? Does it think that is your app name? Hmm. Check your fly.toml to see if it has a line like app = "app-name-here" and check that name is lowercase/alphanumeriic/hypens. URL-safe.

  3. Have you previously deployed this app successfully, at least once? If not, you need to run fly launch before you run e.g fly deploy. Else it won’t find it.

Yes there is and I’ve deployed that app hundreds of times before from that folder!

As a matter of fact it worked (from that same folder) just a few hours ago.

❯ ls
Dockerfile                       cover/                           lib/                             rel/
README.md                        deps/                            mix.exs                          scratch/
_build/                          elixir_buildpack.config          mix.lock                         screenshots/
assets/                          fly-prod.toml                    notebooks/                       tags
build.sh*                        fly-stg.toml                     phoenix_static_buildpack.config  test/
config/                          justfile                         priv/                            ~/

Unless my eyes deceive me … is there a fly.toml in there? :thinking:

If not/no longer, I think you need to say so e.g with fly deploy --config my-fly-toml.toml. So it knows what you now want to call it.

And if it does not have an app name in, you also need to make sure that is in the command too e.g

fly deploy --config my-fly-toml.toml --app app-name-here

It’s weird that you say it did work and has worked. Unless Fty have released a change to break something, which seems highly unlikely. It still seems to be something to do with resolving the app name and/or config. As if it was e.g a networking/UDP thing, your prior deploys would have failed too

Sorry! I’m specifying it with -a so I run

❯ fly status -a fly-prod.toml
Error failed to get app: Could not resolve 

That wasn’t clear from my earlier post.

Ah … no problem :slight_smile:

I think that explains it then. The Fly CLI is using the config file’s name as the app name. Hence the error. That’s not a valid app name: you want to instead do something like:

fly deploy --config fly-prod.toml --app app-name-here

Assuming your config file does not already have the app name in. If it does, you wouldn’t need to specify that :slight_smile: But if not, you do.

Does that fix it?

2 Likes

Omg you’re right. I just switched the command from fly -c fly-prod.toml to fly -a fly-prod.toml at some point earlier today in my head and have been lost ever since…

THANK YOU

(Note, you don’t seem to need both config and app name though if you only have one app configured in the conf file, so I do fly status -c fly-prod.toml and that works beautifully!

1 Like

You’re welcome :slight_smile:

1 Like

I do that mistake a lot. specially using -f fly.prod.yml instead of -c

dont know why -f for file… makes more sense for me lol.