What to do if a route is already in use in the Pivotal Web Services
search cancel

What to do if a route is already in use in the Pivotal Web Services

book

Article ID: 294592

calendar_today

Updated On:

Products

Services Suite

Issue/Introduction

Symptoms:
A user pushes app-a from a different org or space and receives the following error message:
The route app-a.cfapps.io is already in use.


Environment


Cause

This is intended functionality and not a bug. A route does not get deleted with an application. So, it is possible to re-use a route after an application has been deleted within the same org or space. However, if an application is in different org or space, the route cannot be transferred and needs to be deleted via cf delete-route <DOMAIN> first and re-created by pushing an app via cf push <APP> from a different org or space.

Resolution

Do the following to resolve this issue:
  • If the route needs to be reused from the same org or space after the original application is deleted, no further action is required as the app will automatically re-use the route.
  • If the route needs to be re-used by an application in different org or space, the route needs to be deleted first in order to use with an application. Use cf delete-route cfapps.io -n <HOSTNAME> from the same org or space where it was originally created.
  • If the route does not need to be re-used, delete the existing route to free it up by using:
cf delete-route cfapps.io -n <HOSTNAME>