F
F
fursa_victor2019-03-23 16:03:51
elasticsearch
fursa_victor, 2019-03-23 16:03:51

Laradock + elasticsearch why "No alive nodes found in your cluster" error?

Hello! I use 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'

Indexes are created on the dock, elasticsearch works, but as soon as I try to search for something
App\MyModel::search('phone')
->count();
I get error
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",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
"tagline" : "You Know, for Search"
}
[email protected]:/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!
[email protected]: /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.
[email protected]: /var/www$ php artisan elastic:

[email protected]:/var/www$ php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"
Publishing complete.
[email protected]:/var/www$ php artisan elastic:create-index App\\Models\\MyIndexConfigurator
Any idea why?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question