By using AWS re:Post, you agree to the Terms of Use
/metadata service is unstable: connection timeout, Failed to connect to service endpoint etc/

metadata service is unstable: connection timeout, Failed to connect to service endpoint etc


start from recently, our long running job are hitting metadata issue frequently. The exceptions various, but the all point to EC2 metadata service. It's either failed to connection the endpoint, or timeout to connect to the service, or complaining that I need to specify the region while building the client. The job is running on EMR 6.0.0 in Tokyo, with correct Role set, and the job has been running fine for months, just started from recent, it became unstable.

So my question is: how can we monitor the healthy the metadata service? request QPS, success rate, etc.

A few callstacks Unable to load AWS credentials from any provider in the chain: [ null, null, Failed to connect to service endpoint: ]
com.amazonaws.SdkClientException: Unable to find a region via the region provider chain. Must provide an explicit region in the builder or setup environment to supply a region.
	at com.amazonaws.client.builder.AwsClientBuilder.setRegion(
	at com.amazonaws.client.builder.AwsClientBuilder.configureMutableProperties(
com.amazonaws.SdkClientException: Unable to execute HTTP request:
    at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleRetryableException( ~[aws-java-sdk-bundle-1.11.711.jar:?]

Caused by:
    at ~[?:1.8.0_242]
    at ~[?:1.8.0_242]
    at ~[?:1.8.0_242] Failed to connect to service endpoint: 

Caused by: connect timed out
	at Method)
1 Answers

As of today, there is no specific metric available to monitor EC2 IMDS metrics like request QPS, success rate etc.

Kindly review the application logs pertaining to each exceptions, as the outlined exceptions could also occur due to various other issues in the environment like network (Failed to connect to service endpoint), DNS ( Unable to execute HTTP request) etc for example.

answered 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions