cancel
Showing results for 
Search instead for 
Did you mean: 

CAP Multitenancy

neilprince
Participant

Hi All

I have been fighting with CAP multitenancy on and off for a couple of weeks now so was glad to see Andrew Lunde's blog on the subject ( https://blogs.sap.com/2020/08/20/getting-your-head-into-cloud-application-programming-model-multiten...). However, after working through this a number of times in productive and trial landscapes, I still do not have a working MT app. To add to the frustration, I am not getting any information in the logs at all for the subscription process so I have no clues as to what is missing.

The log only contains repeats of this every 10 seconds:

   2020-08-31T11:22:58.73+0000 [APP/PROC/WEB/0] OUT [DEBUG][UPDATE_EVENTS] Running tenant update check
   2020-08-31T11:22:58.73+0000 [APP/PROC/WEB/0] OUT [DEBUG][SIDECAR_DATA_HDI_ADAPTOR] Domain is: __default__
   2020-08-31T11:23:04.28+0000 [APP/PROC/WEB/0] OUT [DEBUG][TENANT_DATA_HDI_ADAPTOR] No __META__ tenant accessible yet (this might be ok): Error: 0 items found when querying service_offerings with {"fieldQuery":"catalog_name eq 'hana'"}

which according to this question is simply due to the #NODE_DEBUG: 'instance-manager' line in the mta.yaml.

The symptom I am having is that when pressing the subscribe button, the subscription process starts and runs for 5 to 10 secs and then just stops with the subscribe button becoming available again. This just repeats every time I press the subscribe button

I have been watching the logs with the cf logs capmt-srv command, but nothing appears during the subscription process.

The only indication that there is something wrong is if I execute the link of the application in the provider subaccount. When clicking on catalogs, I receive the following:

The 'SAP Guided Answers' for this message suggest the following:

Three are very obvious and easy to check which leaves the TENANT_HOST_PATTERN. It looks ok to me and has not been altered in any way. The whole project has simply been cloned, built and deployed as per the blog (in the US10 trial landscape).

I'm running out of ideas as to what is going wrong, but I am getting the same from Andrew's application and on my own CAP bookshop application I built prior to the blog.

Probably something really basic, but it is escaping me right now.

Thanks

Neil

CompliantERP

Accepted Solutions (0)

Answers (2)

Answers (2)

andrew_lunde
Product and Topic Expert
Product and Topic Expert

This isn't really an error, just overly jealous logging as far as I can tell.

andrew_lunde
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hey Neil,

Thanks for the comments on my post. I'm glad you're finding it useful, but let's figure out what's going wrong. From the description above, try double checking that the oauth section of your uaa resource is the same domain as your app. Seems like a redirection issue.

# oauth2-configuration: # redirect-uris: # - "http*://*.cfapps.us10.hana.ondemand.com/**"-Andrew
neilprince
Participant
0 Kudos

Hi Andrew

Thanks for your quick response. In this case, as I'm using the trial and your git repo, it is unchanged. Code is as follows:

         oauth2-configuration:
            redirect-uris: 
             - "http*://*.cfapps.us10.hana.ondemand.com/**"

Thanks

Neil

andrew_lunde
Product and Topic Expert
Product and Topic Expert
0 Kudos

Where is your trial account located? I.E. Which landscape(us10, us20, eu10, etc.). Check the subaccount details page of where you're deploying your project.

-Andrew

neilprince
Participant
0 Kudos

Hi Andrew

Trial account is in us10:

Neil

former_member729399
Discoverer
0 Kudos

Hey Neil, I'm facing the same issue. Did you resolve this?

christoffer_fuss
Participant
0 Kudos

I am getting the same error if I deploy he applicaton to HANA Cloud Service. If I use the SAP HANA Service it is working fine.....
So what must be changed, that the example application is working in multitenant mode on SAP Hana Cloud service?
Best regards,

Chris

neilprince
Participant
0 Kudos

Hi Chaitanya and Christoffer

What are your respective space names that you are trying to deploy to?

Regards

Neil

christoffer_fuss
Participant
0 Kudos

Hi Neil,

Thanks for helping. The space of the providing subaccount, where the SAP HANA Service is active and it is working, has the name:
datatrain

The space of the providing subaccount, where the SAP HANA CLOUD Service is active and it is not working, has the same name:
datatrain.
So the spacename cant be the problem....any other ideas?

Best regards,

Chris

neilprince
Participant
0 Kudos

Hi Chris

So I am assuming you are pressing subscribe for your HANA cloud app and it is simply failing with no errors returned? If so, can you look at the SaaS subscription API https://saas-manager.cfapps.ap10.hana.ondemand.com/saas-manager/v1/application/subscriptions to get some more information and post the result? You will need an access token using the SaaS client id and secret.

Also, what is your tenant host pattern?

Regards

Neil

christoffer_fuss
Participant
0 Kudos

Hi Neil,

the error is the same as shwon above:

Error:0 items foundwhen querying service_offerings with{"fieldQuery":"catalog_name eq 'hana'"}

Best Regards,

Chris

OliverKlemenz
Advisor
Advisor
0 Kudos

It looks as if HANA Cloud Trial is stopped every night. In my case it did not work because of this. After starting the HANA Cloud trial instance, I could subscribe successfully...

christoffer_fuss
Participant

Hi Oliver,

I am using my own HANA Cloud Service which is ruuning 24/7. Can you please check (or maybe marcbecker can )if you can subscribe the sample application to an provider account with SAP HANA Cloud Service? With SAP HANA Service it is working for me but the same code is not working for the new HANA Cloud service. I get the error:

Error:0 items foundwhen querying service_offerings with{"fieldQuery":"catalog_name eq 'hana'"}

Best Regards,

Chris