Skip to Content
1
Apr 28, 2021 at 11:32 AM

CAP: CDS deploy can't create service key

575 Views

Hi colleagues,

i follow the WIKI of deploy my service to SAP HANA with CAP.

After i execute cds deploy --to hana:bookstore-hana.

i get the error

[ERROR] [cds.deploy] - Could not create service key bookstore-hana-key. at HanaDeployer._validateServiceKey (C:\Users\D070248\AppData\Roaming\npm\node_modules\@sap\cds-dk\node_modules\@sap\cds\bin\deploy\to-hana\hana.js:146:13) at HanaDeployer._getOrCreateCFService (C:\Users\D070248\AppData\Roaming\npm\node_modules\@sap\cds-dk\node_modules\@sap\cds\bin\deploy\to-hana\hana.js:115:10) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async HanaDeployer.deploy (C:\Users\D070248\AppData\Roaming\npm\node_modules\@sap\cds-dk\node_modules\@sap\cds\bin\deploy\to-hana\hana.js:55:11) at async Object.deploy (C:\Users\D070248\AppData\Roaming\npm\node_modules\@sap\cds-dk\bin\deploy\index.js:83:5)

But in the above the CF to create service key response is:

Creating service key bookstore-hana-key for service instance bookstore-hana as wenhao.wang@sap.com... REQUEST: [2021-04-28T13:17:55+02:00] POST /v2/service_keys HTTP/1.1 Host: api.cf.sap.hana.ondemand.com Accept: application/json Authorization: [PRIVATE DATA HIDDEN] Content-Type: application/json User-Agent: go-cli 6.36.1+e3799ad7e.2018-04-04 / windows {"name":"bookstore-hana-key","service_instance_guid":"5648a880-5ad4-41d7-865f-0de4a60cc221","parameters":{"permissions":"development"}} RESPONSE: [2021-04-28T13:17:57+02:00] HTTP/1.1 201 Created Connection: close Content-Length: 2783 Content-Type: application/json;charset=utf-8 Date: Wed, 28 Apr 2021 11:17:57 GMT Location: /v2/service_keys/a2d2c50a-08a8-410a-85dd-9624890d5a0d Server: nginx Strict-Transport-Security: max-age=31536000; includeSubDomains; preload; X-Content-Type-Options: nosniff X-Ratelimit-Limit: 40000 X-Ratelimit-Remaining: 39894 X-Ratelimit-Reset: 1619611633 X-Vcap-Request-Id: 60aa5c4b-541e-4b4b-4540-463fe89df94f::a35c6e2c-f849-4f7d-ad73-204774607625 { "metadata": { "guid": "a2d2c50a-08a8-410a-85dd-9624890d5a0d", "url": "/v2/service_keys/a2d2c50a-08a8-410a-85dd-9624890d5a0d", "created_at": "2021-04-28T11:17:57Z", "updated_at": "2021-04-28T11:17:57Z" }, "entity": { "name": "bookstore-hana-key", "service_instance_guid": "5648a880-5ad4-41d7-865f-0de4a60cc221", "credentials": { "host": "zeus.hana.canary.eu-central-1.whitney.dbaas.ondemand.com", "port": "44536", "driver": "com.sap.db.jdbc.Driver", "url": "jdbc:sap://zeus.hana.canary.eu-central-1.whitney.dbaas.ondemand.com:44536?encrypt=true&validateCertificate=true¤tschema=72021B6B192A42BE838529668EBF9635", "schema": "72021B6B192A42BE838529668EBF9635", "hdi_user": "72021B6B192A42BE838529668EBF9635_BPIS3LKVLN2T8AZ8M5XBALE8S_DT", "hdi_password":"[PRIVATE DATA HIDDEN]", "user": "72021B6B192A42BE838529668EBF9635_BPIS3LKVLN2T8AZ8M5XBALE8S_RT", "password":"[PRIVATE DATA HIDDEN]", "certificate": "-----BEGIN CERTIFICATE-----\nMIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBh\nMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3\nd3cuZGlnaWNlcnQuY29tMSAwHgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBD\nQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAwMDAwMDBaMGExCzAJBgNVBAYTAlVT\nMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5j\nb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsB\nCSDMAZOnTjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97\nnh6Vfe63SKMI2tavegw5BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt\n43C/dxC//AH2hdmoRBBYMql1GNXRor5H4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7P\nT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y7vrTC0LUq7dBMtoM1O/4\ngdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQABo2MwYTAO\nBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbR\nTLtm8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUw\nDQYJKoZIhvcNAQEFBQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/Esr\nhMAtudXH/vTBH1jLuG2cenTnmCmrEbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg\n06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIttep3Sp+dWOIrWcBAI+0tKIJF\nPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886UAb3LujEV0ls\nYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk\nCAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4=\n-----END CERTIFICATE-----\n" }, "service_instance_url": "/v2/service_instances/5648a880-5ad4-41d7-865f-0de4a60cc221", "service_key_parameters_url": "/v2/service_keys/a2d2c50a-08a8-410a-85dd-9624890d5a0d/parameters" } } OK

But when i check the service instance the service key is created successful there.

Because the error the framework can't generate default-env.json and i can't continue.

Did anyone know why the service instance & service key is created successful but framework shows error?

I'm not use the trial account.

Thanks and Regards,

Wenhao