Skip to Content
Dec 15, 2017 at 10:44 AM

"authentication failed" when connecting to SAP HANA Express Edition from Python/Java/Excel

8119 Views Last edit Dec 19, 2017 at 04:30 PM 10 rev

I've installed HANA Express Edition 2 in a virtual machine running on Windows 10 in Virtualbox. I successfully connected Eclipse to the database using the following (faked) credentials:

Port: 39015
Password: MyPassword1

This works fine and I've been using it for a while.

Recently, I wanted to access the database via Python. For that I followed this helpful tutorial:

However, it fails at the connectivity check :-(

Specifically, I executed the following script:

from hdbcli import dbapi
connection = dbapi.connect('', 39015, 'SYSTEM', 'MyPassword1')

It fails with error:

Traceback (most recent call last):
  File "", line 2, in <module>
    connection = dbapi.connect('', 39015, 'SYSTEM', 'MyPassword1')
  File "C:\Users\MyUser\AppData\Local\Programs\Python\Python36\lib\site-packages\hdbcli\", line 85, in __init__
    self.__connection = pyhdbcli.connect("%s:%d" % (address, port), 'HDB', user, password, self.__properties)
hdbcli.dbapi.Error: (10, 'authentication failed')

Modifying the parameters "port" or "server" in the second line results in different errors so there's really something odd with the authentication. The credentials are definitely equal to those in Eclipse (which is still working).

Is there something I have missed during installation? Or what are other possible reasons for rejecting authentication apart from wrong credentials?

Edit: I tried connecting via JDBC (64bit) and got the same error. Connecting via Excel (32bit) also does not work:

Feels like there is something odd with the configuration of the server, so I checked the debug trace for authentication in the indexserver:

[2352]{-1}[29/-1] 2017-12-19 17:20:51.984769 d Authentication : [PRE AUTHENTICATION] logon name: SYSTEM
[2352]{-1}[30/-1] 2017-12-19 17:20:51.985535 i Authentication : lock time for user SYSTEM is 1440 minutes; user is locked until 2017-12-20 16:20:51.9840000 (given in UTC) [1440,2017-12-20 16:20:51.9840000]
[2352]{-1}[-1/-1] 2017-12-19 17:20:51.985648 d Authentication : exception during authentication: ERROR [SQL-10] authentication failed at ptime/query/catalog/
exception 1: no.71000010 (ptime/query/catalog/

NO exception throw location recorded. Stack generation suppressed.


gzlp2.png (3.0 kB)