Need help?

Our experts have had an average response time of 13.14 minutes in February 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Elasticsearch no alive nodes found in cluster – Resolved

by | Apr 4, 2020

Are you seeing Elasticsearch no alive nodes found in cluster error?

Often when users try to call Elasticsearch from an Application server, it ends up in errors.

This can be due to failed services, wrong application configuration, etc.

At Bobcares, we help customers with Elasticsearch apps as part of our Server Management Services.

In this write-up, we’ll see how we fixed the elasticsearch error.

 

Where do we see the Elasticsearch no alive nodes found in cluster error?

Let’s first check the scenario in which the error occurs.

Elasticsearch allows us to store, search and analyze big data volumes easily. It is a full-text search engine that stores data in JSON format. It comes useful in managing log files.

Usually, users make use of applications to fetch and view the results from the elasticsearch server. Again, many times application resides on a different server.

When they try to call Elasticsearch from the Application server, it gives an error Fatal error:

Uncaught exception 'Elasticsearch\Common\Exceptions\NoNodesAvailableException' with message 'No alive nodes found in your cluster'

Recently, in one of the customer’s server, the error appeared as

elasticsearch_no_alive_nodes_found_in_cluster

 

What causes the Elasticsearch error?

We just saw how the error appears. It’s time now to see the common causes of the error.

 

1. Failed Elasticsearch service

Quite often, the Elasticsearch no alive nodes found in cluster error happens when the underlying service fails.

For showing the search results, the Elasticsearch service should be running on the server. When it is down or not listening, the app may not be able to fetch the results.

 

2. Incorrect config settings

Similarly, incorrect configuration settings also can trigger errors. This can be related to Elasticsearch search server name, port settings, etc.

This involves settings like:

'host' => 'my-server.xxxx.aws.io',
'port' => 9234,
'scheme' => 'https',
'user' => 'username',
'pass' => 'password'

Here, the elasticsearch server should be able to listen properly on the secure port. Additionally, if there are port restrictions or password problems, it also causes an error.

 

How we fixed the Elasticsearch no alive nodes found in cluster error

Moving on, let’s now see how our Support Engineers fixed this error for the customer.

As the first step, we checked the status of the Elasticsearch service. We used the command:

systemctl status elasticsearch

And, we found that the Elasticsearch services failed to start on boot. The failed services list on the server appeared as:

[root@xxx system]# systemctl --failed
  UNIT                   LOAD   ACTIVE SUB    DESCRIPTION
● cpanel_php_fpm.service loaded failed failed FPM service for cPanel Daemons
● elasticsearch.service  loaded failed failed Elasticsearch

Therefore, we checked the logs and corrected the elasticsearch startup problem. This fixed the error and the application started showing in the results.

Likewise, when there are configuration errors, we double-check the app settings. We correct the host’s setting. We include the http[s]:// in the host address and set the port to 443. Here, we confirm the SSL certificate settings. Or, when using the nonsecure version, we use port 80.

[Struggling with Elasticsearch service failure? We can fix it for you.]

 

Conclusion

To sum up, the Elasticsearch no alive nodes found in cluster error happens due to service failure or incorrect application settings. Today, we saw how our Support Engineers made Elasticsearch working for the customer.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

2 Comments

  1. Hoa Sen Vàng

    “In my case it was the VM update that switched the network stack to IPv6. This resulted in localhost being resolved to ::1 and my Elastic does not listen on that address. The fix is pretty simple, just setting ‘http://127.0.0.1:9200’ as the primary host.”
    I found on github with this ! hope this help !

    Reply
    • Maheen Aboobakkar

      Thank you Hoa Sen Vàng for sharing this information.

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF