matchish / laravel-scout-elasticsearch

Search among multiple models with ElasticSearch and Laravel Scout
MIT License
702 stars 113 forks source link

"current.health":"RED","message":"Cluster health status changed from [YELLOW] to [RED] #256

Closed sven-ahrens closed 1 year ago

sven-ahrens commented 1 year ago

describe the problem

I've set up Elasticsearch 8.8 with Laravel 9x and docker. I'm using the single-node type and used Searchable on a Model to get started.

Now I wanted to see, if the creation works by simple using the command php artisan scout:import but the import fails with the following error:

No alive nodes. All the 1 nodes seem to be down.

This ocurrs because elastic search changes it's health status:

"current.health":"RED","message":"Cluster health status changed from [YELLOW] to [RED] (reason: [index [products_1691588380] created]).","previous.health":"YELLOW","reason":"index [products_1691588380] created"

What's weird is, that the first step 1/5 works just fine but it breaks when 2/5 happens (Create write index)

Bildschirmfoto 2023-08-09 um 15 52 05

Expected behavior Actually I thought that the command would automatically import the data to elasticsearch and just work

Additional context my docker-compose.ymlconfiguration:

elasticsearch:
    image: 'elasticsearch:8.8.1'
    environment:
        - discovery.type=single-node
        - xpack.security.enabled=false
        - xpack.security.transport.ssl.enabled=false
    ports:
        - '63004:9200'
        - '63005:9300'

Version

sven-ahrens commented 1 year ago

Sorry that I bothered you guys with that. It's not a bug with the package itself.

My docker system hadn't enough memory & disk space that it could use, so it moved the shards

high disk watermark [90%] exceeded [...] shards will be relocated away from this node

So if anyone else encounteres the same issue, that's probably it :)