Skip to Content
Dec 28, 2021 at 01:40 PM

cds deploy fails with "service instance already exists" message



I try to deploy my CAP project using cds deploy command. Here is my log:

cds deploy --to hana
Debugger attached.
[cds.deploy] - Starting deploy to SAP HANA ...

[cds.deploy] - Creating build tasks
[cds.deploy] - Running build

[cds.deploy] - Using container payops_api-db-hdi-container

[cds.deploy] - Running 'cf create-service hana hdi-shared payops_api-db-hdi-container' with options {}

Creating service "payops_api-db-hdi-container"...
FAILED: Asynchronous job 'Creating service instance 'payops_api-db-hdi-container' [service: 'hana', plan:'hdi-shared'] of [Org 'booking', Space 'DEV'].' failed: service instance 'payops_api-db-hdi-container' [service: 'hana', plan:'hdi-shared'] of [Org 'booking', Space 'DEV'] with same name already exists.
[ERROR] [cds.deploy] - Create request failed
From what I see :we have a method _getOrCreateCFService like this:


however there is no fallback scenario so it's not really true that it tries to get or create - it always tries to create and if it already exists - just fails.

Could you please have a look? I'm just following this guide actually

Thank you!


image.png (105.4 kB)