Module unable to determine Solr server URL (Apache Solr module)

Created on 21 October 2024, 3 months ago

Problem/Motivation

I am attempting to upgrade from 7.x-3.11 to 7.x-4.7 and in the process, my connection to the solr server has been lost.

I am getting the error `Could not find a Solr index corresponding to your website and environment. Your subscription contains these indexes: AAAA-123456.prod.mysite. To fix this problem, please read our documentation.`

Unfortunately, "our documentation" does not say anything about this error.

On the ApacheSolr configuration page `admin/config/search/apachesolr/settings/acquia_search_server` under the Acquia Search status for this connection I can clearly see that the value for Solr server URL is incorrect. The Acquia Search module believes it to be empty.

Oddly, the next item in the list reads Solr index is currently reachable and up. which seems like a lie.

Unfortunately, that module has also disabled the Solr server URL field, preventing me from correcting the problem. (I can see the correct URL on my live site, and it is not an empty string)

If I comment out the line in the module that disables this field, I am able to enter the correct URL and then save the form. I can then see the correct URL listed on the search environments landing page admin/config/search/apachesolr/settings. Unfortunately, the error persists, and the module is still unable to determine the URL on the edit page. I suspect this problem also occurs everywhere else my site is attempting to contact the solr server. The problem is much deeper than the edit form, but that's a good place see it fail.

Looking through the code, it appears that this value is always a constant? and is hard-coded to 'http://localhost:8983/solr' instead of using the value provided.

Through some regigering of getUrl() I was able to get the edit form to retrieve and reveal the real value, but the information under Acquia Search status for this connection refuses to update, so the deeper problem remains. :(

I am going to revert back to 7.x-3.11 and cross my fingers that version also works on PHP 8.2.

Steps to reproduce

  1. Set up site successfully on 7.x-3.11.
  2. Update module to 7.x-4.7
  3. Confirm error message: `Could not find a Solr index corresponding to your website and environment. Your subscription contains these indexes: AAA-123456.prod.mysite. To fix this problem, please read our documentation.`

Proposed resolution

fix the bug.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jenlampton

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024