cancel
Showing results for 
Search instead for 
Did you mean: 

Error executing cds deploy -2 hana

smok1
Explorer
0 Kudos

Hi guys,

Getting this error below:

Deployment to container 3D21BCD66332474D81841A3C51CB6E7E failed - error: Could not connect to any host: [ 9357d90a-4543-497a-a574-d15c2a223feb.hana.trial-us10.hanacloud.ondemand.com:443 - certificate has expired ] [Deployment ID: none]. Error: Could not connect to any host: [ 9357d90a-4543-497a-a574-d15c2a223feb.hana.trial-us10.hanacloud.ondemand.com:443 - certificate has expired ]

What's wrong here?

simon_oswald
Explorer
0 Kudos

Hi Samuel,

Which version of @sap/hdi-deploy are you using? There should be a line like this in the deployment log:

@sap/hdi-deploy, version 3.7.0 (mode default), server version unknown (0.0.0.0), node version 10.15.0

Best Regards,

Simon

Accepted Solutions (0)

Answers (6)

Answers (6)

former_member13323
Participant

simon.oswald

Got this working in BAS now after using the CF: Bind service to a locally run application option.

However, can't seem to get it working in VS Code, as there's always a time out error when clicking on any entity:

GET /admin/Authors
[2020-11-12T04:57:38.154Z | ERROR | 1370873]: ResourceRequest timed out
[2020-11-12T04:57:38.156Z | ERROR | 1370873]: Error stacktrace: TimeoutError: ResourceRequest timed out     at ResourceRequest._fireTimeout (C:\Users\Sam\Desktop\Development\Playground\CAP\OpenSAP\Exercises\projects\cloud-cap-samples\packages\bookshop\node_modules\@sap\cds-foss\node_modules\generic-pool\lib\ResourceRequest.js:62:17)     at Timeout.bound (C:\Users\Sam\Desktop\Development\Playground\CAP\OpenSAP\Exercises\projects\cloud-cap-samples\packages\bookshop\node_modules\@sap\cds-foss\node_modules\generic-pool\lib\ResourceRequest.js:8:15)     at listOnTimeout (internal/timers.js:531:17)     at processTimers (internal/timers.js:475:7)

I've pasted the default-env.json file generated in BAS to VS Studio. Credentials are all similar. Only thing that VS Code has additionally is the sap hana client package : "@sap/hana-client": "^2.6.61".

SAP CommonCryptoLib, environment variables has all been configured to this point.

Any ideas?

former_member13323
Participant
0 Kudos

simon.oswald Thanks for that.

I've set my package.json to the following now. The key to get it working was like you said the deploy-format and also the "hdi" syntax"

  "cds": {
    "hana": {
      "deploy-format": "hdbtable",
      "syntax": "hdi"
    },
    "requires": {
      "db": {
        "kind": "sqlite",
        "credentials": {
          "database": "bookshop.db"
        },
        "[production]": {
          "kind": "hana",
          "model": [
            "db/",
            "srv/",
            "app/",
            "schema",
            "services",
            []
          ]
        }
      }
    }
  }

However I still get the following error after i forced "kind" to be "hana" to force it to run in hana and clicking anywhere in the odata service.

[cds] - using bindings from: { registry: '/home/user/.cds-services.json' } [cds] - model loaded from 9 file(s): db/schema.cds srv/admin-service.cds srv/cat-service.cds app/index.cds ../../node_modules/@sap/cds/common.cds app/admin/fiori-service.cds app/browse/fiori-service.cds app/orders/fiori-service.cds app/common.cds [cds] - connect to db { 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-----', driver: 'com.sap.db.jdbc.Driver', hdi_password: 'Nq1PgaHR7jBru0zUrt.BZfOp96sWSy00.7UriR.7lUfVyM8MBsJeqhfN65qPY4yETq4Znmwft4Z13oFf7kTutrI7mtlsrnp6225EtasgknGlHLQaMvp5h5mc0tQ960yY', hdi_user: '8B6D97009A9D41EFB84DC8A6B7A9ECC0_AMA36KTNAIBD0JFCDTDMQQA1Q_DT', host: '6cfc43c4-45d0-4e96-94ad-a04ee4092aa4.hana.trial-us10.hanacloud.ondemand.com', password: 'Pq9AnOUKLFllTrKqqRd073dCLWtRCB7KN.SBaSVu4TmcU5uAwCoMOQ81Gw4ZAt6lReWhW_C9LuMs3vmzer0f1ElWwcONDY9BzA-ArSvi-scWLykc3rT8vNFHAnmdR9RC', port: '443', schema: '8B6D97009A9D41EFB84DC8A6B7A9ECC0', url: 'jdbc:sap://6cfc43c4-45d0-4e96-94ad-a04ee4092aa4.hana.trial-us10.hanacloud.ondemand.com:443?encrypt=true&validateCertificate=true¤tschema=8B6D97009A9D41EFB84DC8A6B7A9ECC0', user: '8B6D97009A9D41EFB84DC8A6B7A9ECC0_AMA36KTNAIBD0JFCDTDMQQA1Q_RT', ca: '-----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-----' } [cds] - serving AdminService { at: '/admin', impl: 'srv/admin-service.js' } [cds] - serving CatalogService { at: '/browse', impl: 'srv/cat-service.js' } [cds] - launched in: 1207.044ms [cds] - server listening on { url: 'http://localhost:4004' } [ terminate with ^C ] GET /admin/Authors [2020-11-11T07:53:49.940Z | ERROR | 1350261]: Could not connect to any host: [ 6cfc43c4-45d0-4e96-94ad-a04ee4092aa4.hana.trial-us10.hanacloud.ondemand.com:443 - certificate has expired ] [ERROR] Could not connect to any host: [ 6cfc43c4-45d0-4e96-94ad-a04ee4092aa4.hana.trial-us10.hanacloud.ondemand.com:443 - certificate has expired ] at couldNotOpenConnectionError (/home/user/projects/cloud-cap-samples/node_modules/hdb/lib/protocol/ConnectionManager.js:115:13) at tryConnect (/home/user/projects/cloud-cap-samples/node_modules/hdb/lib/protocol/ConnectionManager.js:35:17) at /home/user/projects/cloud-cap-samples/node_modules/hdb/lib/protocol/ConnectionManager.js:42:9 at TLSSocket.onerror (/home/user/projects/cloud-cap-samples/node_modules/hdb/lib/protocol/Connection.js:175:5) at Object.onceWrapper (events.js:286:20) at TLSSocket.emit (events.js:198:13) at emitErrorNT (internal/streams/destroy.js:91:8) at emitErrorAndCloseNT (internal/streams/destroy.js:59:3) at process._tickCallback (internal/process/next_tick.js:63:19)

Another question would be setting the environment variable CDS_ENV=production cds watch - does not seem to force run it in production?

simon_oswald
Explorer
0 Kudos

Hi Samuel,

Now that you are using an up-to-date deployer version that can connect to HANA Cloud, you will also need to adapt your build configuration a bit, as HANA Cloud doesn't support .hdbcds.


You can find some more details here: https://cap.cloud.sap/docs/guides/databases#hana-cloud

In short, add this to the package.json:

{"cds":{"hana":{"deploy-format":"hdbtable"}}}

Best Regards,
Simon

former_member13323
Participant
0 Kudos

simon.oswald

I've updated it to 3.11.15 and I'm getting a new error:

@sap/hdi-deploy, version 3.11.15 (mode default), server version 4.00.000.00.1603188509 (4.0.0.0), node version 10.22.1, HDI version 1004, container API version 1003

Here are the new logs of the failed deployment:

[cds.deploy] - Writing /home/user/projects/cloud-cap-samples/packages/bookshop/gen/db/default-env.json [cds.deploy] - Writing /home/user/projects/cloud-cap-samples/packages/bookshop/default-env.json [cds.deploy] - Writing /home/user/projects/cloud-cap-samples/packages/bookshop/package.json [cds.deploy] - Deploying to HANA from /home/user/projects/cloud-cap-samples/packages/bookshop/gen/db [cds.deploy] - Using HDI deployer from /home/user/projects/cloud-cap-samples/node_modules/@sap/hdi-deploy/library.js @sap/hdi-deploy, version 3.11.15 (mode default), server version 4.00.000.00.1603188509 (4.0.0.0), node version 10.22.1, HDI version 1004, container API version 1003 Using default environment variables from file "default-env.json" No ignore file at /home/user/projects/cloud-cap-samples/packages/bookshop/gen/db/.hdiignore. Collecting files... Collecting files... ok (0s 10ms) 3 directories collected 54 files collected 0 reusable modules collected Target service: bookshop-db-hdi-container Session variable APPLICATION is set to "SAP_HDI//". Previous build with request ID 13 finished at 2020-11-10 13:31:28.169369000 with status Finished and message: Make failed (5 errors, 11 warnings): tried to deploy 54 files, undeploy 0 files, redeploy 0 dependent files. Processing revoke files... Processing revoke files... ok (0s 0ms) Processing grants files... Processing grants files... ok (0s 0ms) Preprocessing files... Preprocessing files... ok (0s 0ms) Connecting to the container "8B6D97009A9D41EFB84DC8A6B7A9ECC0"... Connecting to the container "8B6D97009A9D41EFB84DC8A6B7A9ECC0"... ok (0s 79ms) Locking the container "8B6D97009A9D41EFB84DC8A6B7A9ECC0"... Locking the container "8B6D97009A9D41EFB84DC8A6B7A9ECC0"... ok (0s 148ms) Synchronizing files with the container "8B6D97009A9D41EFB84DC8A6B7A9ECC0"... Deleting files... Deleting files... ok Writing files... Writing files... ok Synchronizing files with the container "8B6D97009A9D41EFB84DC8A6B7A9ECC0"... ok (0s 609ms) 54 modified or added files are scheduled for deploy based on delta detection 0 deleted files are scheduled for undeploy based on delta detection (filtered by undeploy whitelist) 0 files are scheduled for deploy based on explicit specification 0 files are scheduled for undeploy based on explicit specification Deploying to the container "8B6D97009A9D41EFB84DC8A6B7A9ECC0"... Polling messages for request id: 18 Starting make in the container "8B6D97009A9D41EFB84DC8A6B7A9ECC0" with 54 files to deploy, 0 files to undeploy... Disabling table replication for the container schema "8B6D97009A9D41EFB84DC8A6B7A9ECC0"... Disabling table replication for the container schema "8B6D97009A9D41EFB84DC8A6B7A9ECC0"... ok (0s 74ms) Migrating libraries... Migrating libraries... ok (0s 7ms) Making... Preparing... Preparing the make transaction... Deploying the configuration file "src/gen/.hdiconfig"... Warning: Could not find a configured library that contains the "com.sap.hana.di.afllangprocedure" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Warning: Could not find a configured library that contains the "com.sap.hana.di.cds" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Warning: Could not find a configured library that contains the "com.sap.hana.di.collection" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Warning: Could not find a configured library that contains the "com.sap.hana.di.fulltextindex" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Warning: Could not find a configured library that contains the "com.sap.hana.di.textconfig" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Warning: Could not find a configured library that contains the "com.sap.hana.di.textdictionary" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Warning: Could not find a configured library that contains the "com.sap.hana.di.textminingconfig" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Warning: Could not find a configured library that contains the "com.sap.hana.di.textrule" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Warning: Could not find a configured library that contains the "com.sap.hana.di.textrule.include" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Warning: Could not find a configured library that contains the "com.sap.hana.di.textrule.lexicon" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Warning: Could not find a configured library that contains the "com.sap.hana.di.virtualfunctionpackage.hadoop" build plugin [8211539] at "src/gen/.hdiconfig" (0:0) Deploying the configuration file "src/gen/.hdiconfig"... ok (0s 8ms) Deploying the namespace file "src/gen/.hdinamespace"... Deploying the namespace file "src/gen/.hdinamespace"... ok (0s 6ms) Adding "src/gen/ADMINSERVICE_AUTHORS.hdbcds" for deploy... Error: "src/gen/ADMINSERVICE_AUTHORS.hdbcds": could not create a compile unit for the file [8211714] at "src/gen/ADMINSERVICE_AUTHORS.hdbcds" (0:0) Error: Could not find the "com.sap.hana.di.cds" build plugin [8210501] Error: Adding "src/gen/ADMINSERVICE_AUTHORS.hdbcds" for deploy... failed [8211700] Error: Preparing... failed [8211602] Preparing the make transaction... ok (0s 90ms) Make failed (5 errors, 11 warnings): tried to deploy 54 files, undeploy 0 files, redeploy 0 dependent files Error: Making... failed [8211605] Error: Starting make in the container "8B6D97009A9D41EFB84DC8A6B7A9ECC0" with 54 files to deploy, 0 files to undeploy... failed [8214168] Deployment to container 8B6D97009A9D41EFB84DC8A6B7A9ECC0 failed - error: HDI make failed [Deployment ID: none]. Error: HDI make failed (2s 364ms) [ERROR] [cds.deploy] - HDI deployment failed with exit code 1 at hdiDeployLib.deploy (/home/user/projects/cloud-cap-samples/node_modules/@sap/cds/bin/deploy/to-hana/hdiDeployUtil.js:92:35) at ChildProcess.<anonymous> (/home/user/projects/cloud-cap-samples/node_modules/@sap/hdi-deploy/library.js:101:14) at ChildProcess.emit (events.js:198:13) at maybeClose (internal/child_process.js:982:16) at Socket.stream.socket.on (internal/child_process.js:389:11) at Socket.emit (events.js:198:13) at Pipe._handle.close (net.js:607:12)

former_member13323
Participant
0 Kudos

So I've deleted the SAP HANA Cloud instance and re-created a new one..still no dice:

Connecting to the container "8B6D97009A9D41EFB84DC8A6B7A9ECC0"... Deployment to container 8B6D97009A9D41EFB84DC8A6B7A9ECC0 failed - error: Could not connect to any host: [ 6cfc43c4-45d0-4e96-94ad-a04ee4092aa4.hana.trial-us10.hanacloud.ondemand.com:443 - certificate has expired ] [Deployment ID: none]. Error: Could not connect to any host: [ 6cfc43c4-45d0-4e96-94ad-a04ee4092aa4.hana.trial-us10.hanacloud.ondemand.com:443 - certificate has expired ] (0s 148ms) [ERROR] [cds.deploy] - HDI deployment failed with exit code 1 at hdiDeployLib.deploy (/home/user/projects/cloud-cap-samples/node_modules/@sap/cds/bin/deploy/to-hana/hdiDeployUtil.js:92:35) at ChildProcess.<anonymous> (/home/user/projects/cloud-cap-samples/node_modules/@sap/hdi-deploy/library.js:68:14) at ChildProcess.emit (events.js:198:13) at maybeClose (internal/child_process.js:982:16) at Socket.stream.socket.on (internal/child_process.js:389:11) at Socket.emit (events.js:198:13) at Pipe._handle.close (net.js:607:12)

jhodel18
Active Contributor
0 Kudos

Hi Samuel,

Are you using HANA Cloud Trial? It could be that your hana db instance is stopped, and you need to start it.

smok1
Explorer
0 Kudos

Hi Jhodel,

Yes I'm using HANA Cloud Trial.

I've just spun up a new HANA Cloud Instance and it's running.

Was using BAS to deploy it: cds deploy -2 hana and got the error. I think the key is 443 - certificate has expired.