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
BedrockMission!

Learn More

View all

Sign in to view all badges

Programmatic replication not working in AEM 6.5

Avatar

Avatar
Level 1
srikanthpogula
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
srikanthpogula
Level 1

Likes

0 likes

Total Posts

5 posts

Correct Reply

0 solutions
View profile
srikanthpogula
Level 1

16-03-2021

Hi,

We are replicating content to one of the publish instance via custom workflow step (sling:resourceType=dam/components/workflow/publish-with-replication-agent). We also have dedicated replication agent for this purpose and the connection is successful.\

In custom workflow process step, we had given value for field Replication Agent ID as replication agent name i.e if replication agent is https://<<hostname>>/etc/replication/agents.author/publish3.html, then Replication Agent ID=publish3.
While initiating this workflow for a page, we see below exception in error log

16.03.2021 07:26:28.961 *ERROR* [JobHandler: /var/workflow/instances/server2/2021-03-15/publish-to-china-server_2:/content/mycompany/zh/home] org.apache.jackrabbit.oak.plugins.blob.AbstractSharedCachingDataStore Error retrieving record [3b6ae754b20a8050a6683bf8f705db91dbdf5074cf7892b50d92f4a7a176dbca]
org.apache.jackrabbit.core.data.DataStoreException: com.amazonaws.services.s3.model.AmazonS3Exception: Not Found (Service: Amazon S3; Status Code: 404; Error Code: 404 Not Found; Request ID: DB09G0BSZH60YVSB; S3 Extended Request ID: wsxDwz+E9FkqFoA9AvlAvfwz5IGFAgUeMYFJv7rw9gkYLL0OZ+5Hb3o7py8njQkV0bOQ1dM34nA=), S3 Extended Request ID: wsxDwz+E9FkqFoA9AvlAvfwz5IGFAgUeMYFJv7rw9gkYLL0OZ+5Hb3o7py8njQkV0bOQ1dM34nA=
at org.apache.jackrabbit.oak.blob.cloud.s3.S3Backend.getRecord(S3Backend.java:638) [org.apache.jackrabbit.oak-blob-cloud:1.10.5]
at org.apache.jackrabbit.oak.plugins.blob.AbstractSharedCachingDataStore.getRecordIfStored(AbstractSharedCachingDataStore.java:210) [org.apache.jackrabbit.oak-blob-plugins:1.22.3]
at org.apache.jackrabbit.oak.plugins.blob.AbstractSharedCachingDataStore.getRecord(AbstractSharedCachingDataStore.java:188)

programmatic replication replication workflow

Accepted Solutions (0)

Answers (5)

Answers (5)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,112 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,112 likes

Total Posts

3,145 posts

Correct Reply

1,072 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

17-03-2021

Hi,

 

Can you please share complete stacktrace? It seems that at some point the workflow is accessing the S3 datastore, but it cannot find a binary. It would be interesting to know, at which point in the process it fails to identify the missing blob. 

Does this error re-appear, if you try it some minutes later at the same path with the same settings?

Avatar

Avatar
Ignite 1
Level 3
khamat_bn
Level 3

Likes

31 likes

Total Posts

54 posts

Correct Reply

12 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Ignite 1
Level 3
khamat_bn
Level 3

Likes

31 likes

Total Posts

54 posts

Correct Reply

12 solutions
Top badges earned
Ignite 1
Give Back 3
Give Back
Boost 5
Boost 3
View profile
khamat_bn
Level 3

16-03-2021

Hi,

Can you check the s3 bucket configuration, I can see 404 in it, 

org.apache.jackrabbit.core.data.DataStoreException: com.amazonaws.services.s3.model.AmazonS3Exception: Not Found (Service: Amazon S3; Status Code: 404; Error Code: 404 Not Found;

Avatar

Avatar
Coach
Employee
jbrar
Employee

Likes

387 likes

Total Posts

869 posts

Correct Reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile

Avatar
Coach
Employee
jbrar
Employee

Likes

387 likes

Total Posts

869 posts

Correct Reply

283 solutions
Top badges earned
Coach
Establish
Give Back 50
Give Back 5
Give Back 3
View profile
jbrar
Employee

16-03-2021

Checking the error[1] , it seems like an issue with the S3 config. Do you see the same issue when replication is triggered manually?

 

Also, setup a DEBUG logger on "com.day.cq.replication" to see if the issue is related to the replication bundle. Lastly, as others mentioned, try adding the service user used for workflow in the adminstrators group.

 

 

[1] 16.03.2021 07:26:28.961 *ERROR* [JobHandler: /var/workflow/instances/server2/2021-03-15/publish-to-china-server_2:/content/mycompany/zh/home] org.apache.jackrabbit.oak.plugins.blob.AbstractSharedCachingDataStore Error retrieving record [3b6ae754b20a8050a6683bf8f705db91dbdf5074cf7892b50d92f4a7a176dbca]
org.apache.jackrabbit.core.data.DataStoreException: com.amazonaws.services.s3.model.AmazonS3Exception: Not Found (Service: Amazon S3; Status Code: 404; Error Code: 404 Not Found; Request ID: DB09G0BSZH60YVSB; S3 Extended Request ID:

Avatar

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct Reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile

Avatar
Springboard
Level 4
bilal_ahmad
Level 4

Likes

66 likes

Total Posts

108 posts

Correct Reply

16 solutions
Top badges earned
Springboard
Validate 10
Validate 1
Ignite 1
Establish
View profile
bilal_ahmad
Level 4

16-03-2021

Hello @srikanthpogula  try this :
1. shut down the AEM instance
2. run offline TAR compaction
3. restart AEM instance

Also, please take a look at your system-user whether it has necessary access permissions. Post all this, if this doesn't work, could you share the complete log(once you replicate the content/start of the workflow process)

Thanks!

Avatar

Avatar
Establish
Level 4
Rohit_Utreja
Level 4

Likes

44 likes

Total Posts

45 posts

Correct Reply

15 solutions
Top badges earned
Establish
Give Back 3
Give Back
Boost 5
Boost 3
View profile

Avatar
Establish
Level 4
Rohit_Utreja
Level 4

Likes

44 likes

Total Posts

45 posts

Correct Reply

15 solutions
Top badges earned
Establish
Give Back 3
Give Back
Boost 5
Boost 3
View profile
Rohit_Utreja
Level 4

16-03-2021

Hi @srikanthpogula ,

 

Need more information for a clear understanding. 

  1. What kind of session has been used to replicate programmatically.
  2. If you are using the system user to maintain the session then this system user should have the appropriate access.
  3. Or, is there any other way, this replication has been implemented.