I’m using a local python environment to access Hopsworks Serverless from MacOS 12.5. Either hopsworks API and FeatureStore API allowed me to create a Feature Group but failed when i tried to insert a DataFrame as following.
ssl://c.app.hopsworks.ai:9092/bootstrap: SSL handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed: broker certificate could not be verified, verify that ssl.ca.location is correctly configured or root CA certificates are installed (brew install openssl) (after 124ms in state SSL_HANDSHAKE)
I have librdkafka packaged installed, OpenSSL 1.1.1, and the C_INCLUDE_PATH and LIBRARY_PATH environment variables set. I also checked that Hopsworks PEM files (downloaded by the API) were in the default folder (/tmp).
Why does the inserting of a DataFrame to a Feature Group is not working in my local Python environment?
I’ve seen a similar issue when a user tries to use the Hopsworks client behind a VPN/Corporate Network and connecting to https://app.hopsworks.ai . The network might be configured to terminate the TLS connection and establish a new one. If this is the case, the certificate the client receives is not the same as the Kafka producer certificate. Resulting in the issue above.
You can run this command to inspect the certificate chain returned when the client tries to establish a connection to the Kafka broker:
Thank for your feedback. I’m testing the Feature store from my Local Service Provider (not from my corporate/network). Actually SSL handshake failed if you don’t specified openssl CAfile, key and cert.
However with the right path to the Hopsworks CAfile, key and certificate the verification is OK.
Checking the kafka_api.get_default_config() from my default project i could see that all hopsworks certifications paths are correct, but for some reason the Producer failed using that configuration.
from confluent_kafka import Producer
producer = Producer(producer_config)
A temporal solution would be to disable the SSL verification, but i would like to address the underlying issue causing the SSL verification failure in my local python environment (macos).