cancel
Showing results for 
Search instead for 
Did you mean: 

Error while deploying multi tenant app

Lueberrueck
Explorer
0 Kudos

Hi everyone,

We are running into an error sometimes while deploying our CAP multi-tenant application.

Here is the error:

{"date":"Wed Jan 17 2024 08:06:01 GMT+0000 (Coordinated Universal Time)","error":{"status":500},"exception":true,"level":"error","logger":"sap-cloud-sdk-logger","message":"uncaughtException: Error getting tenant dabfc7d2-e7c5-4202-a927-31e1ed4f86ae: Could not find service offering with catalog_name eq 'hana'\nError: Error getting tenant dabfc7d2-e7c5-4202-a927-31e1ed4f86ae: Could not find service offering with catalog_name eq 'hana'\n
{"arrayBuffers":3117154,"external":5585874,"heapTotal":81076224,"heapUsed":57235352,"rss":151494656},"pid":253,"uid":2000,"version":"v18.18.2"},"stack":"Error: Error getting tenant dabfc7d2-e7c5-4202-a927-31e1ed4f86ae: Could not find service offering with catalog_name eq

This is our npm pipeline:

.npm:registry:
before_script:
- npm config set registry https://$CI_NPM_REGISTRY
- npm config set //$CI_NPM_REGISTRY:_auth $CI_NPM_AUTH
- npm config set //$CI_NPM_REGISTRY:email ${GITLAB_USER_EMAIL}
- npm config set //$CI_NPM_REGISTRY:always-auth true
- export CI_AUTH_REPOSITORY_URL="https://gitlab-ci-token:${CI_JOB_TOKEN}@apsv280.apsolut-s.local/${CI_PROJECT_PATH}.git"

.npm:variables:
before_script:
- export VERSION=$(cat package.json | jq -r .version)
- export NAME=$(cat package.json | jq -r .name | sed 's/@//' | sed 's/\//-/')

This is our CAP pipeline:

deploy:btp:
extends: .npm:variables
stage: deploy
image:
name: companyname/sapcap:latest
cache:
key: "${CI_JOB_NAME}"
policy: pull
paths:
- ./binaries
script:
- cf login -a $CI_CF_BTP_ENDPOINT_DEV -u $CI_BTP_USER_DEV -p $CI_BTP_PASSWORD_DEV -o $CI_CF_BTP_ORG_DEV -s $CI_CF_BTP_SPACE_DEV
- cf deploy ./binaries/$NAME.$VERSION.mtar -f --all-resources --retries 0
- cf dmol --mta $NAME --last 1 -d ./logs
artifacts:
paths:
- ./binaries
- ./logs
only:
- develop

Does anyone know where the problem is coming from and how we can fix it?

Important to know is, when we re-run our pipeline sometimes it works.

 
 

 

 

Ajit_K_Panda
Product and Topic Expert
Product and Topic Expert
0 Kudos
Were you able to solve this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Dinu
Contributor
0 Kudos

I suppose you are missing entitlement for "SAP HANA Schemas & HDI Containers". You can confirm this with the command `cf m -e hana`. If the command succeeds, this is not the case. If it fails, i.e. says no service offerings found, you can add entitlement to the subaccount from the cockpit for Global Account using the page Entitlements/Entity Assignments.  You need the plan named hdi-shared.

Lueberrueck
Explorer
0 Kudos
I forgot to say if we restart the pipeline it deploys fine, so it happens just sometimes
Dinu
Contributor
0 Kudos
Perhaps you can update your question with the details of the pipeline. If you are redeploying the application, the issue is definitely not of missing entitlement. If you are setting up the environment in the pipeline, perhaps the environment setup is not completed before the deployment step.
Lueberrueck
Explorer
0 Kudos
Updated 😄