-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Python][Packaging] S3FileSystem curl error when using localstack
-created S3 bucket or custom ca-certificate
#37001
Comments
any progress on this one please? |
@sheldonrong Can you suggest a solution for this? |
encountered this issue today, I haven't dive into any pyarrow code, but I guess the best way would be to allow user to pass in location of the CA certificates via the API? For example, in the constructor of the S3FileSystem, allow additional paramters like |
That could be a good idea indeed. We don't have a way of doing that currently, but we should probably add one. For now, you can perhaps workaround this by using the cc @danepitkin |
is there any updates on this? i'm also stuck at that point. |
I'm also searching for a workaround with this error |
Well, have you tried the workaround I suggested?
|
I've tried it locally and it works using >>> import os
>>> from pyarrow.fs import S3FileSystem, FileSelector
>>> os.environ['SSL_CERT_FILE']
'/home/antoine/t/miniocert/public.crt'
>>> fs = S3FileSystem(endpoint_override="localhost:9000", scheme="https", access_key="minioadmin", secret_key="minioadmin")
>>> fs.get_file_info(FileSelector('', recursive=True))
[] You have to make sure that your Unfortunately, the error message returned by the AWS SDK is not terribly informative if you're not giving the right hostname: >>> fs = S3FileSystem(endpoint_override="127.0.0.1:9000", scheme="https", access_key="minioadmin", secret_key="minioadmin")
>>> fs.get_file_info(FileSelector('', recursive=True))
[...]
OSError: When listing buckets: AWS Error NETWORK_CONNECTION during ListBuckets operation: curlCode: 60, SSL peer certificate or SSH remote key was not OK You can try using the $ curl --cacert ./t/miniocert/public.crt https://127.0.0.1:9000
curl: (60) SSL: no alternative certificate subject name matches target host name '127.0.0.1'
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above. |
So, I opened aws/aws-sdk-cpp#2908 so as to get a more informative error message from the AWS SDK. |
Thanks @pitrou for this comment!
I'm dealing with custom certs and while using |
Describe the bug, including details regarding any error messages, version, and platform.
I'm trying to use a localstack-created S3 bucket as way to test my application without interacting with S3.
To do that I launch an S3 endpoint using
localstack start -d
and create my PyArrow S3FS using:When I try interacting with files on the simulated bucket however I get the following:
Another user seems to have the same problem when using on-prem S3, and had to use
s3fs
along withPyFileSystem, FSSpecHandler
to resolve it: https://discuss.ray.io/t/ssl-peer-certificate-or-ssh-remote-key-was-not-ok/11091/2Fully reproducible example:
Would result in:
Possibly related: https://issues.apache.org/jira/browse/ARROW-9261
Tested on Pyarrow 10.0.1, 12.0.1.
Component(s)
Python
The text was updated successfully, but these errors were encountered: