Power

 View Only

Python SSL issue while I tried to download an object from a S3 bucket.

  • 1.  Python SSL issue while I tried to download an object from a S3 bucket.

    Posted 14 days ago

    Hello Community,
    I am facing some issues when I am trying to download an object from a S3 bucket, from an AIX7.2 client with S3.
    The error we get is
    Traceback (most recent call last):
      File "/scripts/s3_ecs/s3reqboto3.py", line 120, in <module>
        move__file__s3__to__spool(origin_bucket, s3Config.get(args.environment).get("originBucket"),
      File "/scripts/s3_ecs/s3reqboto3.py", line 63, in move__file__s3__to__spool
        download__file(origin_bucket, str_file, folder_name, prefix)
      File "/scripts/s3_ecs/s3reqboto3.py", line 29, in download__file
        my_bucket.download_file(file_name, folder_name + file_name.lstrip(prefix))
      File "/home/user123/.local/lib/python3.9/site-packages/boto3/s3/inject.py", line 277, in bucket_download_file
        return self.meta.client.download_file(
      File "/home/user123/.local/lib/python3.9/site-packages/boto3/s3/inject.py", line 190, in download_file
        return transfer.download_file(
      File "/home/user123/.local/lib/python3.9/site-packages/boto3/s3/transfer.py", line 320, in download_file
        future.result()
      File "/home/user123/.local/lib/python3.9/site-packages/s3transfer/futures.py", line 103, in result
        return self._coordinator.result()
      File "/home/user123/.local/lib/python3.9/site-packages/s3transfer/futures.py", line 266, in result
        raise self._exception
      File "/home/user123/.local/lib/python3.9/site-packages/s3transfer/tasks.py", line 139, in __call__
        return self._execute_main(kwargs)
      File "/home/user123/.local/lib/python3.9/site-packages/s3transfer/tasks.py", line 162, in _execute_main
        return_value = self._main(**kwargs)
      File "/home/user123/.local/lib/python3.9/site-packages/s3transfer/download.py", line 583, in _main
        for chunk in chunks:
      File "/home/user123/.local/lib/python3.9/site-packages/s3transfer/download.py", line 728, in __next__
        chunk = self._body.read(self._chunksize)
      File "/home/user123/.local/lib/python3.9/site-packages/s3transfer/utils.py", line 599, in read
        value = self._stream.read(*args, **kwargs)
      File "/home/user123/.local/lib/python3.9/site-packages/botocore/response.py", line 99, in read
        chunk = self._raw_stream.read(amt)
      File "/home/user123/.local/lib/python3.9/site-packages/urllib3/response.py", line 541, in read
        raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
      File "/opt/lib/python3.9/contextlib.py", line 135, in __exit__
        self.gen.throw(type, value, traceback)
      File "/home/user123/.local/lib/python3.9/site-packages/urllib3/response.py", line 449, in _error_catcher
        raise SSLError(e)
    urllib3.exceptions.SSLError: A failure in the SSL library occurred (_ssl.c:2622)

    Is anyone know something about this issue or have any clue about what it is might happening?

    Thank you and regards.



    ------------------------------
    Jorge de la Cruz
    ------------------------------