Getting error: input:3: createAddOn Validation failed: Name has already been taken

Hey guys I am facing the same situation as a lot of others around here.
Can someone provide a solution with that?

Having the same problem. I created a Rails app in the wrong org, deleted it, and then tried again with the right org, and am getting the error:
```
Running: bin/rails generate dockerfile --label=fly_launch_runtime:rails --skip --redis --tigris --litestream
Fetching gem metadata from https://rubygems.org/…
Resolving dependencies…
skip Dockerfile
identical .dockerignore
identical bin/docker-entrypoint
identical config/database.yml
create lib/tasks/litestream.rake
create config/dockerfile.yml
unchanged config/storage.yml
unchanged config/environments/production.yml
Error: input:3:2: createAddOn Validation failed: Name has already been taken
```

This is really frustraging, and a terrible first time experience. The worst part is I have no idea which addon it was trying to create that failed on a naming collision. The second worst part is this should be caught and handled by the fly CLI.

The first post here from @stergios is so brief it is unanswerable.

The more recent post from you @galtzo is a bit better, but it may help readers to take a step back and explain what you are doing. Readers cannot see your screen or your project, and I wonder if here there is an assumption that we know what you’re trying to accomplish.

Are you using GitHub to auto-deploy? You mention the fly console command; if you are using that to do something, may we see the command you’re using?

(Your Markdown hasn’t worked in your post; I wonder if the triple-backtick code-fence needs a blank preceding line to render correctly. FYI, this forum supports post editing).

I generated a new Rails project, following the guide here:

Then I ran fly launch. I misread the initial question about tweaking settings and hit N instead if Y. I let it run for awhile, but it seemed stuck on a docker command, so I ctrl-C canceled the command. Then I deleted the app on my fly web dashboard. I reset some of the files that were created / changed, but not all.
Then I ran fly launch again, this time setting things up how I wanted them. It failed to launch due to a timeout.

I deleted this second app from my fly web dashboard. I reset all the files that were changed or created by fly launch in my local.

I ran fly launch a third time, reusing the same app name as the previously deleted app, and got the error above.

I reset my local changes again, and deleted the third app from my fly web dashboard.

I then ran fly launch a fourth time, using a new app name, and a custom tigris bucket name, and it finally launched without errors, and is now live.

Ah, much better; thank you. So, to clarify, is there no longer a problem? Your earlier post sounded like you were still stuck.

I think the logs you posted earlier show the invocations of a Fly-based launcher that tries to inspect your project and make guesses about what it needs for deployment. From this forum, it sounds like it does a good job for most users, but I’ve not tried it. For my projects, I write a Dockerfile and a fly.toml, and it just works, with no guessing.

I think the issue here is that names (app, redis db, tigris bucket) are unique across the platform, and the generated names are already in use for some reason, which Fly Launch doesn’t handle properly.

@rubys can you look at this?

My assumption is that you deleted the app, but perhaps not the redis db and/or tigris bucket. And then when you tried again with the same app name it failed as the redis and/or tigris bucket already exists. I’d encourage you to use the dashboard and look to see if there are things you need to remove.

As to the error, your original post makes it look like this error occurred during the processing of generating a Dockerfile, which puzzles me, to my knowledge that that generator doesn’t actually create databases and buckets. What command were you running at the time? fly launch?

1 Like

It looks like it is redis:

A name is generated (by appending -redis IIRC), and if that name is taken, there is no check or retry, it just fails.

That sounds like it fits what I experienced. Yes, the command was fly launch. Yes, I have it working now, because I started over entirely with a new name. I expect the old name still has crusty things floating around that should be reaped.

My assumption is that you deleted the app, but perhaps not the redis db and/or tigris bucket. And then when you tried again with the same app name it failed as the redis and/or tigris bucket already exists. I’d encourage you to use the dashboard and look to see if there are things you need to remove.

Maybe there is a cycle time involved, where I can’t reuse the same name for a few minutes while the old provisions get destroyed? Apparently they never would have been destroyed without manual intervention.

Just checked, and indeed I do have old crufty stuff from those failed attempts still sitting around. I would have expected the app deletion to kill them as well.

Things that did not get cleaned up:

  • Tigris - I was able to destroy the zombie instance via the web dashboard
  • Redis Upstash - I see no way to destroy the zombie instance via the web dashboard

So that’s frustrating. I guess I need to carve out time to learn how to do it via the CLI. I really don’t want Fly to be like AWS :frowning:

1 Like

Thinking about this more. Was my expectation wrong that the resources linked to the app would be destroyed with it? I believe I was led to this impression by language in the current UX when destroying an app, but I could be wrong, and don’t want to spin up another to destroy.