I´ve just installed Websolr and tested the connection, and works. But nothing gets indexed. I´ve got a drupal 7 site, and when I click the configuration files tab, I get this error:

"401" Status: Authorization Required: Authorization Required<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML>
<HEAD>
<TITLE>Error</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
</HEAD>
<BODY><H1>401 Unauthorised.</H1></BODY>
</HTML>

My logs don´t show anything.
What can I do?

Thanks!

Comments

mkalkbrenner’s picture

Priority: Critical » Minor

Seems like the connect requires basic authentication. Try to add your credentials to the Solr server URL:
https://user:password@www.example.com/

Rob Sears-1’s picture

This is a known issue with the way the apachesolr module interacts with websolr. There is a temporary fix available and we're working to push out a better long term solution shortly.

nz’s picture

Websolr cofounder here. I'd love to get some feedback from one of the module developers so I can better understand what's going on in this particular case from the module's end.

On our end, we're limiting the access to stats.jsp due to a general preference to avoid exposing system level statistics in our shared clusters. And stats.jsp has quite a lot to share about the server that it's running on.

It looks like the module is somewhat tolerant of an empty response here, it's just the flat-out 401 that is causing an error message. We're considering sending back a 200 with a more or less empty XML response in it to get past this. Does that sound like a reasonable workaround on our end?

Alternatively, could the conditionals around this stats check be loosened up a bit? Or perhaps instead defer to /admin/luke to determine some of the more basic index stats, like number of documents and the size of the index?

Feedback welcome :)

—Nick

Rosamunda’s picture

Status: Active » Postponed

Thanks!

pwolanin’s picture

Status: Postponed » Active

there are a number of values that don't seem to be available from Luke, but an empty 200 might at least be less ugly.

For Solr 4 we are currently trying to use admin/mbeans instead of admin/stats.jsp, so I'm not sure whether that exposes less info?

We could explore using that for Solr 3 as an option in the module.

pbuyle’s picture

WebSolr also report 401 error on admin/system.

alex.bukach’s picture

Issue summary: View changes

Same issue. Search API Solr tries to check Solr version at admin/system with 401 code.

nick_vh’s picture

Search API Solr is not something we can solve here. Websolr should at least give you access to admin/system