ODBC Connection failed: peer did not return a certificate

dimitri_pdimitri_p
edited April 2025 in General Discussion

I am trying to connect to my vertica instance using ca crt, client crt and client key which I know to be good, as I've created a truststore and a keystore from them and was able to connect using JDBC and TLS authentication. Somehow I can't do the same using ODBC.

import pyodbc

connectionString = f'''
DRIVER={{Vertica}};
SERVER=my_vertica_host;
DATABASE=test_db;
UID=dbadmin;
SSLMode=verify_full;
SSLCaFile=D:\\Vertica_Keys\\root.crt;
SSLCertFile=D:\\Vertica_Keys\\dbadmin.crt;
SSLKeyFile=D:\\Vertica_Keys\\dbadmin.key;
'''
conn = pyodbc.connect(connectionString)

and in vertica.log on the server I get

2025-04-05 22:06:50.164 Http Worker:0x7efafcffe640 [Basics] print_SSL_err() error: TLS::handle_err() error: SSL_ERROR_SSL [error code: 0A0000C7, location SSL routines:tls_process_client_certificate ssl/statem/statem_srvr.c:3509, reason [peer did not return a certificate]]

Here's from odbc log on the client:

Vertica::VConnection::Connect: +++++ enter +++++
Apr 06 11:43:55 DEBUG 22248 Vertica::VConnection::Connect: IsPasswordEncrypted is false. Will not decrypt.
Apr 06 11:43:55 INFO 22248 Vertica::VConnection::Connect: Connect to host my_vertica_host:5433, db test_db
Apr 06 11:43:56 WARN 22248 Vertica::VPGConnection::Connect: Connection failed, error state is: 08001, error code: 0, message: Schannel error: Unrecognized SSPI status code 0x80090331 (Error code 0x00000001)

Apr 06 11:43:56 WARN 22248 Vertica::VPGConnection::Connect: Check server/network/firewall settings
Apr 06 11:43:56 ERROR 22248 Simba::ODBC::Connection::SQLDriverConnectW: [Vertica][VerticaDSII] (160) Connection attempt failed: Schannel error: Unrecognized SSPI status code 0x80090331 (Error code 0x00000001)

Apr 06 11:43:56 INFO 22248 Simba::ODBC::Connection::SQLGetInfoW: InfoType: Unknown InfoType (1750)
Apr 06 11:43:56 ERROR 22248 Simba::ODBC::Connection::SQLGetInfoW: [Vertica][ODBC] (11180) SQLGetInfo property not found: 1750

Any help is greatly appreciated.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file