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

Solr 5.x integration with AEM 6.2

Avatar

Avatar
Validate 1
Level 1
khannapiyush36
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
khannapiyush36
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
khannapiyush36
Level 1

25-10-2016

Hi, I'm trying to integrate solr 5.5 with AEM 6.2 but it does not seems to work as per the documentation given on adobe docs: https://docs.adobe.com/docs/en/aem/6-2/deploy/platform/queries-and-indexing.html. Moreover the documentation is relevant to integrate solr 4.x especially the commands to start solr in cloud mode. 

Even when i try to integrate solr 5.5 (by starting them independently & configuring them in Solr configuration) it neither picks up Solr zookeeper nor the cloud instance. Below is the error which i'm facing:

25.10.2016 18:39:26.582 *WARN* [aysnc-index-update-async] org.apache.jackrabbit.oak.plugins.index.solr.server.RemoteSolrServerProvider unable to initialize SolrCloud client for localhost:9983
java.io.IOException: the found SolrCloud server is not alive
    at org.apache.jackrabbit.oak.plugins.index.solr.server.RemoteSolrServerProvider.initializeWithCloudSolrServer(RemoteSolrServerProvider.java:148)
    at org.apache.jackrabbit.oak.plugins.index.solr.server.RemoteSolrServerProvider.getSolrServer(RemoteSolrServerProvider.java:57)
    at org.apache.jackrabbit.oak.plugins.index.solr.server.RemoteSolrServerProvider.getIndexingSolrServer(RemoteSolrServerProvider.java:80)
    at org.apache.jackrabbit.oak.plugins.index.solr.server.OakSolrServer.getServer(OakSolrServer.java:72)
    at org.apache.jackrabbit.oak.plugins.index.solr.server.OakSolrServer.request(OakSolrServer.java:53)
    at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:118)
    at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:116)
    at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:102)
    at org.apache.jackrabbit.oak.plugins.index.solr.index.SolrIndexEditor.leave(SolrIndexEditor.java:121)
    at org.apache.jackrabbit.oak.spi.commit.ProgressNotificationEditor.leave(ProgressNotificationEditor.java:76)
    at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(VisibleEditor.java:63)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:130)
    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
    at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
    at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
    at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
    at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
    at org.apache.jackrabbit.oak.plugins.index.IndexUpdate.enter(IndexUpdate.java:153)
    at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.enter(VisibleEditor.java:57)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:49)
    at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.updateIndex(AsyncIndexUpdate.java:508)
    at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.runWhenPermitted(AsyncIndexUpdate.java:437)
    at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.run(AsyncIndexUpdate.java:321)
    at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:118)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
25.10.2016 18:39:26.584 *WARN* [aysnc-index-update-async] org.apache.jackrabbit.oak.plugins.index.solr.server.RemoteSolrServerProvider unable to initialize Solr HTTP client for [http://localhost:8983/]
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html. <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 404 </title>
</head>
<body>
<h2>HTTP ERROR: 404</h2>
<p>Problem accessing /admin/ping. Reason:
<pre>    Not Found</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>

    at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:459)
    at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:199)
    at org.apache.solr.client.solrj.request.SolrPing.process(SolrPing.java:70)
    at org.apache.solr.client.solrj.SolrServer.ping(SolrServer.java:293)
    at org.apache.jackrabbit.oak.plugins.index.solr.server.RemoteSolrServerProvider.initializeWithExistingHttpServer(RemoteSolrServerProvider.java:98)
    at org.apache.jackrabbit.oak.plugins.index.solr.server.RemoteSolrServerProvider.getSolrServer(RemoteSolrServerProvider.java:65)
    at org.apache.jackrabbit.oak.plugins.index.solr.server.RemoteSolrServerProvider.getIndexingSolrServer(RemoteSolrServerProvider.java:80)
    at org.apache.jackrabbit.oak.plugins.index.solr.server.OakSolrServer.getServer(OakSolrServer.java:72)
    at org.apache.jackrabbit.oak.plugins.index.solr.server.OakSolrServer.request(OakSolrServer.java:53)
    at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:118)
    at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:116)
    at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:102)
    at org.apache.jackrabbit.oak.plugins.index.solr.index.SolrIndexEditor.leave(SolrIndexEditor.java:121)
    at org.apache.jackrabbit.oak.spi.commit.ProgressNotificationEditor.leave(ProgressNotificationEditor.java:76)
    at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.leave(VisibleEditor.java:63)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:130)
    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
    at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
    at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
    at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.childNodeAdded(EditorDiff.java:125)
    at org.apache.jackrabbit.oak.plugins.memory.EmptyNodeState.compareAgainstEmptyState(EmptyNodeState.java:161)
    at org.apache.jackrabbit.oak.plugins.segment.SegmentNodeState.compareAgainstBaseState(SegmentNodeState.java:434)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:52)
    at org.apache.jackrabbit.oak.plugins.index.IndexUpdate.enter(IndexUpdate.java:153)
    at org.apache.jackrabbit.oak.spi.commit.VisibleEditor.enter(VisibleEditor.java:57)
    at org.apache.jackrabbit.oak.spi.commit.EditorDiff.process(EditorDiff.java:49)
    at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.updateIndex(AsyncIndexUpdate.java:508)
    at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.runWhenPermitted(AsyncIndexUpdate.java:437)
    at org.apache.jackrabbit.oak.plugins.index.AsyncIndexUpdate.run(AsyncIndexUpdate.java:321)
    at org.apache.sling.commons.scheduler.impl.QuartzJobExecutor.execute(QuartzJobExecutor.java:118)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

 

I've also attached the screenshot of the configuration in configMgr for Solr. Independently the solr instance is running up perfectly.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,408 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

14-06-2017

I answered a similiar question yesterday. Reason why the 6.2 code was not working onn 6.2 was because it used code that does not work on 6.3. I updated the code that gets a session  in the SolrSearchServiceImpl class to:

Map<String, Object> param = new HashMap<String, Object>();

param.put(ResourceResolverFactory.SUBSERVICE, "datasolr");

ResourceResolver resolver = null;

try {

  //Invoke the adaptTo method to create a Session used to create a QueryManager

    resolver = resolverFactory.getServiceResourceResolver(param);

   session = resolver.adaptTo(Session.class);

Now it works. We will update the artilce starting this week

AEM_SOLR63.png

Answers (6)

Answers (6)

Avatar

Avatar
Level 1
azharu9843294
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
azharu9843294
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
azharu9843294
Level 1

06-06-2018

Thanks for providing the information on Apache SOLR. I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work for you in the future as well.

Avatar

Avatar
Validate 1
Employee
Opkar_Gill
Employee

Likes

138 likes

Total Posts

952 posts

Correct Reply

280 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Employee
Opkar_Gill
Employee

Likes

138 likes

Total Posts

952 posts

Correct Reply

280 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
Opkar_Gill
Employee

15-06-2017

Hi,

when I looked at an integration with AEM and external SOLR, the versoin of Solr supported by AEM was 4.7.1 Best to check with daycare

This doesn't mean it will not work, only that the later versions of SOLR have not been tested.

Regards,

Opkar

Avatar

Avatar
Level 1
stsao
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
stsao
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
stsao
Level 1

14-06-2017

In my configuration I had a SOLR server with a collection/core of oak.

In this case the collection name is oak

The solr path was http://127.0.0.1/solr/oak

The url that will resolve for /admin/ping is /solr/oak/admin/ping.

Hopefully that will help you with your SOLR Configs.

FYI this was with solr 5.0.0.

Avatar

Avatar
Validate 10
Level 3
anilkum
Level 3

Likes

3 likes

Total Posts

65 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 10
Level 3
anilkum
Level 3

Likes

3 likes

Total Posts

65 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
anilkum
Level 3

12-06-2017

Hi,

We are trying to integrate solr using https://helpx.adobe.com/experience-manager/using/aem_solr.html with AEM 6.3. We are able to integrate with AEM 6.2 but facing issues in 6.3. Any pointers?

Thanks,

Anil

Avatar

Avatar
Validate 1
Level 1
khannapiyush36
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
khannapiyush36
Level 1

Likes

0 likes

Total Posts

9 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
khannapiyush36
Level 1

24-05-2017

We had taken the approach, as mentioned in the document https://helpx.adobe.com/experience-manager/using/aem_solr.html. because it uses the SolrJ API so we also used up the same. Since we did not had enough timelines in our project to explore more on "Solr Remote Server" configuration, so we leveraged SolrJ which helped in all versions of Solr (5.x, 6.x)

Avatar

Avatar
Validate 1
Level 2
swathiv54399501
Level 2

Likes

4 likes

Total Posts

39 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile

Avatar
Validate 1
Level 2
swathiv54399501
Level 2

Likes

4 likes

Total Posts

39 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Ignite 3
Ignite 1
Give Back 3
Give Back
View profile
swathiv54399501
Level 2

24-05-2017

Even I am facing the same issue. Did you found the fix?