zepgram / magento2-fast-vm

Optimal vagrant developer box for Magento2. Folders synced by nfs/rsync. This box includes Magento developer utilities.
MIT License
110 stars 35 forks source link

No alive nodes found in your cluster #69

Closed srgrbkl closed 4 years ago

srgrbkl commented 4 years ago

i have error in magento 2.4.0 Elasticsearch: No alive nodes found in your cluster i use these settings: Screenshot_1

srgrbkl commented 4 years ago

service elasticsearch start - helped me, but it is inconvenient to enter this command every time when 'vagrant up'

srgrbkl commented 4 years ago

I think need to add these commands to shell file: sudo /bin/systemctl daemon-reload sudo /bin/systemctl enable elasticsearch.service

zepgram commented 4 years ago

Can you tell me what is the value of "JAVA_HOME" in your /etc/default/elasticsearch ?

On elasticsearch7 it must be: "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre"

I had this issue but it should be solved here: https://github.com/zepgram/magento2-fast-vm/blob/master/provision/020-system-services.sh#L212

srgrbkl commented 4 years ago

correct, i have same value by default: "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre" but i still get notification

zepgram commented 4 years ago

This command is supposed to be run 1 time, then at every start up the service is started, according to elasticsearch doc https://www.elastic.co/guide/en/elasticsearch/reference/7.x/deb.html#deb-running-systemd:

sudo /bin/systemctl daemon-reload
sudo /bin/systemctl enable elasticsearch.service

And it's done here: https://github.com/zepgram/magento2-fast-vm/blob/master/provision/020-system-services.sh#L214

srgrbkl commented 4 years ago

you're right, but after research, I noticed that elasticsearch spontaneously turns off. maybe it depends on the specific development environment and if you don't have a solution I'll close the ticket. log have this string: Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[project+_product_1_v1][4]] ...]). Desired survivor size 4358144 bytes, new threshold 6 (max 6)

zepgram commented 4 years ago

I found out a way to do this here: https://github.com/elastic/ansible-elasticsearch/issues/371

Could you run this and confirm this is working ? I'll create a new tag if it works.

mkdir /etc/systemd/system/elasticsearch.service.d
cat <<'EOF' > /etc/systemd/system/elasticsearch.service.d/override.conf
[Service]
Restart=always
EOF
/bin/systemctl daemon-reload
/bin/systemctl enable elasticsearch.service
/bin/systemctl start elasticsearch.service