@fursa_victor

Laradock + elasticsearch почему ошибка «No alive nodes found in your cluster»?

Всем привет! Использую scout-elasticsearch-driver + Laradock + elasticsearch

<?php
//scout_elastic.php
return [
    'client' => [
        'hosts' => [
           'elasticsearch',
        ]
    ],

    'update_mapping' => env('SCOUT_ELASTIC_UPDATE_MAPPING', true),
    'indexer' => env('SCOUT_ELASTIC_INDEXER', 'single'),
    'document_refresh' => env('SCOUT_ELASTIC_DOCUMENT_REFRESH')
];


//scout.php
'driver' => elastic'


По доке индексы создаются, elasticsearch работает, но как только пытаюсь что-то искать
App\MyModel::search('phone')
->count();
получаю ошибку

Elasticsearch \ Common \ Exceptions \ NoNodesAvailableException
No alive nodes found in your cluster


localhost:9200
{
"name" : "oOa2O2Z",
"cluster_name" : "laradock-cluster",
"cluster_uuid" : "oF0BkqrgToWiVBm3skQOXw",
"version" : {
"number" : "6.6.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "a9861f4",
"build_date" : "2019-01-24T11:27:09.439740Z",
"build_snapshot" : false,
"lucene_version" : "7.6.0",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}

laradock@307c04d87109:/var/www$ php artisan elastic:create-index App\\Models\\MyIndexConfigurator
The advert_index index was created!
The advert_index_write alias for the advert_index index was created!
laradock@307c04d87109:/var/www$ php artisan scout:import "App\Models\Advert"
Imported [App\Models\Advert] models up to ID: 60
All [App\Models\Advert] records have been imported.
laradock@307c04d87109:/var/www$ php artisan elastic:update-mapping App\\Models\\Advert
The advert_index mapping was updated!
laradock@307c04d87109:/var/www$ php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
Publishing complete.
laradock@307c04d87109:/var/www$ php artisan elastic:create-index App\\Models\\MyIndexConfigurator

Есть идеи почему так ?
  • Вопрос задан
  • 365 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы