Hi,
I'm using elasticsearch 5.2.2 with Laravel 5.4 and homestead and I get the following error when I browse http://pr3.app:8000
NoNodesAvailableException in StaticNoPingConnectionPool.php line 51:
No alive nodes found in your cluster
All reaserch on this error led me to this advice from Zachary Tong.
It is advised to correct the certificate. But why do I need it if I'm accessing ES using http only?
Plus it is really not clear how I can set a different self-signed certificate from than the one that came with curl.
Configuration
-
platform : win10.
-
curl version 7.53.1
-
In composer.json, I've added to the require list
"elasticsearch/elasticsearch": "~5.0"
. -
Then I run the command
composer update
. -
To test Elasticsearch, I've written the following in
routes/web.php
Route::get('/', function () { $es = Elasticsearch\ClientBuilder::create() ->setHosts(['pr3.app:9200']) ->build(); $indexed = $es->index([ 'index' => 'people', 'type' => 'persons', 'body' => [ 'firstName' => 'John', 'lastName' => 'Doe', 'gender' => 'male', ], ]); });
-
using a browser, curl or postman, http://pr3.app:9200 always return:
{
"name": "FAkNvtq",
"cluster_name": "elasticsearch",
"cluster_uuid": "M5pNi9p0TF2udk7DNwcFZQ",
"version": {
"number": "5.2.2",
"build_hash": "f9d9b74",
"build_date": "2017-02-24T17:26:45.835Z",
"build_snapshot": false,
"lucene_version": "6.4.1"
},
"tagline": "You Know, for Search"
} -
I am able to index/search documents using postman, but not with php so far.
-
when I try
curl https://pr3.app:9200
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number
What am I missing in my config?