Problem to login from linux using ActiveDirectoryPassword option

Moshe Lin 11 Reputation points
2020-10-28T10:34:53.807+00:00

Hi,

I'm trying to login to Azure SQL DB using Authentication=ActiveDirectoryPassword option (-G option in sqlcmd) and I'm getting a timeout error (I defined the timeout to be 120 second and it didn't help):

./sqlcmd -S tcp:erz-azure-si.database.windows.net -G -U USER@keyman .COM -P PASSWORD -l 120
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Failed to authenticate the user 'USER@keyman .COM' in Active Directory (Authentication option is 'ActiveDirectoryPassword').
Error code 0xA190; state 41360
Could not find any endpoints.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Timeout error [258]. .
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Unable to complete login process due to delay in login response.

Trying to work with SQL credentials works well, also trying to login via ActiveDirectory on Windows works well.
I'm working with RedHat 7.6 and using ODBC version 17.6 (libmsodbcsql-17.6.so.1.1), please find the library the odbc is working with:

ldd /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.6.so.1.1
linux-vdso.so.1 => (0x00007ffc21517000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f0581ff6000)
librt.so.1 => /lib64/librt.so.1 (0x00007f0581dee000)
libodbcinst.so.2 => /lib64/libodbcinst.so.2 (0x00007f0581bd3000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f05818ea000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f058169d000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f0581395000)
libm.so.6 => /lib64/libm.so.6 (0x00007f0581093000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f0580e7d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f0580c60000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0580893000)
/lib64/ld-linux-x86-64.so.2 (0x0000559f7ad1a000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f0580678000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f0580473000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f0580264000)
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f057fe01000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f057fbfc000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f057f9e3000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f057f7bb000)
libz.so.1 => /lib64/libz.so.1 (0x00007f057f5a5000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f057f343000)

I don't here libcurl, maybe this is the root cause of my problem?

Any idea how to solve the timeout problem?

Thanks,
Moshe

Azure SQL Database
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,308 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.