com.amazonaws.AmazonClientException

Unable to load credentials from Amazon EC2 metadata service

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web578

  • via Unknown by Stuart MacIntosh,
  • Stack trace

    • com.amazonaws.AmazonClientException: Unable to load credentials from Amazon EC2 metadata service at com.amazonaws.auth.InstanceProfileCredentialsProvider.loadCredentials(InstanceProfileCredentialsProvider.java:99) at com.amazonaws.auth.InstanceProfileCredentialsProvider.getCredentials(InstanceProfileCredentialsProvider.java:37) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2969) at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:911) at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:801) at com.netflix.ice.common.AwsUtils.download(AwsUtils.java:313) at com.netflix.ice.common.AwsUtils.download(AwsUtils.java:308) at com.netflix.ice.common.AwsUtils.downloadFileIfNotExist(AwsUtils.java:296) at com.netflix.ice.basic.BasicReservationService.init(BasicReservationService.java:96) at com.netflix.ice.processor.ProcessorConfig.<init>(ProcessorConfig.java:86) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:975) at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) at BootStrap$_closure1.doCall(BootStrap.groovy:174) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1082) at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1106) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:956) at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1106) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906) at groovy.lang.Closure.call(Closure.java:412) at groovy.lang.Closure.call(Closure.java:406) at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:308) at grails.util.Environment.executeForEnvironment(Environment.java:301) at grails.util.Environment.executeForCurrentEnvironment(Environment.java:277) at org.codehaus.groovy.grails.commons.DefaultGrailsBootstrapClass.callInit(DefaultGrailsBootstrapClass.java:60) at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.executeGrailsBootstraps(GrailsConfigUtils.java:74) at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:108) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:679) Caused by: java.io.FileNotFoundException: http://169.254.169.254/latest/meta-data/iam/security-credentials/ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1401) at com.amazonaws.internal.EC2MetadataClient.readResponse(EC2MetadataClient.java:106) at com.amazonaws.internal.EC2MetadataClient.readResource(EC2MetadataClient.java:88) at com.amazonaws.internal.EC2MetadataClient.getDefaultCredentials(EC2MetadataClient.java:53) at com.amazonaws.auth.InstanceProfileCredentialsProvider.loadCredentials(InstanceProfileCredentialsProvider.java:73) ... 51 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    musketyrmusketyr
    4 times, last one
    HronomHronom
    366 times, last one
    tyson925tyson925
    120 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    8 more bugmates