Replication triggered, but no agent found! | Community
Skip to main content
Level 4
Jun 11, 2018 8:42 AM UTC
Solved

Replication triggered, but no agent found!

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.
joerghoh
joerghohAccepted solution
Employee
Jun 12, 2018 8:27 AM UTC

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

7 replies

Level 6
Jun 12, 2018 1:37 PM UTC

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 .

Translate
joerghoh
joerghohAccepted solution
Employee
Jun 12, 2018 8:27 AM UTC

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

Translate
Level 4
Jun 12, 2018 8:24 AM UTC

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

Translate
joerghoh
Employee
Jun 12, 2018 7:14 AM UTC

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

Translate
Level 4
Jun 12, 2018 7:07 AM UTC

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

Translate
Level 4
Jun 12, 2018 7:04 AM UTC

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 {

Translate
joerghoh
Employee
Jun 11, 2018 7:30 PM UTC

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

regards,

Jörg

Translate