Error while invalidating servlet path in dispatcher | Community
Skip to main content
New Participant
February 29, 2024
Solved

Error while invalidating servlet path in dispatcher

  • February 29, 2024
  • 1 reply
  • 597 views

Custom servlets have been cached in the dispatcher cache. We have a custom service in place to flush these servlet from the dispatcher upon XF replication. However, the below error is encountered during replication of the XF, as our custome servlet path is something similar to /bin/path/to/servlet.

 

*WARN* [sling-threadpool-3de116a9-f775-4f05-a15c-dc60b0f87df5-(apache-sling-job-thread-pool)-1-<main queue>(com/tst/replication/flush)] com.day.cq.replication.impl.ReplicatorImpl User service-user has not enough privileges to replicate /bin

 

Error occurred while flushing resources for paths [/bin/]
com.day.cq.replication.AccessDeniedException: /bin
at com.day.cq.replication.impl.ReplicatorImpl.checkReplicationPermission(ReplicatorImpl.java:811) [com.day.cq.cq-replication:6.2.86.CQ650-B0005]
at com.day.cq.replication.impl.ReplicatorImpl.replicate(ReplicatorImpl.java:463) [com.day.cq.cq-replication:6.2.86.CQ650-B0005]

 

Any suggestions to resolve this issue?

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 sri-abinaya-subramani

Hi @imran__khan ,

 

Thank you for your reply.

The issue has been resolved by enabling the service-user with replication permission.

1 reply

Imran__Khan
New Participant
February 29, 2024

Use DistributionRequest in place of ReplicationAgent to flush:

DistributionRequest distributionRequest = new SimpleDistributionRequest(DistributionRequestType.INVALIDATE,
isDeep, Arrays.asList(pathToFlush).toArray(new String[0]));
if (!Arrays.asList(pathToFlush).isEmpty()) {
DistributionResponse distributionResponse = distributor.distribute(agent,
resolver, distributionRequest);
LOGGER.debug("Distribution message: {}", distributionResponse.getMessage());
}

Please check agent define, is it working fine for /content path... if all are valid and working aprt from bin, please raise Day care ticket
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/error-while-building-replication-content-com-day-cq-replication/m-p/288983 

sri-abinaya-subramaniAuthorAccepted solution
New Participant
March 1, 2024

Hi @imran__khan ,

 

Thank you for your reply.

The issue has been resolved by enabling the service-user with replication permission.