Replication agents on publish instances are not configurable | Community
Skip to main content
arturl43391132
New Participant
October 3, 2019
Solved

Replication agents on publish instances are not configurable

  • October 3, 2019
  • 16 replies
  • 6381 views

Hello, AEM Community

I have the following issue: when I click on "edit" in any replication agent on publish instances (on author works fine), the configurable dialog doesn't appear and there is the message in the console:

But dialog is situated under this path.

AEM 6.3.

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 arturl43391132

Hi all of you!

It turned out that Apache Sling Get Servlet is having in configuration "Enable JSON" = false:

Due to this there were 404 requests to request with extensions .json.

Thanks all of you for such active discussions.

16 replies

arturl43391132
New Participant
October 4, 2019

Thanks a lot for your consultation! I agree with you.

joerghoh
Employee
October 4, 2019

In my opinion you should disable it whenever possible on publish. That prevents quite a few angles to extract information from publish instances, often without any negative impact on functionality. There should not be a need to use to configure the replication agents on publish, and the rare occassions you have to you can also use the crxde light to change it directly there.

Jörg

arturl43391132
New Participant
October 4, 2019

Hi, Jörg Hoh

Thanks for your answer. Well, this is a very good question we are thinking about right now. Could you please give an advice:

-Should "enabling JSON"=true be on publish instance? If yes, is it enough to restrict ".json"-requests to security paths in config dispatcher?

Or do you think that it is bad practice to enable json representation on publish instances?

Thanks, Artur.

joerghoh
Employee
October 4, 2019

Please do not open the JSON representation of the default get servlet on publish, because then every URL can be fetched with the .json extension and might be handled by the DefaultGetServlet. And if not properly secured, the .2.json might work as well.

Jörg

arturl43391132
arturl43391132AuthorAccepted solution
New Participant
October 4, 2019

Hi all of you!

It turned out that Apache Sling Get Servlet is having in configuration "Enable JSON" = false:

Due to this there were 404 requests to request with extensions .json.

Thanks all of you for such active discussions.

Employee
October 3, 2019

You should be able to create replication agents on publish instance without any issues. Can you setup a DEBUG logger on "com.day.cq.replication" and check if you get any mor info on why its failing.

Also, try to disable link checker and check by going directly to the Publish instance and by-passing dispatcher

Employee
October 3, 2019

As ka786​ mentioned, what exactly is the use case here? Are you trying to do reverse replication to the author or replicating to another publish?

As a workaround, you can create the agent on the author or any other working publish agent. Create a package of this agent and install the package in a non-working publish instance.

Regards,

Vishu

Employee
October 3, 2019

Hello,

These traversal warnings have nothing to do with the issue at hand.

Looks like query [1] were executed from crxde navigation bar.

Basically, someone might have tried to search in crxde Search bar. Whenever you search in crxde or try to navigate to any path, always put a slash in front.

It is recommended to do search in crx home using Query tool i.e Tools-> Query

[1] *WARN* [qtp1328305755-25342] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 7000 nodes with filter Filter(query=select d.[jcr:path] as [jcr:path], d.[jcr:score] as [jcr:score], d.* from [nt:base] as a inner join [nt:base] as b on ischildnode(b, a) inner join [nt:base] as c on ischildnode(c, b) inner join [nt:base] as d on ischildnode(d, c) where name(a) = 'cq' and name(b) = 'replication' and name(c) = 'components' and name(d) = 'agent' /* xpath: //cq/replication/components/agent */, path=*, property=[:localname=[cq]]); consider creating an index or changing the query

Regards,

Vishu

ArpitVarshney
New Participant
October 3, 2019

Hi,

The url is same for publisher as well(localhost:4503/useradmin).

If you're not able to access the useradmin portal using admin creds as well then I suspect there might be some access issue in admin creds in your publisher.

Please verify first whether you logged in as admin or not?

Regards,

Arpit

Ankur_Khare
New Participant
October 3, 2019

Could you please with the team what they are trying to achieve ? Which we cant achieve configuring agents on author.

Ideally we dont configure agents on publish