I’m having an SSL error when trying to retrieve features from the feature store. I’ve created an AWS instance using https://www.hopsworks.ai/ and I am trying to connect to it from SageMaker Jupyter Notebook.
I assume my connection is successful since the keystore and truststore have been transferred to my notebook’s directory without errors .
However, I get the following error when trying to get a feature :
failed to initialize SSL
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/thrift/transport/TSSLSocket.py”, line 293, in _do_open
return self._wrap_socket(plain_sock)
File “/usr/local/lib/python3.6/site-packages/thrift/transport/TSSLSocket.py”, line 177, in _wrap_socket
self.keyfile)
ssl.SSLError: [SSL: EE_KEY_TOO_SMALL] ee key too small (_ssl.c:3503)
SQL string for the query created successfully
Running sql: SELECT * FROM teams_features_1 against the offline feature store
I think the issue happens when we convert the certificates from jks format to pem so that they can be used by the Python libraries.
Could you please make sure that the keyStore.jks and trustStore.jks are not empty (if they are, could you please remove them and try to run the connect again) ?
When you run the featurestore.get_featuregroup("teams_features").head(5), do you see three files being created (ca_chain, certfile and keyfile).
Are you using plain SageMaker instances or do you apply any configuration on top of it? What’s the output of running the following cell:
Ok, that’s good to hear. That could also be the case, as SageMaker uses Conda to manage the python environments, it could be that in some environments there is an older version of OpenSSL.
In any case, we also fixed Hopsworks to generate longer keys to be compatible with the newer versions of OpenSSL. If you re-create your https://hopsworks.ai cluster, it should work with all the environments.