Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Replication triggered, but no agent found!

demd43642519
Level 4
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
Jörg_Hoh
Correct answer by
Employee
Employee

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

View solution in original post

0 Replies
Jörg_Hoh
Employee
Employee

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

regards,

Jörg

demd43642519
Level 4
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 {

demd43642519
Level 4
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);

Jörg_Hoh
Employee
Employee

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

demd43642519
Level 4
Level 4

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

Jörg_Hoh
Correct answer by
Employee
Employee

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

View solution in original post

Gokul2011
Level 6
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 .