cli: I am confused why I cannot see a route that I'm told is unavailable.
Using cf version 6.20.0+25b1961-2016-06-29
What Happens
So I try to push an app:
cf push example-app
And I am told I can’t, because the route is taken:
Using route example-app.local.pcfdev.io
Binding example-app.local.pcfdev.io to app_using_angular...
FAILED
The route example-app.local.pcfdev.io is already in use.
TIP: Change the hostname with -n HOSTNAME or use --random-route to generate a new route and then push again.
Huh, that’s weird. Just a few minutes ago I’d used cf delete example-app to clear the way.
Let me just check!
$ cf routes
Getting routes for org pivotal / space integration as admin ...
space host domain port path type apps service
No routes found
Um … what? Where’s the route?
After some searching, it turns out that the route is in another organization. I can’t see that route from where I am. I just keep getting told “no, you can’t use it”. On a scale from 1 to “Jacquesrant”, this rates increasingly higher on each iteration.
Luckily one of my colleagues has seen this before and does this:
$ cf target
API endpoint: https://api.local.pcfdev.io (API version: 2.58.0)
User: admin
Org: org-which-does-not-contain-the-route-but-is-nevertheless-blocked-from-acquiring-it
Space: a-space
And then does this:
$ cf target -o org-which-happens-to-be-holding-on-the-route
API endpoint: https://api.local.pcfdev.io (API version: 2.58.0)
User: admin
Org: org-which-happens-to-be-holding-on-the-route
Space: another-space
And then:
$ cf delete-orphaned-routes
Really delete orphaned routes?>> y
Getting routes as admin ...
Deleting route example-app.local.pcfdev.io...
OK
And now we’re clear to reuse example-app.
What I Wish Had Happened:
Using route example-app.local.pcfdev.io
Binding example-app.local.pcfdev.io to app_using_angular...
FAILED
The route example-app.local.pcfdev.io is not available for binding because it has been used by another organization.
TIP: Change the hostname with -n HOSTNAME or use --random-route to generate a new route and then push again.
The change is to say that the route was taken by a different org.
While it would be convenient to know which org is holding the route, this would leave folk open to enumeration attacks intended to find who owns what routes.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 21 (1 by maintainers)
I think it’s because example-app has already used by other account of another person. You need to choose another name likecf push example-app123.
It might or might not be in use in another space. This command doesn’t reveal that to make it harder to enumerate routes across the whole CF instance. Slightly annoying, but the root cause here is that malicious people kinda ruin it for everyone.
For everyone else on this thread, @jchesterpivotal and I had an offline conversation. I’ve captured an alternative error message in the story and will work with @zrob, the incoming CAPI PM, on the exact wording.
Because I’m not a CLI developer. I have a fuzzy model of how CF works. I might, for example, expect to be told which space or org it belonged to.
But mostly because I am lazy, in both the negative sense and positive sense. I hate thinking, I reserve it for leisure activities.