SAP-samples / hana-shine-xsa

SAP HANA Interactive Education for SAP HANA Extended Application Services, Advanced Model (SHINE for XS Advanced) is an education content to learn, develop, and deploy SAP HANA XS Advanced Model application and is a successor of SHINE for XS Classic.
Apache License 2.0
115 stars 111 forks source link

[shine-cf] Not able to deploy shine-core-db module #27

Closed sumitkanaujia12 closed 6 years ago

sumitkanaujia12 commented 6 years ago

While deploying on cloud foundry

API endpoint: https://api.cf.sap.hana.ondemand.com (API version: 2.99.0) User: i336704 Org: ServECWDF Space: playground

I have developer access there.

Getting following error while deploying.

2017-12-06T17:08:40.42+0530 [APP/PROC/WEB/0] OUT > node node_modules/@sap/hdi-deploy/deploy.js 2017-12-06T17:08:40.63+0530 [APP/PROC/WEB/0] ERR Error: service shine-container not found; either the service definition does not exist or it is not tagged with the tag "hana" 2017-12-06T17:08:40.63+0530 [APP/PROC/WEB/0] OUT (0s 121ms) 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! Linux 4.4.0-97-generic 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! argv "/home/vcap/deps/0/node/bin/node" "/home/vcap/deps/0/bin/npm" "start" 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! node v4.8.5 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! npm v2.15.11 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! code ELIFECYCLE 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! deploy@ start: node node_modules/@sap/hdi-deploy/deploy.js 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! Exit status 1 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! Failed at the deploy@ start script 'node node_modules/@sap/hdi-deploy/deploy.js'. 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! This is most likely a problem with the deploy package, 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! not with npm itself. 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! Tell the author that this fails on your system: 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! node node_modules/@sap/hdi-deploy/deploy.js 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! You can get information on how to open an issue for this project with: 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! npm bugs deploy 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! Or if that isn't available, you can get their info via: 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! npm owner ls deploy 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! There is likely additional logging output above. 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! Please include the following file with any support request: 2017-12-06T17:08:40.65+0530 [APP/PROC/WEB/0] ERR npm ERR! /home/vcap/app/npm-debug.log

kiruthikan commented 6 years ago

Hi,

Since yours is not a trial account, the hana plan name is different. This might be the cause of this iisue.

In the mta.yaml,refer the below segment:

  - name: shine-container
    type: com.sap.xs.hdi-container
    parameters:
      service: hanatrial
      service-plan: hdi-shared
    properties:
      container-name: ${service-name}

Change the name hanatrial to hana. Try building and redeploying SHINE after this change. Please let me know if it still doesnt work.

Thanks and Regards, Kiruthika

sumitkanaujia12 commented 6 years ago

Hi,

I'm using

sumitkanaujia12 commented 6 years ago

Should I use hana instead of managed-hana?

kiruthikan commented 6 years ago

Hi,

Yes. Please use hana instead.

Thanks and Regards, Kiruthika

sumitkanaujia12 commented 6 years ago

Hi,

Using

resources:

now i'm getting this while deploying

Creating service "shine-container"... Error creating services: Controller operation failed: 502 Bad Gateway: The service broker returned an invalid response for the request to https://hana-broker.cfapps.sap.hana.ondemand.com/v2/service_instances/ccad4841-c9b6-48a2-b5e2-835d6d88a827. Status Code: 500 Internal Server Error, Body: {"message":"No database mapped to organization '67466989-b69a-4523-a2b9-00a1c354d60a' space '4c4e00ea-04c2-46f4-8c96-6ea6fcba2547'"} Process error: Error creating services: Controller operation failed: 502 Bad Gateway: The service broker returned an invalid response for the request to https://hana-broker.cfapps.sap.hana.ondemand.com/v2/service_instances/ccad4841-c9b6-48a2-b5e2-835d6d88a827. Status Code: 500 Internal Server Error, Body: {"message":"No database mapped to organization '67466989-b69a-4523-a2b9-00a1c354d60a' space '4c4e00ea-04c2-46f4-8c96-6ea6fcba2547'"} Use "cf deploy -i 5842200 -a retry" to retry the process Use "cf deploy -i 5842200 -a abort" to abort the process Use "cf dmol -i 5842200" to download the logs of the process

kiruthikan commented 6 years ago

Hi,

Looks like your space does not have a hana database configured to it. Please contact your system administrator. Once you have a database configured to your org and space, you can deploy SHINE again.

P.S: You can also try deploying SHINE in the CF trial landscape.

Thanks and Regards, Kiruthika

sumitkanaujia12 commented 6 years ago

Hi,

Thanks for help. Contacted with system administrator. There are some problems with hana database setup. SHINE deploy is working fine on CF trial landscape

Thanks and Regards,, Sumit