geerlingguy / jeffgeerling-com

Drupal Codebase for JeffGeerling.com
https://www.jeffgeerling.com
GNU General Public License v2.0
41 stars 2 forks source link

Migration fails on solr indexing #67

Closed geerlingguy closed 4 years ago

geerlingguy commented 4 years ago

During migration, now, I get a failure with the current settings, since #54 was completed:

 [error]  Drupal\search_api_solr\SearchApiSolrException while indexing: Solr endpoint http://solr-1181.hostedapachesolr.com:80/ access denied (401). <html>
<head><title>401 Authorization Required</title></head>
<body bgcolor="white">
<center><h1>401 Authorization Required</h1></center>
<hr><center>nginx/1.10.3 (Ubuntu)</center>
</body>
</html>
 in Drupal\search_api_solr\SolrConnector\SolrConnectorPluginBase->handleHttpException() (line 894 of /var/www/html/web/modules/contrib/search_api_solr/src/SolrConnector/SolrConnectorPluginBase.php). 
 [error]  Drupal\search_api_solr\SearchApiSolrException while trying to index items on Site Content: Solr endpoint http://solr-1181.hostedapachesolr.com:80/ access denied (401). <html>
<head><title>401 Authorization Required</title></head>
<body bgcolor="white">
<center><h1>401 Authorization Required</h1></center>
<hr><center>nginx/1.10.3 (Ubuntu)</center>
</body>
</html>
 in Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend->indexItems() (line 998 of /var/www/html/web/modules/contrib/search_api_solr/src/Plugin/search_api/backend/SearchApiSolrBackend.php).

I wonder if I might want to have the index disabled for now, until after we complete the final migration. I can manually enable it and enter the password in production.

I still will run into Prevent password from being stored in configuration, though. Maybe figure out a way to get that fixed...

And maybe also add a local solr container running https://hub.docker.com/r/geerlingguy/solr/

geerlingguy commented 4 years ago

Just noting that if I run the migration a 2nd time (without --update) it works... so maybe just a small annoyance for now. But I would like to have a local Solr instance for local testing...

geerlingguy commented 4 years ago

This seems to have been fixed by adding the following configuration inside my settings.local.php:

$config['search_api.server.hosted_apache_solr'] = [
  'backend_config' => [
    'connector_config' => [
      'host' => 'solr-1181.hostedapachesolr.com',
      'path' => '/',
      'core' => '5hE5u_jeffgeerling_com',
      'port' => '80',
      'username' => '1181',
      'password' => 'REDACTED',
    ],
  ],
];