Exception while retrieving instance list from AWS API: – Elasticsearch Log Diagnostic

Remediate Elasticsearch Issues

Opster detects and predicts root causes of Elasticsearch problems

Learn More

Opster has analyzed this log so you don’t have to
Navigate directly to one of the sections in this page :

Troubleshooting Background – start here to get the full picture       
Log Context – usefull for experts
Related Issues – selected resources from the community  
About Opster – offering a diffrent approach to troubleshoot Elasticsearch

Check My Elasticsearch 

Troubleshooting background

To troubleshoot Elasticsearch log “Exception while retrieving instance list from AWS API: ” it’s important to know common problems related to Elasticsearch concepts: cloud-aws, discovery, discovery-ec2, hosts, plugins. See below-detailed explanations complete with common problems, examples and useful tips.

Log Context

Log ”Exception while retrieving instance list from AWS API: “ classname is AwsEc2UnicastHostsProvider.java
To help get the right context about this log, we have extracted the following from Elasticsearch source code

             // NOTE: we don't filter by security group during the describe instances request for two reasons:
            // 1. differences in VPCs require different parameters during query (ID vs Name)
            // 2. We want to use two different strategies: (all security groups vs. any security groups)
            descInstances = SocketAccess.doPrivileged(() -> clientReference.client().describeInstances(buildDescribeInstancesRequest()));
        } catch (final AmazonClientException e) {
            logger.info("Exception while retrieving instance list from AWS API: {}"; e.getMessage());
            logger.debug("Full exception:"; e);
            return dynamicHosts;

        logger.trace("building dynamic unicast discovery nodes...");

To help troubleshoot related issues we have gathered selected answers from STOF & Discuss and issues from Github, please review the following for further information :

Elasticsearch EC2 discovery fails with “invalid credentials”

Number of Views : 2.11 K  Score on Stackoverflow : 4

AWS IAM role not working with Elasticsearch 5.0.0-alpha2, but works with 2.3 version

Number of Views : 0.18 K  Score on Stackoverflow : 1

About Opster

Incorporating deep knowledge and broad history of Elasticsearch issues. Opster’s solution identifies and predicts root causes of Elasticsearch problems, provides recommendations and can automatically perform various actions to manage, troubleshoot and prevent issues

We are constantly updating our analysis of Elasticsearch logs, errors, and exceptions. Sharing best practices and providing troubleshooting guides.

Learn more: Glossary | Blog| Troubleshooting guides | Error Repository

Need help with any Elasticsearch issue ? Contact Opster

Did this page help you?

Get an Elasticsearch Check-Up

Check if your ES issues are caused from misconfigured settings
(Free 2 min process)