Smart Trainings for custom tags are failing
Description description
Environment
AEM as a Cloud Service
Issue/Symptoms
You follow the steps in [
1]
to enable Smart tagging (Smart content service) creating an AIO project and also a Legacy cloud configuration in AEM.
After completing the smart tagging integration, you try creating a Smart Tag training for your custom tags - [
2]
but every training fail with an error [
3]
present in the logs.
[
1]
Custom Smart Tags for images
[
2]
Train the model for your custom tags
[
3]
ERROR[ sling-threadpool-39aa0b87-e4ff-4521-b2c7-fce7134e4e4d-(apache-sling-job-thread-pool)-34-Granite Workflow External Process Polling Queue(com/adobe/granite/workflow/external/polling/event)] com.day.cq.dam.similaritysearch.internal.workflow.process.DoTrainingProcess Error while checking for training status for jobId 64df73a9f768e24a117590e7
com.day.cq.dam.similaritysearch.internal.SimilaritySearchException: com.day.cq.dam.similaritysearch.internal.SimilaritySearchException: Service returned an error: HTTP/1.1 403 Forbidden
at com.day.cq.dam.similaritysearch.internal.impl.SCSTrainingClientImpl.hasFinishedTraining(SCSTrainingClientImpl.java:203) [ com.day.cq.dam.cq-dam-similaritysearch:5.13.64]
at com.day.cq.dam.similaritysearch.internal.workflow.process.DoTrainingProcess.hasFinished(DoTrainingProcess.java:95) [ com.day.cq.dam.cq-dam-similaritysearch:5.13.64]
at com.day.cq.workflow.compatibility.CQWorkflowExtProcessProxy.hasFinished(CQWorkflowExtProcessProxy.java:82) [ com.day.cq.workflow.cq-workflow-impl:6.3.18]
at com.adobe.granite.workflow.core.util.WEPProxyHolder.hasFinished(WEPProxyHolder.java:46) [ com.adobe.granite.workflow.core:2.1.100]
at com.adobe.granite.workflow.core.job.ExternalProcessPollingHandler.process(ExternalProcessPollingHandler.java:119) [ com.adobe.granite.workflow.core:2.1.100]
at org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502) [ org.apache.sling.event:4.3.8]
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:351) [ org.apache.sling.event:4.3.8]
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60) [ org.apache.sling.event:4.3.8]
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:287) [ org.apache.sling.event:4.3.8]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.day.cq.dam.similaritysearch.internal.SimilaritySearchException: Service returned an error: HTTP/1.1 403 Forbidden
Resolution resolution
The documentation that you followed to integrate AEM with Smart Content is for AEM on premise version 6.5.
For AEM as a Cloud Service, there is no need to manually configure the integration (creation of AIO project and legacy cloud config). For AEMaaCS, it works out of the box without any cloud configuration being added manually.
After removing the legacy cloud configuration, the smart training for custom tags should complete successfully.
RCA:
The legacy cloud configuration created by the customer interfered with the OOTB integration causing the SimilaritySearchException
and leading thus to filed trainings.
The legacy cloud configurations are located under /etc/cloudconfigs
. In a Production environment, there is no access to crx/de
to remove it directly. Therefore, in AEMaaCS, for a production environment the legacy cloud configurations must be removed through a deployment.