Below is the error on cf push
:
org.cloudfoundry.client.v2.ClientV2Exception: CF-InvalidRelation(1002): The app cannot be mapped to this route because the route is not in this space. Apps must be mapped to routes in the same space.
Below is the manifest file:
applications:
- name: xyz-api
instances: 1
memory: 1G
buildpack: java_buildpack_offline
path: target/xyz-api-0.1-SNAPSHOT.jar
cf login x.y.z.w.org.cloud ....
cf push xyz-api -p target/xyz-api-0.1-SNAPSHOT.jar
We have two API end points:
a.b.c.d.org.cloud
x.y.z.w.org.cloud
As per investigation, we realised that the route name already exist on a.b.c.d.org.cloud
because our source code is hardcoding the same route name for on any API end point.
Can't same route name be used for multiple API end points? why?