thumbor-community / aws

Thumbor AWS extensions
MIT License
155 stars 70 forks source link

Cannot load files from s3 bucket #133

Closed bip7686 closed 1 year ago

bip7686 commented 5 years ago

I cannot load any pictures from my s3 bucket. I have my aws credentials configured on my machine but it is not working.

Stacktrace

2018-11-12 16:16:47 tornado.application:ERROR Uncaught exception Traceback (most recent call last): File "/home/ubuntu/.local/lib/python2.7/site-packages/tornado/http1connection.py", line 238, in _read_message delegate.finish() File "/home/ubuntu/.local/lib/python2.7/site-packages/tornado/http1connection.py", line 680, in finish return self._delegate.finish() File "/home/ubuntu/.local/lib/python2.7/site-packages/tornado/simple_httpclient.py", line 510, in finish self.headers["Location"]) File "/home/ubuntu/.local/lib/python2.7/site-packages/tornado/httputil.py", line 229, in getitem return self._dict[_normalized_headers[name]] KeyError: 'Location' 2018-11-12 16:16:47 thumbor:ERROR ERROR retrieving image from S3 589142/96ru63491.jpg: {'ResponseMetadata': {'HTTPStatusCode': 599, 'HTTPHeaders': {}}, 'Error': {'Message': '', 'Code': '599'}} 2018-11-12 16:16:47 tornado.access:ERROR 502 GET /unsafe/300x200/589142/96ru63491.jpg (x.x.x.x) 101.27ms

Versions

asn1crypto==0.24.0 backports-abc==0.5 boto3==1.9.42 botocore==1.12.42 cryptography==2.1.4 derpconf==0.8.2 docutils==0.14 enum34==1.1.6 futures==3.2.0 idna==2.6 ipaddress==1.0.17 jmespath==0.9.3 keyring==10.6.0 keyrings.alt==3.0 libthumbor==1.3.2 piexif==1.0.13 Pillow==5.2.0 pycrypto==2.6.1 pycryptodome==3.7.0 pycurl==7.43.0.2 pygobject==3.26.1 python-dateutil==2.7.5 pytz==2018.7 pyxdg==0.25 s3transfer==0.1.13 SecretStorage==2.3.1 simplejson==3.16.0 singledispatch==3.4.0.3 six==1.11.0 statsd==3.3.0 tc-aws==6.2.12 thumbor==6.6.0 tornado==5.1.1 tornado-botocore==1.5.0 urllib3==1.24.1 webcolors==1.8.1

Configuration

AWS Region the bucket is located in.

TC_AWS_REGION = 'eu-west-1' TC_AWS_LOADER_BUCKET = 'placeholder' TC_AWS_RESULT_STORAGE_BUCKET = 'placeholder'

The metrics backend thumbor should use to measure internal actions. This must

be the full name of a python module (python must be able to import it)

Defaults to: 'thumbor.metrics.logger_metrics'

METRICS = 'thumbor.metrics.logger_metrics'

The loader thumbor should use to load the original image. This must be the

full name of a python module (python must be able to import it)

Defaults to: 'thumbor.loaders.http_loader'

LOADER = 'tc_aws.loaders.s3_loader'

The file storage thumbor should use to store original images. This must be the

full name of a python module (python must be able to import it)

Defaults to: 'thumbor.storages.file_storage'

STORAGE = 'thumbor.storages.no_storage'

The result storage thumbor should use to store generated images. This must be

the full name of a python module (python must be able to import it)

Defaults to: None

RESULT_STORAGE = 'tc_aws.result_storages.s3_storage'

Everything else is set to the default settings.

Steps to reproduce

  1. Open URL to get picture from s3 bucket
Bladrak commented 1 year ago

Cleaning up old issues, feel free to reopen if it's still present with the latest releases