cancel
Showing results for 
Search instead for 
Did you mean: 

solr 4.6 Authentication

Former Member
0 Kudos

Hi,

We are using standalone solr running on Jetty server. To secure this server, we have implemented authentication for the solr UI, by editing web.xml and, jetty.xml. This authentication is successful. But while using search functionality in storefront, getting "Error 401 Unauthorized" error in log.

To fix this, customized DefaultFacetSearchService.java and overridden search() method with HttpClient and using the credentials. But the approach is unsuccessful. If anyone has got idea on this please share.

Thanks, Pricilla

Former Member
0 Kudos

Were you able to solve this issue?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi experts, This happend to me, just chech the solr configuration, the client configuration section https://help.hybris.com/6.7.0/hcd/d13867b756c5484b8db4a02785dfb743.html

I use this users: https://help.hybris.com/6.7.0/hcd/21f689cf7c71485c9a45df03c74064e6.html

Then i ran again the index and works

Regards

former_member618655
Active Participant
0 Kudos

Hi Pricillia, I am not sure if it is an issue with solr 4.6.

Actually, Hybris came up with solr customisation which works best with hybris and as a part of this customisation, they have updated solr.in.cmd file (this is a bat file that starts solr server in the background). In solr.in.cmd file, the credentials are hard coded.
username=solrserver
password=server123

If you provide any other username/password for your properties solrserver.instances.<instance-name>.user
solrserver.instances.<instance-name>.password

You get an error saying

ERROR: Solr requires authentication for https://localhost:8983/solr/admin/info/system. Please supply valid credentials. HTTP code=401

For example if I have 2 tenants foo and bar. I will have 2 property files local_tenant_foo and local_tenant_bar. If you add solrserver properties in these properties, Hybris server doesn't pick up the properties. You will have to add these properties in local.properties file for the global application context to pick up these properties.

Let me know if that helps. Cheers.