Some troubleshooting information to help resolve issues with Elasticsearch.
Table of Contents
- Elasticsearch client can't connect to the nodes
- Elasticsearch search results hang or are not returned
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.
In version 2019.0.0 and later there are 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
- Log in to the Akana Administrator Console for the Policy Manager container.
- Go to Configuration > Configuration Categories and find the com.akana.es.client.security category.
- Modify the settings as needed:
- elastic.rest.client.connectTimeout. Default: 1000.
- elastic.rest.client.socketTimeout. Default: 30000.