Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Dynamic Media usage in AEM Cloud Local Development

Avatar

Community Advisor

Hello All,

 

We are looking to use Dynamic Media in AEM cloud and have been able to connect to Dynamic media as explained at https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/dynamicmedia...

1. Has anyone seen issue below and know if its a valid scenario and a fix?

 

Shubham_borole_0-1656621745897.png

 

However, when trying this in local, I try to click on "Connect to Dynamic Media button" and get a message Connection Failed.

 

 

 

failed: Connection refused: connect at com.day.cq.dam.scene7.impl.Scene7APIClientImpl.makeRequest(Scene7APIClientImpl.java:278) [com.day.cq.dam.cq-scene7-core:5.13.402] Caused by: java.net.ConnectException: Connection refused: connect at java.base/java.net.PlainSocketImpl.connect0(Native Method) at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:101) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.base/java.net.Socket.connect(Socket.java:608)

 

 

 

 

2. How do AEM Cloud devs usually develop locally with Dynamic Media? i.e. In terms of account, do all devs use a same local dev account different from dev, staging and (of course) prod accounts?

We are trying to utilize Dynamic Media for getting renditions for our components. I was able to try to create image presets and get different renditions based images created when an image file is uploaded to DAM Assets. 

Now looking to see what changes need to be made in the component to load the rendition image. For eg 

https://my-aec-site/is/image/mysiteaccount-dev/myimage?img.retina-medium$ 
or 

https://my-aec-site/is/image/mysiteaccount-dev/myimage?img.retina-large$

my-aec-site can be replaced by applicable site.

Thank you,

 

Shubham

Tagging @Gaurav-Behl and @Lokesh_Shivalingaiah  for help.

1 Accepted Solution

Avatar

Correct answer by
Level 10

@Shubham_borole 

  1. I am able to connect to Dynamic Media from local SDK v7767 w/o any issue. "Connection refused" could probably be due to a proxy on your local machine interfering with the connection otherwise wrong credentials/region selection.
  2. "Do all devs use a same local dev account different from dev, staging and (of course) prod accounts?" - Correct, DM is configured at application/instance/tenant level hence all devs could use the same account based on your architectural decisions. I haven't come across a use case where each dev in the same team is using a different account for some reason. However, there could be a different PROD & Non-PROD account based on your contract. Each DM account adds up to the overall licensing cost in case you're not aware of that.
  3. You may follow core components reference implementation to enable DM in your proxy/custom components - Image Component | Adobe Experience Manager

 

HTH

 

View solution in original post

4 Replies

Avatar

Correct answer by
Level 10

@Shubham_borole 

  1. I am able to connect to Dynamic Media from local SDK v7767 w/o any issue. "Connection refused" could probably be due to a proxy on your local machine interfering with the connection otherwise wrong credentials/region selection.
  2. "Do all devs use a same local dev account different from dev, staging and (of course) prod accounts?" - Correct, DM is configured at application/instance/tenant level hence all devs could use the same account based on your architectural decisions. I haven't come across a use case where each dev in the same team is using a different account for some reason. However, there could be a different PROD & Non-PROD account based on your contract. Each DM account adds up to the overall licensing cost in case you're not aware of that.
  3. You may follow core components reference implementation to enable DM in your proxy/custom components - Image Component | Adobe Experience Manager

 

HTH

 

Avatar

Community Advisor

Thank you @Gaurav-Behl 

We are looking into connectivity issue as well. Is there a way to bypass or whitelist local ip somewhere? Not sure how to work around this.

 

Tried updating below but no effect.

org.apache.sling.security.impl.ReferrerFilter
allow.hosts.regexp = [https://.*\.scene7\.com:443]

Please let me know if any thoughts. 

Thanks for the itemized answers, they were helpful.

 

Shubham 

Avatar

Level 10

I don't think whitelisting local IP is required & would help.

Try to connect from a different m/c, if you've been trying to connect from your work machine and it didn't work, try it from your personal m/c or vice versa.

The goal is to make sure that no firewall/proxy is blocking the outgoing request on your machine. Dynamic Media's endpoint should already be integrated via your Adobe IMS & AEM servers. If not, then fix that first.  

Avatar

Community Advisor

Thank you for all the responses. 

Adding proxy settings config to below Factory Config helped. Check the Enable Proxy Settings and add the host, port, userid and password information.

Shubham_borole_0-1658168560888.png