Elasticsuite: Installing data... No alive nodes found in your cluster

Created on 25 Feb 2020  路  7Comments  路  Source: Smile-SA/elasticsuite

When I run bin/magento setup:upgrade, it always display "Installing data... No alive nodes found in your cluster"
my elasticsearch at another server.
'smile_elasticsuite_core_base_settings' => [
'es_client' => [
'servers' => 'http://ec2-*****.compute-1.amazonaws.com:9200',
'enable_https_mode' => '0',
'enable_http_auth' => '0',
'http_auth_user' => 'user',
'http_auth_pwd' => '********'
]
]

question

All 7 comments

Hello @chenghuili,

Please use the search feature before creating an issue.
That is indeed a frequent misconfiguration error.

In your case, change

'enable_https_mode' => '0',
'enable_http_auth' => '0',

to

'enable_https_mode' => 0,
'enable_http_auth' => 0,

and clean your cache before attempting again setup:upgrade.

Your '0' string is actually interpreted as "true".

Regards,

this is my elasticsearch.yml

OK, I've tested locally on a 6.8.6, with your configuration for network.host/bind_host/publish_host and the service is still accessible from outside.

It looks like your Elasticsearch service is accessible from anywhere (which is not a good idea), so try to confirm it's the case using curl (curl http://[PUBLIC_IP]:9200) or an Elasticsearch client like Cerebro.
If not, well just check that your Elasticsearch server is up and running :/

Regards,

@chenghuili just to be sure, try to remove the 'http://' in your es_client/servers setting.
It's actually not required and may be a source of error.

thank you for your help, I changed configuration file and clean cache, but it still doesn't work

system' => [
'default' => [
'smile_elasticsuite_core_base_settings' => [
'es_client' => [
'servers' => 'elasticsearch:9200',
'enable_https_mode' => 0,
'enable_http_auth' => 1,
]
]
]

Hello @chenghuili,

This is not the kind of issue that can be easily solved remotely without sensitive information disclosure.
Besides, this is going a bit everywhere : at first you pasted a server address is somewhere on amazonaws.com (so supposedly outside of your main Magento architecture), in your last message, it's simply an "elasticsearch" local alias.

To paraphrase the docs :

  • servers should contain the hostname and port of where the service is accessible at
  • enable_https_mode determines if you need (1) or not (0) access the service with https (instead of http)
  • enable_http_auth determines if you need (1) or not (0) provide a username and a password to access the service. enable_http_auth=1 is ignored if you do not provide both a value for http_auth_user and http_auth_pwd

Those settings should reflect how you can connect to your Elasticsearch server from your Magento server using a command-line client like curl.

  • If enable_http_auth=0

    • If enable_https_mode=0

      curl http://[one value of servers]/

    • If enable_https_mode=1

      curl https://[one value of servers]/

  • If enable_http_auth=1 (and http_auth_user and http_auth_pwd are both provided)

    • If enable_https_mode=0

      curl -u http_auth_user:http_auth_pwd http://[one value of servers]/

    • If enable_https_mode=1

      curl -u http_auth_user:http_auth_pwd https://[one value of servers]/

If you want us to provide more support on this one, you can contact us by mail at romain.[email protected] to purchase professional support services which will allow us to provide you more coaching or development workforce to achieve your needs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shamoon picture shamoon  路  3Comments

tschirmer picture tschirmer  路  4Comments

mokadev picture mokadev  路  3Comments

markdimi picture markdimi  路  4Comments

gihovani picture gihovani  路  4Comments