Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: Custom S3 Plugin
Hello,
We have our Liferay DXP 7.0 Instances running in Clustered mode deployed in AWS Cloud. We have Liferay's document storage in AWS S3.
Due to recent Organizational policy updates, we cannot store the AWS Secret Key as plain text in cfg file or in Database.
So for that, we took the S3 implementation of Liferay and have overridden the S3Store class. In this class the Secret Key is decrypted and then used as normal S3Store implementation of Liferay.
We have added the following property in portal-ext.properties and also in cfg file in /osgi/configs
The implementation is working as expected but we observed that we are getting following exception related to AWS S3 in one of the custom portlet where we use Documents and Media Library features
Thansk & regards,
Chandrashekar NM
We have our Liferay DXP 7.0 Instances running in Clustered mode deployed in AWS Cloud. We have Liferay's document storage in AWS S3.
Due to recent Organizational policy updates, we cannot store the AWS Secret Key as plain text in cfg file or in Database.
So for that, we took the S3 implementation of Liferay and have overridden the S3Store class. In this class the Secret Key is decrypted and then used as normal S3Store implementation of Liferay.
We have added the following property in portal-ext.properties and also in cfg file in /osgi/configs
dl.store.impl = <custom s3store></custom>
The implementation is working as expected but we observed that we are getting following exception related to AWS S3 in one of the custom portlet where we use Documents and Media Library features
com.liferay.portal.kernel.exception.SystemException: Failed to reset the input stream; If the request involves an input stream, the maximum stream buffer size can be configured via request.getRequestClientOptions().setReadLimit(int)
Please let me know if I have missed anything or we need to make any additional configurations for fixing this issue.Thansk & regards,
Chandrashekar NM
Chandrashekar NM:
An exception is useful with a bit of context from the stacktrace that accompanies it - at least down to your custom servlet. Some context from that custom servlet would also be good.
The implementation is working as expected but we observed that we are getting following exception related to AWS S3 in one of the custom portlet where we use Documents and Media Library features
Do you also observe the same behavior with the stock S3Store implementation?
Which (exact) version are you on? (e.g. please state the fixpack that you have installed)
HI Olaf,
Thanks for your reply.
Please find attached logs for your reference.
The same behavior was not seen until this plugin was deployed and configured to be used by Liferay. We have not reverted to the default still as we have some dependency.
Our servers are running on liferay-dxp-digital-enterprise-7.0-ga1 patched with de-36 fix-pack level.
Thanks & Regards,
Chandrashekar
Thanks for your reply.
Please find attached logs for your reference.
The same behavior was not seen until this plugin was deployed and configured to be used by Liferay. We have not reverted to the default still as we have some dependency.
Our servers are running on liferay-dxp-digital-enterprise-7.0-ga1 patched with de-36 fix-pack level.
Thanks & Regards,
Chandrashekar
Attachments:
The exception obviously happens in your code:
at com.xyz.portal.store.s3.S3Store.transform(S3Store.java:736)
Did you try to google it?
"Caused by: com.amazonaws.ResetException: Failed to reset the input stream; If the request involves an input stream, the maximum stream buffer size can be configured via request.getRequestClientOptions().setReadLimit(int)"
Not sure, if it helps, but I get e.g. this result:
https://stackoverflow.com/questions/55629623/why-we-need-to-setreadlimitint-in-aws-s3-java-client
at com.xyz.portal.store.s3.S3Store.transform(S3Store.java:736)
Did you try to google it?
"Caused by: com.amazonaws.ResetException: Failed to reset the input stream; If the request involves an input stream, the maximum stream buffer size can be configured via request.getRequestClientOptions().setReadLimit(int)"
Not sure, if it helps, but I get e.g. this result:
https://stackoverflow.com/questions/55629623/why-we-need-to-setreadlimitint-in-aws-s3-java-client
Hi
Have already seen this link and tried setting up the values both in the cfg[inside osgi/configs] file and also in System Settings[Foundation -> S3 Store Configuration]
Am I missing any any other configurations?
Thanks & Regards,
Chandrashekar NM
Have already seen this link and tried setting up the values both in the cfg[inside osgi/configs] file and also in System Settings[Foundation -> S3 Store Configuration]
Minimum Part Size = 5242880 [In System Settings]
minimumUploadPartSize = 5242880 [com.xyz.portal.store.s3.configuration.S3StoreConfiguration-default]
Am I missing any any other configurations?
Thanks & Regards,
Chandrashekar NM
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™