cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Error while deploying multi tenant app

Lueberrueck
Explorer
0 Likes
1,945

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.

 
 

 

 

View Entire Topic
Lueberrueck
Explorer
0 Likes

Yes, we solved it with this addition in package.json

 

"db": {
        "[production]": {
          "kind": "hana",
          "vcap": {
            "label": "sm",
            "plan": "container"
          }
        },