Expand my Community achievements bar.

SOLVED

Error while invalidating servlet path in dispatcher

Avatar

Level 1

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?

1 Accepted Solution

Avatar

Correct answer by
Level 1

Hi @Imran__Khan ,

 

Thank you for your reply.

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

View solution in original post

2 Replies

Avatar

Community Advisor

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

Avatar

Correct answer by
Level 1

Hi @Imran__Khan ,

 

Thank you for your reply.

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