on 2024 Jul 24 12:44 PM
Hi everyone, so today I created a HANA Cloud database and already configured it so it Allows all IP Addresses; then I want to try to connect to that database directly from my local Python program using hdbcli. Here is the code that I use to connect:
import os
from flask import Flask
from cfenv import AppEnv
from hdbcli import dbapi
app = Flask(__name__)
env = AppEnv()
# hana_service = None
# hana = env.get_service(label=hana_service)
port = int(os.environ.get('PORT', 3000))
@app.route('/')
def hello():
conn = dbapi.connect(address='8ec92110-...-...-...-.hana.trial-us10.hanacloud.ondemand.com',
port=443,
user='HANAUSER',
password='UserHanaPass.99',
encrypt=True,
sslValidateCertificate=False
)
cursor = conn.cursor()
cursor.execute("select CURRENT_UTCTIMESTAMP from DUMMY")
ro = cursor.fetchone()
cursor.close()
conn.close()
return "Current time is: " + str(ro["CURRENT_UTCTIMESTAMP"])
if __name__ == '__main__':
app.run(host='0.0.0.0', port=port)
this is the full error message:
File "D:\Cognitus\IFRS\1.IFRS 9 Concept\Code\.venv\lib\site-packages\flask\app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "d:\Cognitus\IFRS\1.IFRS 9 Concept\Code\server_direct.py", line 15, in hello
conn = dbapi.connect(address='8ec92110-7253-4e50-9c4a-05a53ab55162.hana.trial-us10.hanacloud.ondemand.com',
hdbcli.dbapi.Error: (10, "authentication failed: Detailed info for this error can be found with correlation ID '0BB7FCD761027446922C598C547781DC'")so what i missed here? thanks!
You need to log on to your instance with the DBADMIN user and check what the full error message is for the correlation-id `0BB7FCD761027446922C598C547781DC` by running the query:
SELECT * FROM SYS.AUTHENTICATION_ERROR_DETAILS
WHERE CORRELATION_ID = '0BB7FCD761027446922C598C547781DC';
Regards,
--Vitaliy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.