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.
SOLVED

Replication triggered, but no agent found!

Avatar

Level 4

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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

View solution in original post

7 Replies

Avatar

Employee Advisor

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

regards,

Jörg

Avatar

Level 4

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 {

Avatar

Level 4

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);

Avatar

Employee Advisor

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

Avatar

Level 4

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

Avatar

Correct answer by
Employee Advisor

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

Avatar

Level 6

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 .