msgphp / symfony-demo-app

A Symfony demo application with basic user management
https://github.com/msgphp/msgphp
MIT License
0 stars 0 forks source link

No alive nodes found in your cluster error #76

Closed spetrey closed 5 years ago

spetrey commented 5 years ago

When running bin/reinstall it completes, but my console prints:

...
In StaticNoPingConnectionPool.php line 51:

No alive nodes found in your cluster
...

Subsequently, user registration fails with the NoNodesException:

No alive nodes found in your cluster

How do I run/install Elasticsearch to get around this error?

spetrey commented 5 years ago

FWIW, installing with lando start && lando ssh -c bin/reinstall — I do not encounter the error, but instead received the following error:

An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused

😞

ro0NL commented 5 years ago

Hi @smpetrey

For the first case, can you try

sysctl -w vm.max_map_count=262144

If i remember well, i had to run this once. Or at least grep vm.max_map_count /etc/sysctl.conf confirms i did :)

With Lando the database should work out of the box :thinking: did you configure the DATABASE_URL correctly, using Lando it should be:

DATABASE_URL='mysql://lemp:lemp@database:3306/lemp?charset=utf8mb4&serverVersion=5.7'

Let me know if it works and we can get add a small troubleshooting section. Also im using Lando v3.0.0-rc.9.

ro0NL commented 5 years ago

Having elasticsearch setup is required currently, im assuming you've setup some docker environment to host elasticsearch:9200. See also https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html

With Lando it should work :) but the VM setting might still be needed.

I'm investigating how to make elasticsearch optional still :thinking:

spetrey commented 5 years ago

Oh nice! I forgot to change my DATABASE_URL creds back in the .env to work with Lando. 👍

ro0NL commented 5 years ago

Great. All good then?

ro0NL commented 5 years ago

i just reproduced the "No alive clusters" on a different machine, and can confirm setting sysctl -w vm.max_map_count=262144 solves it.

Closing, thanks for reporting.