Reputation: 606
I am new at elastic search and have very little knowledge about it. I have integrated elasticsearch with laravel 5.4. The serch was working fine in my localhost but after uploading the project to the server(Shared Hosting) it was giving me the following error
NoNodesAvailableException in StaticNoPingConnectionPool.php line 51: No alive nodes found in your cluster
After I reconfigured the .env file like this
ELASTICSEARCH_INDEX=scout
ELASTICSEARCH_HOST=http://localhost
ELASTICSEARCH_PORT=9300
it worked fine. But don't know why later it didn't worked and gave me the same error. I know this might sound ridiculous but someone please help me.
Upvotes: 0
Views: 1865
Reputation: 217334
You need to use port 9200 for HTTP communication. 9300 is for TCP communication. That's most probably the only issue.
ELASTICSEARCH_INDEX=scout
ELASTICSEARCH_HOST=http://localhost
ELASTICSEARCH_PORT=9200 <-- change this line
Upvotes: 0
Reputation: 12410
Can you verify that the Elasticsearch search server is available on localhost:9300 when accessing it via curl/Postman/Fiddler?
That error usually means the node is either not running, or not running on the configured port.
Upvotes: 0