I'm using drupal-7.53 with elasticsearch_connector (7.x-1.0-alpha9):

# drush -r . -l alexustest pm-list | grep Elasticsearch
 Core                  Elasticsearch Connector Statistics    Module  Not installed  7.x-1.0- 
 Elasticsearch         Elasticsearch Connector               Module  Enabled        7.x-1.0- 
 Elasticsearch         Elasticsearch Connector Devel         Module  Enabled        7.x-1.0- 
 Elasticsearch         Elasticsearch Connector Easy Install  Module  Enabled        7.x-1.0- 
 Elasticsearch         Elasticsearch Connector Search API    Module  Not installed  7.x-1.0- 
 Elasticsearch         Elasticsearch Connector Sequence      Module  Not installed  7.x-1.0- 
 Elasticsearch         Elasticsearch Connector Views (NOT    Module  Not installed  7.x-1.0- 
 Elasticsearch         Elasticsearch Watchdog                Module  Disabled       7.x-1.0- 
# 

While adding "Elasticsearch Clusters", I'm getting following message:

Cannot connect to the cluster!

and even though I enabled "Elasticsearch Connector Easy Install", I couldn't find anything relevant to this module (where/how to do easy install)

Please advice.

Thank you in advance!

Comments

alexus created an issue. See original summary.

alexus’s picture

getting following messages via syslog

Dec 16 10:40:27 wcmisdlin02 drupal: http://alexustest|1481902827|php|172.16.0.140|http://alexustest/?q=admin/config/elasticsearch-connector/clusters/add|http://alexustest/?q=admin/config/elasticsearch-connector/clusters/add|1||Notice: Undefined index: status in elasticsearch_connector_check_status() (line 842 of /var/www/html/drupal-7.53/sites/all/modules/elasticsearch_connector/elasticsearch_connector.module).
Dec 16 10:40:27 wcmisdlin02 drupal: http://alexustest|1481902827|php|172.16.0.140|http://alexustest/?q=admin/config/elasticsearch-connector/clusters/add|http://alexustest/?q=admin/config/elasticsearch-connector/clusters/add|1||Notice: Undefined index: status in elasticsearch_connector_check_status() (line 842 of /var/www/html/drupal-7.53/sites/all/modules/elasticsearch_connector/elasticsearch_connector.module).
Dec 16 10:40:27 wcmisdlin02 drupal: http://alexustest|1481902827|php|172.16.0.140|http://alexustest/?q=admin/config/elasticsearch-connector/clusters/add|http://alexustest/?q=admin/config/elasticsearch-connector/clusters/add|1||Notice: Undefined index: status in elasticsearch_connector_check_status() (line 842 of /var/www/html/drupal-7.53/sites/all/modules/elasticsearch_connector/elasticsearch_connector.module).

from shell

$ curl http://localhost:9200
{
  "name" : "GWw4o4W",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "XMTRNGWaQrG1EUUaL90UJA",
  "version" : {
    "number" : "5.0.0",
    "build_hash" : "253032b",
    "build_date" : "2016-10-26T05:11:34.737Z",
    "build_snapshot" : false,
    "lucene_version" : "6.2.0"
  },
  "tagline" : "You Know, for Search"
}
$ 
skek’s picture

@alexus,

You are using version 5.0 of Elasticsearch and this version is not supported by 7.x module yet.
There is a patch for Elasticsearch 2.x server version but it is still not fully usable. See the module description page with versioning info for more details about this.
We will start work on 5.x maybe the beginning of next year.

drupali’s picture

I am using drupal-7.25 with elastic search connector 7.x-1.0-alpha9.

I am getting following error while adding "Elasticsearch Cluster"
"Cannot connect to the cluster!"

Please advice !

curl localhost:9200
{
  "status" : 200,
  "name" : "Bloodstorm",
  "cluster_name" : "elasticsearch",
  "version" : {
    "number" : "1.7.3",
    "build_hash" : "05d4530971ef0ea46d0f4fa6ee64dbc8df659682",
    "build_timestamp" : "2015-10-15T09:14:17Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}
skek’s picture

@alexus,

Please follow this issue for the integration with 5.x Elasticsearch server - https://www.drupal.org/node/2842993.

@Drupali, can you please go to you Drupal status page and see if everything with the Elasticsearch client is OK?
This error should be connected with something on HTTP connection to the Elasticsearch.

alexus’s picture

I tried again and even though I'm still getting an error:

Error message
Cannot connect to the cluster!

my logs are different from last time I tried:

10.52.208.221 - - [07/Feb/2017:17:35:56 +0000] "POST /admin/config/elasticsearch-connector/clusters/add HTTP/1.1" 200 4654 "http://drupal.X.dev/admin/config/elasticsearch-connector/clusters/add" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
10.52.208.221 - - [07/Feb/2017:17:35:56 +0000] "GET /sites/all/modules/ctools/css/ctools.css?ol0m1b HTTP/1.1" 200 587 "http://drupal.X.dev/admin/config/elasticsearch-connector/clusters/add" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
arunverma’s picture

Hello Friends..

Me too getting same error:

curl http://localhost:9200
{
  "name" : "tescluster",
  "cluster_name" : "tescluster",
  "cluster_uuid" : "LrlJy0RsRRK4BiULxCblpQ",
  "version" : {
    "number" : "2.4.4",
    "build_hash" : "fcbb46dfd45562a9cf00c604b30849a6dec6b017",
    "build_timestamp" : "2017-01-03T11:33:16Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.2"
  },
  "tagline" : "You Know, for Search"
}

But after adding credentials in backend.. getting: Cannot connect to the cluster!

Need help fixing it.

abrlam’s picture

@skek does the connector still work when the cluster health is at yellow?

Also, I noticed the error goes away when I enable Elasticsearch Connector Devel module. Is it intentional?