etc/cloudsettings.kernel.js/libs/settings/cloudsettings/legacy/contexthub giving 200 OK in RDE but 404 in DEV | Community
Skip to main content
NageshRaja
December 2, 2024
Solved

etc/cloudsettings.kernel.js/libs/settings/cloudsettings/legacy/contexthub giving 200 OK in RDE but 404 in DEV

  • December 2, 2024
  • 2 replies
  • 783 views

Hi All,

 

I have a weird issue.

API call at https://publish-p...-e....adobeaemcloud.com/etc/cloudsettings.kernel.js/conf/appA/settings/cloudsettings/legacy/contexthub is giving different results for different environments

It gives 200 OK for RDE Author and Publish but gives 404 on DEV Publish (200 on DEV Author)

We replicated the node /etc/cloudsettings.kernel.js/conf/appA/settings/cloudsettings/legacy/contexthub from DEV Author.

The dispatcher rule is also set -
/0009 { /glob "/etc/cloudsettings.kernel.js" /type "allow" }

Referred to the posts at https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/etc-cloudsettings-kernel-js-libs-settings-cloudsettings-legacy/m-p/351002

sling:resourceType is already set at "granite/contexthub/cloudsettings/components/baseconfiguration"

Why would both environments behave differently??

 

thanks in advance,

@nageshraja 

Best answer by Rohan_Garg

Hi @nageshraja,
Thanks for sending over your filter rules and dispatcher logs. 

Your request /etc/cloudsettings.kernel.js/conf/ctcweb-tenantA/settings/cloudsettings/legacy/contexthub is being answered by Tenant B's farm file and filter rules.

Dispatcher Log for everyone's reference - 

[17/Dec/2024:12:51:00 +0000] [I] [cm-p50252-e1454259-aem-publish-9c97fb757-pt2qc] "GET /etc/cloudsettings.kernel.js/conf/tenantA/settings/cloudsettings/legacy/contexthub" - 11ms [publishfarm-tenantB/-] [actionblocked]

 

It is because of the sandbox program you are currently hosting your project on. The sandbox environment provided in AEM Cloud is intended for testing and development for a specific tenant and doesn’t support a multi-tenant approach out of the box.

 

The best approach would be to migrate this to the production environment and re-test.

Meanwhile, as a workaround just include all the tenants for the request in a single farm file which is currently responding on the sandbox.

Hope this helps!

 

Best Regards,

Rohan Garg

2 replies

Aditya_Chabuku
Community Advisor
Community Advisor
December 5, 2024

Hi @nageshraja ,

 

Have you tried debugging contextHub in publish? Try this.

Configure the Adobe Granite ContextHub OSGi service (PID = com.adobe.granite.contexthub.impl.ContextHubImpl) to log detailed Debug messages that are useful when developing.

To configure the service you can either use the Web Console or use a JCR node in the repository:

  • Web Console: To log Debug messages, select the Debug property.
  • JCR node: To log Debug messages, set the boolean com.adobe.granite.contexthub.debug property to true.

Read this Article here, it may help.https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/personalization/configuring-contexthub#debugging-contexthub 

 

Happy Coding,

Aditya

Thanks,Aditya Chabuku
Rohan_Garg
Community Advisor
Rohan_GargCommunity AdvisorAccepted solution
Community Advisor
January 3, 2025

Hi @nageshraja,
Thanks for sending over your filter rules and dispatcher logs. 

Your request /etc/cloudsettings.kernel.js/conf/ctcweb-tenantA/settings/cloudsettings/legacy/contexthub is being answered by Tenant B's farm file and filter rules.

Dispatcher Log for everyone's reference - 

[17/Dec/2024:12:51:00 +0000] [I] [cm-p50252-e1454259-aem-publish-9c97fb757-pt2qc] "GET /etc/cloudsettings.kernel.js/conf/tenantA/settings/cloudsettings/legacy/contexthub" - 11ms [publishfarm-tenantB/-] [actionblocked]

 

It is because of the sandbox program you are currently hosting your project on. The sandbox environment provided in AEM Cloud is intended for testing and development for a specific tenant and doesn’t support a multi-tenant approach out of the box.

 

The best approach would be to migrate this to the production environment and re-test.

Meanwhile, as a workaround just include all the tenants for the request in a single farm file which is currently responding on the sandbox.

Hope this helps!

 

Best Regards,

Rohan Garg