Elasticsearch not showing on browser or via php


(Tushar Chevulkar) #1

I have a centos server wher I have installed Elasticsearch. the installation is done correctly with no changes in elasticsearch.yml i have installed it via RPM and its running perfectly as a service , but he problem is I am not been able to view anything on https://xxxx.com:9200. It says unable to connect. also I am using PHP to acces it via code but PHP code is also not been able to detect Elasticsearch

     <?php
require 'vendor/autoload.php';

$client = ClientBuilder::create()->build();

this code also shows a blank result with no error. I have absolutely no idea what is wrong can any one help.


(David Pilato) #2

If you are using elasticsearch 2.0 and >, you need to define network.host setting.


(Tushar Chevulkar) #3

I am using the latest, I changes network.host to my ip xx.xx.xx.xx but still I am not able to view anything on the browser by typing x.xx.xx.xx:9200 not i am able to connect via php. I get the following error in php

Catchable fatal error:  Argument 1 passed to 
Elasticsearch\Client::__construct() must be an instance of 
Elasticsearch\Transport, array given, called in 
/var/www/html/ElasticClass/Elastic.php on line 8 and defined in /var/www/html/Master/ElasticClass/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php on line 70

(David Pilato) #4

Did you restart the node? Can you show the node logs?


(system) #5