cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Issue with connection to postgresql from SAP CAP app in BAS

friscas
Explorer
0 Kudos
211

Hi Everyone,

when i run the command cds deploy, i get the following error:

$ cds deploy --tunnel-address localhost:5432
/> deployment to localhost:5432 failed

TimeoutError: ResourceRequest timed out

 

I do have the ssh tunnel running on port 5432, the PostgreSQL instance is working fine when i connect to it from my local machine via DBeaver but for some reason i can not deploy changes, when inspecting the env via "cds env" i do see the correct username, password and database name, so i really dont understand why i can not cds deploy my tables.

View Entire Topic
friscas
Explorer
0 Kudos

The solution is too add the sslcert and sslrootcert and increase the timeout.

Example: 

      "db": {
        "kind": "postgres",
        "credentials": {
          "hostname": "127.0.0.1",
          "port": "12345",
          "username": "...",
          "password": "...",
          "dbname": "...",
          "sslcert": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
          "sslrootcert": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"
        },
        "pool": {
          "acquireTimeoutMillis": 2000
        }
      }