I get this error printed twice on drush commands like cc all. It comes from hook_views_data() in apachesolr_views.views.inc at line 43 when it's calling getFields().

"0" Status: : php_network_getaddresses: getaddrinfo failed: Name or service not known

The cause of this error is that my site has 3 solr environments, 2 of which are inaccessible locally, but are needed for other site environments so they just sit in the database being unused. Apachesolr views attempts to add fields from all environments as views fields. We should allow users to choose which environments to use for apachesolr views fields

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chaunceyt’s picture

I was getting this error also. Here is a patch that addresses the issue.

Thanks

acbramley’s picture

@chaunceyt the outer loop in that function is going over each environment so adding $env_id = apachesolr_default_environment(); is effectively overriding that to loop over the default environment for however many environments there are. This means if there were other environments with different fields they would not be included.