I have an Aegir setup where I install multiple sites from the administration, and do various tasks that in the backend call Drush. I have Apachesolr and Apachesolr Views in my build. When Apachesolr Views is installed, it calls the
$solr_fields = $solr->getFields(0);
to build the available views handlers. Unfortunately, at this point the solr core is not configured properly, and there are two watchdog errors, which are also handled as errors by Drush:
WD Apache Solr: HTTP Status: 0; Message: Request failed: Connection refused; Response: ; Request: Unknown; Caller: apachesolr_views_views_data() (line 43 of [error]
.../sites/all/modules/contrib/apachesolr_views/apachesolr_views.views.inc)
WD Apache Solr Views: HTTP 0; Request failed: Connection refused [error]
WD Apache Solr: HTTP Status: 0; Message: Request failed: Connection refused; Response: ; Request: Unknown;
One is from apachesolr_views_views_data(), the other from DrupalApacheSolrService::checkResponse().
The problem is that drush hooks itself on watchdog and outputs error on WATCHDOG_ERROR. Then the Aegir task fails to complete.
Comment | File | Size | Author |
---|---|---|---|
#1 | drush_site_install_errors-apachesolr-2194539-1.patch | 514 bytes | MiroslavBanov |
Comments
Comment #1
MiroslavBanov CreditAttribution: MiroslavBanov commentedI have added the related issue in Apachesolr view. I patch it by changing the severity to warning in both modules, which allows the drush site install to finish.
Comment #2
Grayside CreditAttribution: Grayside commentedSOLR not being available is definitely an error except in the context of an incompletely set up Drupal site. Applying this patch would be an operational bug.
Comment #3
MiroslavBanov CreditAttribution: MiroslavBanov commented@Grayside
Then how do you suppose this can be fixed?
apachesolr_install()
configures the environment with the localhost server:db_insert('apachesolr_environment')->fields(array('env_id' => 'solr', 'name' => 'localhost server', 'url' => 'http://localhost:8983/solr'))->execute();
It's assumed that there is a Solr configured and working on localhost? But that being unavailable is an error?
Edit: Just to clarify - my Solr is not on localhost.
Comment #4
Grayside CreditAttribution: Grayside commentedIf I knew, I wouldn't have moved enabling apachesolr after the main drush si in my install script.