cap-js / docs

CAP Documentation
https://cap.cloud.sap
Apache License 2.0
43 stars 82 forks source link

Not able to deploy bookshop sample with multi-tenancy to SAP BTP #382

Closed Hank1986 closed 8 months ago

Hank1986 commented 11 months ago

Hello Team,

When i am following the steps to create the bookshop sample application with multi-tenancy enabled, everything works perfect in my local. However, when i am try to deploy it to my BTP global account, i got the below error messages. Error messages from bookshop-mtx application image Error messages from bookshop-srv application image

Would you please help to figure out is there any step is missing from my side, or this is still not support by @sap/cds-mtxs?

Best Regards, Hank.

renejeglinsky commented 11 months ago

Hi @Hank1986,

from your second error, I created a fix in our samples repository as needed since June.

Do you use the latest @sap/cds-dk package? We found, that the command cds add hana --for production is missing in the multitenancy guide. Could you pls give that a try and see if that fixes your error?

All the best, René

Hank1986 commented 11 months ago

Hello Rene,

Actually, I setup my sample project with node18 and latest cds, cds-dk and npm. Please refer below screenshot for more details.

image

Best Regards, Hank.

Hank1986 commented 11 months ago

Hi @Hank1986,

from your second error, I created a fix in our samples repository as needed since June.

Do you use the latest @sap/cds-dk package? We found, that the command cds add hana --for production is missing in the multitenancy guide. Could you pls give that a try and see if that fixes your error?

All the best, René

Hello @renejeglinsky ,

After updated the script from 'cds run' to 'cds-serve' the application bookshop-srv started successful. However, the application bookshop-mtx still ran into the same error. Logs from application bookshop-srv.

image

Logs from application bookshop-mtx

image

Best Regards, Hank.

renejeglinsky commented 10 months ago

Hi @Hank1986 ,

did you execute cds add hana --for production in your project?

Hank1986 commented 10 months ago

Hi @Hank1986 ,

did you execute cds add hana --for production in your project?

Hi @renejeglinsky ,

Yes, the 'cds add hana --for production' was executed in my project. And below is the package.json file in my project.

image

Best Regards, Hank.

renejeglinsky commented 10 months ago

Hi Hank,

Did you use our bookshop from our cap samples? If so, the deployment of it is always challenging, due to the monorepo setup. In that case, please start with a fresh bookshop as described in the guide.

All the best, René

Hank1986 commented 10 months ago

Hi Hank,

Did you use our bookshop from our cap samples? If so, the deployment of it is always challenging, due to the monorepo setup. In that case, please start with a fresh bookshop as described in the guide.

All the best, René

Hi @renejeglinsky,

Yes, i use the bookshop from cap samples by following the steps which mentioned in document. Deploy as Multitenant SaaS Application https://cap.cloud.sap/docs/guides/deployment/as-saas#add-multitenancy.

The same error even i retried serval times from scratch.

Best Regards, Hank.

renejeglinsky commented 10 months ago

Hi @Hank1986 ,

I went through the steps today and encountered no issue. The only difference I could spot, is that your sidecar uses jwt-auth and mine jwt. I was using a trial account which is also different from your setup. Though I'm not really sure what causes your issue.

renejeglinsky commented 10 months ago

Hi @Hank1986 ,

In the meantime, did you succeed in running your app?

Hank1986 commented 10 months ago

Hi @Hank1986 ,

In the meantime, did you succeed in running your app?

Hi @renejeglinsky ,

Unfortunately, it's still not working to me. Not sure what's wrong here.

Best Regards, Hank.

renejeglinsky commented 8 months ago

Hi Hank,

would you want to give it another try with recent versions? Or should we close this issue? Probably it makes more sense to ask this question on the community and provide a link to your repo to be able to reproduce it.

renejeglinsky commented 8 months ago

I guess we won't find a solution here. I'm sorry. Therefore I'm closing this issue.