Skip to content
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

Export is not actually uploading images to s3 #15

Open
kgoedecke opened this issue Oct 3, 2018 · 8 comments
Open

Export is not actually uploading images to s3 #15

kgoedecke opened this issue Oct 3, 2018 · 8 comments

Comments

@kgoedecke
Copy link

I configured the extension with s3_config.php and it seemed to work just fine. Even the export process throws no errors and shows the upload of multiple files.

...
Uploading catalog/product/0/3/0319.2.jpg to S3.
Uploading catalog/product/0/3/0313.0.jpg to S3.
Uploading catalog/product/0/3/0310.9_dr.x.jpg to S3.
Uploading catalog/product/0/3/x.jpg to S3.
Uploading catalog/product/0/3/zda.jpg to S3.
Uploading catalog/product/0/3/0344.4.jpg to S3.
...

But then no files are actually in the S3 bucket. Is there any way to debug this?

@kgoedecke
Copy link
Author

@thaiphan additionally my uploads are not being uploaded to S3 after activating the plugin. I dont get any error messages. The credentials have full S3 access. Any ideas what the issue could be?

@thaiphan
Copy link
Owner

Hi @kgoedecke,

In the AWS Console, are you in the correct region? If you're in the wrong region, you might not see your bucket or files.

Regards,

Thai

@kgoedecke
Copy link
Author

@thaiphan Yes should be. Its also requesting the files from the current URL, just the upload doesn't work.

@neps-in
Copy link

neps-in commented Nov 17, 2018

I am also experiencing the same issue.

@kgoedecke
Copy link
Author

@thaiphan would be great if you can get back to us about this!

@Tom-T
Copy link

Tom-T commented Dec 25, 2018

I'm having the same issue here. I did a bit of searching and found a log file at [magento]/var/log/exception.log

at /home/ubuntu/magento/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113)"} []
[2018-12-24 23:11:34] main.CRITICAL: Error executing "PutObject" on "https://mybucket123.s3.aws-region-x.amazonaws.com/theme/preview/preview_image_5c209fa26be24.jpeg"; AWS HTTP error: Client error: `PUT https://mybucket123.s3.aws-region-x.amazonaws.com/theme/preview/preview_image_5c209fa26be24.jpeg` resulted in a `403 Forbidden` response:
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>91FCCD (truncated...)
AccessDenied (client): Access Denied - <?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>91FCCD1183D7778C</RequestId><HostId>bey0HzUETzXVwOVYxgvR7/4rmVpOFVgh2vSurpghDuMSX9KwopyWCKHaMNZeeHCChKCljQ1Xyj4=</HostId></Error> {"exception":"[object] (Aws\\S3\\Exception\\S3Exception(code: 0): Error executing \"PutObject\" on \"https://mybucket123.s3.aws-region-x.amazonaws.com/theme/preview/preview_image_5c209fa26be24.jpeg\"; AWS HTTP error: Client error: `PUT https://mybucket123.s3.aws-region-x.amazonaws.com/theme/preview/preview_image_5c209fa26be24.jpeg` resulted in a `403 Forbidden` response:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>91FCCD (truncated...)
AccessDenied (client): Access Denied - <?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>91FCCD1183D7778C</RequestId><HostId>bey0HzUETzXVwOVYxgvR7/4rmVpOFVgh2vSurpghDuMSX9KwopyWCKHaMNZeeHCChKCljQ1Xyj4=</HostId></Error> at /home/ubuntu/magento/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php:191, GuzzleHttp\\Exception\\ClientException(code: 403): Client error: `PUT https://mybucket123.s3.aws-region-x.amazonaws.com/theme/preview/preview_image_5c209fa26be24.jpeg` resulted in a `403 Forbidden` response:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>91FCCD (truncated...)
at /home/ubuntu/magento/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113)"} []

I've used a profile with permissions to this specific bucket as well as trying the main admin one as per the documentation -- no change.

I'm using the following command to try again which brings up the error again:
php -f bin/magento s3:storage:disable && php -f bin/magento s3:storage:export

@ivanaugustobds
Copy link

ivanaugustobds commented Jan 28, 2019

Same here (Magento 1.9.3.x). Can this be related to issue #4? 🤔
Because if so, then the PR #17 it's a possible solution..

@vincequeiroz
Copy link

I was having this problem.

When I created the bucket, by default it's not allowing public objects, I changed this configuration and now it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants