Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

\/services and /content/dam paths are not serving correctly with /etc/map and dispatcher on multiple domains

Avatar

Level 4

I was following the documentation to configure the dispatcher with multiple domains.

https://docs.adobe.com/docs/en/dispatcher/disp-domains.html#Configure Sling Mapping for Resource Resolution

Node pathTypeProperty
/etc/map/http/branda.comsling:MappingName: sling:internalRedirect
Type: String
Value: /content/sitea
/etc/map/http/branda.com/libssling:MappingName: sling:internalRedirect
Type: String
Value: /libs
/etc/map/http/branda.com/etcsling:Mapping
/etc/map/http/branda.com/etc/designssling:MappingName: sling:internalRedirect
Type: String
Value: /etc/designs
/etc/map/http/branda.com/etc/clientlibssling:MappingName: sling:internalRedirect
Type: String
Value: /etc/clientlibs

Its working well for 2 domains with caching for /content, /etc/designs, /etc/clientlibs.

But for the service calls /services/contentsearch.json, /content/dam assets, the /etc/map is being applied on the publish instance and its searching under the /content/siteA/services/contentsearch.json and /content/siteA/content/dam/web/corporate... due to which they are not getting resolved and getting the 404. How to handle this?

Even I tried to create the sling:Mapping nodes similar to /etc/designs and /etc/clientlibs for /services/contentsearch.json and /content/dam

Logs from the dispatcher

[Mon Jun 05 01:27:28 2017] [D] [pid 19833] checking [/services/contentsearch.json]

[Mon Jun 05 01:27:28 2017] [D] [pid 19833] request contains a query string: term=businessUnit-ALL,eventType-ALL,year-ALL,month-ALL,&page=0&filter=events&jcrPath=/content/siteA/en/events/jcr:content

[Mon Jun 05 01:27:28 2017] [D] [pid 19833] cache-action for [/services/contentsearch.json]: NONE

[Mon Jun 05 01:27:28 2017] [D] [pid 19833] Reusing socket: 172.31.60.90:4503

[Mon Jun 05 01:27:28 2017] [D] [pid 19833] Connected to backend rend01 (172.31.60.90:4503)

[Mon Jun 05 02:14:53 2017] [D] [pid 20422] checking [/services/stockvalue]

[Mon Jun 05 02:14:53 2017] [D] [pid 20422] request URL has no extension: /services/stockvalue

[Mon Jun 05 02:14:53 2017] [D] [pid 20422] cache-action for [/services/stockvalue]: NONE

[Mon Jun 05 01:23:26 2017] [D] [pid 19719] cache-action for [/content/dam/web/corporate/images/Gavi_Cad.jpg/_jcr_content/renditions/Test80x80]: NONE

[Mon Jun 05 01:23:26 2017] [D] [pid 19719] Reusing socket: 172.31.60.90:4503

[Mon Jun 05 01:23:26 2017] [D] [pid 19719] Connected to backend rend01 (172.31.60.90:4503)

Logs from the Publish Instance

05.06.2017 02:12:18.504 *INFO* [172.31.50.85 [1496628738493] GET /services/stockvalue HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/siteA/services/stockvalue not found

05.06.2017 02:12:18.513 *INFO* [172.31.50.85 [1496628738512] GET /services/contentsearch.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/siteA/services/contentsearch.json not found

05.06.2017 01:23:25.227 *INFO* [172.31.50.85 [1496625805225] GET /content/dam/web/corporate/images/who_logo.jpg/_jcr_content/renditions/Test32x32 HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/siteA/content/dam/web/who_logo.jpg/jcr:content/renditions/Test32x32 not found

05.06.2017 01:23:25.346 *INFO* [172.31.50.85 [1496625805345] GET /content/dam/web/corporate/images/Gavi_Cad.jpg/_jcr_content/renditions/Test32x32 HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/siteA/content/dam/web/corporate/images/Gavi_Cad.jpg/jcr:content/renditions/Test32x32 not found

05.06.2017 01:23:25.370 *INFO* [172.31.50.85 [1496625805336] GET /content/dam/web/corporate/Test.jpg HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/siteA/content/dam/web/corporate/Test.jpg not found

05.06.2017 01:23:25.422 *INFO* [172.31.50.85 [1496625805408] GET /content/dam/web/corporate/Test.png HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/siteA/content/dam/web/corporate/Test.png not found

05.06.2017 01:23:25.438 *INFO* [172.31.50.85 [1496625805437] GET /content/dam/web/corporate/test2.jpg HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/siteA/content/dam/web/corporate/test2.jpg not found

05.06.2017 01:23:25.884 *INFO* [172.31.50.85 [1496625805883] GET /services/contentsearch.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/siteA/services/contentsearch.json not found

05.06.2017 01:23:26.269 *INFO* [172.31.50.85 [1496625806267] GET /content/dam/web/corporate/images/who_logo.jpg/_jcr_content/renditions/Test80x80 HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/siteA/content/dam/web/corporate/images/who_logo.jpg/jcr:content/renditions/Test80x80 not found

05.06.2017 01:23:26.292 *INFO* [172.31.50.85 [1496625806256] GET /content/dam/web/corporate/images/Gavi_Cad.jpg/_jcr_content/renditions/Test80x80 HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /content/siteA/content/dam/web/corporate/images/Gavi_Cad.jpg/jcr:content/renditions/Test80x80 not found

1 Reply

Avatar

Administrator

Jörg Hoh​ CAn you please have a look at this one.

~kautuk



Kautuk Sahni