Replication triggered, but no agent found! | Community
Skip to main content
Level 4
June 11, 2018
Solved

Replication triggered, but no agent found!

  • June 11, 2018
  • 7 replies
  • 8756 views

Hi guys!

I'm on this journey trying to learn AEM and I got stuck into this error.

I really can't seem to understand what is related to ?!

Let me explain how I get it.

After I register on a website, I get this email with the activation link. Once I follow the link I should get my account activated but when I acces the link i get this error message.

Replication triggered, but no agent found!

Cannot serve request to /bin/validateEmail in com.blabla.blabla.core.servlets.impl.EmailValidationServlet

I know if I access this link I can get to configure the agents. but I don't understand how things work and what should I configure.

http://localhost:4502/etc/replication/agents.author/publish.html

Any help would be highly appreciated

PS: I am using AEM 6.2

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

Maybe no replication agent is configured with the "on distribute" trigger?

7 replies

joerghoh
Adobe Employee
Adobe Employee
June 11, 2018

Can you please share the code of "com.blabla.blabla.core.servlets.impl.EmailValidationServlet"?

regards,

Jörg

Level 4
June 12, 2018

Yeah :

private static final String TOKEN = "token";
private static final String REDIRECT_AWAITING_APPROVAL = "/content/demo/login.html?content=waiting_approval";
private static final String REDIRECT_AUTOAPPROVED = "/content/demo/login.html?content=approved;

protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException {

Level 4
June 12, 2018

Session session = null;

User user = TokenUtils.getUserByRegistrationToken(session, ServletUtils.getRequiredParameter(TOKEN, request));

replicateWorkflowNode(session, user);

private void replicateWorkflowNode(Session session, User user) throws Exception {

  ReplicationOptions replicationOptions = new ReplicationOptions();
   replicationOptions.setFilter(new AgentFilter() {

   @Override
   public boolean isIncluded(Agent agent) {

   return agent.getConfiguration().isTriggeredOnDistribute();
   }

  });
   replicationOptions.setSynchronous(true);
   replicator.replicate(session, ReplicationActionType.ACTIVATE, WorkflowUtils.createWorkflowNode(session, user).getPath(), replicationOptions);

joerghoh
Adobe Employee
Adobe Employee
June 12, 2018

Looks like the AgentFilter returns "false" for all agents.

Level 4
June 12, 2018

Hmm, and what does that mean?
My agents are badly configured or inexistent ?

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
June 12, 2018

Maybe no replication agent is configured with the "on distribute" trigger?

Level 6
June 12, 2018

As suggested by Jorg , on trigger section select "on distribute" .

Also create logger for both in DEBUG mode

com.day.cq.replication  # to analyse issue on Replication

org.apache.sling.event # to analyse issue from Sling end

Please share if still issue not identified .