on 12-25-2019 4:02 PM
Hi Experts,
Need your guidence with below requrement:
Is it possible to access the HDI container of Cloud Foundry "trial" using Python application (example Flask)?
I can do it very easily using Node.js express
But with Python, i am getting issues.
I am trying to access like below:
hana = env.get_service(label='hanatrial')
conn = dbapi.connect(address=hana.credentials['host'], port=int(hana.credentials['port']), user=hana.credentials['user'], password=hana.credentials['password'], encrypt="true")
Error:
========================================
hdbcli.dbapi.Error: (-10709, 'Connection failed (RTE:[300010] Cannot create SSL context: SSL trust store cannot be found: /home/vcap/.ssl/trust.pem (zeus.hana.prod.eu-central-1.whitney.dbaas.ondemand.com:23803))')
========================================
Followed the documentation below, but looks like it is not for "trial".
is there any way to access HDI containers of Cloud Foundry "trial" in Python?
Many thanks in advance,
Best Regards,
Venu
For some more background on this you can have a look as well at my recent post https://blogs.sap.com/2020/04/14/secure-connection-from-hdbsql-to-sap-hana-cloud/
The simplest solution though would be to add `sslValidateCertificate='false',` like
conn = dbapi.connect(
address=hana.credentials['host'],
port=int(hana.credentials['port']),
user=hana.credentials['user'],
password=hana.credentials['password'],
sslValidateCertificate='false',
encrypt="true"
)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried the description in Connecting Python Application to SAP HANA (XSA)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How to set up the connection using Node.js on Windows? I am getting the following error: The PSE file does not exist.
{"code":-10709,"message":"Connection failed (RTE:[300010] Cannot create SSL context: Error in api.SSL_CTX_set_default_pse_by_name C:\\Program Files\\SAP\\hdbclient\\ - SSL error [4129]: Unknown error, General error: 0x00001021 | SAPCRYPTOLIB | SSL_CTX_set_default_pse_by_name\nSAPCRYPTO API error\nThe PSE file does not exist.\n0xa1d50108 | TOKEN_TOKPSE | SSL_CTX_set_default_pse_by_name\nToken application not existing\nCannot open PSE (PSE=C:\\Program Files\\SAP\\hdbclient\\, SECUDIR=C:\\Program Files\\SAP\\hdbclient, user=I068527 I068527 I068527)\n0xa1d50108 | TOKEN_TOKPSE | sec_SSL_CTX_set_asc\nToken application not existing\n (ErrCode: 4129) (zeus.hana.prod.eu-central-1.whitney.dbaas.ondemand.com:32081))","sqlState":"","status":500}
for resolving the mistake, I set the conecction in this mode:
var conn_params =
{
serverNode: "zeus.hana.prod.us-east-1.....:port",
encrypt: true,
schema: "EDW_...",
uid: "SYSTEM",
pwd: "xxxxxx",
sslValidateCertificate: "false"
}
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.