Troubleshooting Elasticsearch

Some troubleshooting information to help resolve issues with Elasticsearch.

Table of Contents

Elasticsearch client can't connect to the nodes

If the Elasticsearch client can't connect to the nodes, and/or the nodes can't connect to each other, check that you have the correct Elasticsearch ports available on every container that the Elasticsearch feature is installed on.

The ports are specific to the mode in use. The defaults are:

  • RESTClient mode: 9200
  • Transport Client mode: 9300

However, it depends on what's specified in the Elasticsearch YAML file. Make sure the ports specified in the YAML file are available.

For more information, see What changes do I need to make to the Elasticsearch YAML file?

Elasticsearch search results hang or are not returned

In certain circumstances you might encounter an issue that Elasticsearch search results are not returned, and the search query seems to hang. If restarting the CM container resolves the issue, you could try reducing the default timeout connection settings to help free up connections.

There are also additional Elasticsearch security settings that you can modify, if needed, to help resolve Elasticsearch connection issues by modifying the timeout values.

If you have Elasticsearch connections that use a centralized server behind a firewall, it might be possible that the firewall is closing the TCP connection from the CM DMZ containers to the internal Elasticsearch cluster. In this scenario, reducing the timeout value results in CM freeing up those database connections more quickly.

In most cases the default settings should be fine.

Information on the Elasticsearch timeout settings is given below.

To modify the Elasticsearch timeout values

  1. Log in to the Akana Administrator Console for the Policy Manager container.
  2. Go to Configuration > Configuration Categories and find the category.
  3. Modify the settings as needed:
    • elastic.client.connectTimeout. Default: 1000.
    • elastic.client.socketTimeout. Default: 30000.

New fields not showing up in search index

If new fields are added to Elasticsearch in a new version of the product, manual steps are needed so that the new fields are included in the search index. If these actions are not completed, the new fields are not indexed.

  • Versions prior to 2020.2.0: Follow the instructions in the Akana Release Notes. New fields were added in the following versions:
    • 2019.1.14
    • 2019.1.12
    • 2019.1.8
  • 2020.2.0 and later: run the cm-es-index-upgrade.json automation recipe. For more information, see Updating the Elasticsearch index.