Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

ICE access data in S3 #29

Closed
kamal2222ahmed opened this issue Oct 17, 2017 · 14 comments
Closed

ICE access data in S3 #29

kamal2222ahmed opened this issue Oct 17, 2017 · 14 comments

Comments

@kamal2222ahmed
Copy link

I have -
Access Key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Secret Key: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
bucketname: arn:aws:s3:::unique_bucketname

All cost data goes to a combined billing report in S3. I have access to the s3 bucket containing the files.
based on the Access and Secret key.
Given the s3 bucket ARN, can ICE extract the data? Or it needs the account ID, or something else.

@kamal2222ahmed
Copy link
Author

with the above config, i get error:
ice_1 | 2017-10-17 12:29:48,995 [localhost-startStop-1] INFO BootStrap - Starting ice...
ice_1 | | Error com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 0F2932B079F13B51), S3 Extended Request ID: B2tWfSaWWS2GR5WYME1YbfkDPP/DUNioD7nT4VqlQLWy8QWvBU4ZrVkNbuxWAGuLs0G2lkRzlTA=
ice_1 | | Error at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1588)
ice_1 | | Error at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1258)
ice_1 | | Error at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1030)
ice_1 | | Error at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:742)
ice_1 | | Error at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:716)
ice_1 | | Error at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)
ice_1 | | Error at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)
ice_1 | | Error at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)
ice_1 | | Error at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513)
ice_1 | | Error at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4221)
ice_1 | | Error at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4168)
ice_1 | | Error at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:1378)
ice_1 | | Error at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:1255)
ice_1 | | Error at com.netflix.ice.common.AwsUtils.download(AwsUtils.java:338)
ice_1 | | Error at com.netflix.ice.common.AwsUtils.download(AwsUtils.java:333)
ice_1 | | Error at com.netflix.ice.common.AwsUtils.downloadFileIfNotExist(AwsUtils.java:321)
ice_1 | | Error at com.netflix.ice.basic.BasicReservationService.init(BasicReservationService.java:101)
ice_1 | | Error at com.netflix.ice.processor.ProcessorConfig.(ProcessorConfig.java:97)
ice_1 | | Error at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
ice_1 | | Error at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
ice_1 | | Error at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
ice_1 | | Error at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
ice_1 | | Error at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
ice_1 | | Error at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
ice_1 | | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
ice_1 | | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
ice_1 | | Error at BootStrap$_closure1.doCall(BootStrap.groovy:187)
ice_1 | | Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
ice_1 | | Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
ice_1 | | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
ice_1 | | Error at java.lang.reflect.Method.invoke(Method.java:498)
ice_1 | | Error at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
ice_1 | | Error at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
ice_1 | | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
ice_1 | | Error at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
ice_1 | | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
ice_1 | | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1081)
ice_1 | | Error at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
ice_1 | | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
ice_1 | | Error at groovy.lang.Closure.call(Closure.java:423)
ice_1 | | Error at groovy.lang.Closure.call(Closure.java:417)
ice_1 | | Error at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:327)
ice_1 | | Error at grails.util.Environment.executeForEnvironment(Environment.java:320)
ice_1 | | Error at grails.util.Environment.executeForCurrentEnvironment(Environment.java:296)
ice_1 | | Error at org.codehaus.groovy.grails.commons.DefaultGrailsBootstrapClass.callInit(DefaultGrailsBootstrapClass.java:60)
ice_1 | | Error at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.executeGrailsBootstraps(GrailsConfigUtils.java:78)
ice_1 | | Error at org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener.initWebApplicationContext(GrailsContextLoaderListener.java:110)
ice_1 | | Error at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
ice_1 | | Error at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4728)
ice_1 | | Error at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5162)
ice_1 | | Error at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
ice_1 | | Error at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
ice_1 | | Error at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
ice_1 | | Error at java.util.concurrent.FutureTask.run(FutureTask.java:266)
ice_1 | | Error at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
ice_1 | | Error at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
ice_1 | | Error at java.lang.Thread.run(Thread.java:748)
ice_1 | | Error 2017-10-17 12:29:50,474 [localhost-startStop-1] ERROR BootStrap - Startup failed
ice_1 | Message: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 0F2932B079F13B51)
ice_1 | Line | Method
ice_1 | ->> 1588 | handleErrorResponse in com.amazonaws.http.AmazonHttpClient$RequestExecutor
ice_1 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ice_1 | | 1258 | executeOneRequest in ''
ice_1 | | 1030 | executeHelper . . . . . . . . . in ''
ice_1 | | 742 | doExecute in ''
ice_1 | | 716 | executeWithTimer . . . . . . . . in ''
ice_1 | | 699 | execute in ''
ice_1 | | 667 | access$500 . . . . . . . . . . . in ''
ice_1 | | 649 | execute in com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl
ice_1 | | 513 | execute . . . . . . . . . . . . in com.amazonaws.http.AmazonHttpClient
ice_1 | | 4221 | invoke in com.amazonaws.services.s3.AmazonS3Client
ice_1 | | 4168 | invoke . . . . . . . . . . . . . in ''
ice_1 | | 1378 | getObject in ''
ice_1 | | 1255 | getObject . . . . . . . . . . . in ''
ice_1 | | 338 | download in com.netflix.ice.common.AwsUtils
ice_1 | | 333 | download . . . . . . . . . . . . in ''
ice_1 | | 321 | downloadFileIfNotExist in ''
ice_1 | | 101 | init . . . . . . . . . . . . . . in com.netflix.ice.basic.BasicReservationService
ice_1 | | 97 | in com.netflix.ice.processor.ProcessorConfig
ice_1 | | 187 | doCall . . . . . . . . . . . . . in BootStrap$_closure1
ice_1 | | 327 | evaluateEnvironmentSpecificBlock in grails.util.Environment
ice_1 | | 320 | executeForEnvironment . . . . . in ''
ice_1 | | 296 | executeForCurrentEnvironment in ''
ice_1 | | 266 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask
ice_1 | | 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
ice_1 | | 617 | run . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
ice_1 | ^ 748 | run in java.lang.Thread
dockerice_ice_1 exited with code 0

@NitriKx
Copy link

NitriKx commented Oct 17, 2017

Hi @kamal2222ahmed. You should give the bucket name instead of the ARN:
unique_bucketname instead of arn:aws:s3:::unique_bucketname

@kamal2222ahmed
Copy link
Author

here is my ice/assets/ice.properties

whether or not to start processor

ice.processor=true

whether or not to start reader/UI

ice.reader=true

whether or not to start reservation capacity poller

ice.reservationCapacityPoller=false

default reservation period, possible values are oneyear, threeyear

ice.reservationPeriod=threeyear

default reservation utilization, possible values are LIGHT, MEDIUM, HEAVY. If you have both (LIGHT or MEDIUM) and HEAVY RIs, make sure you

do not put HEAVY here.
#ice.reservationUtilization=MEDIUM

the highstock url; host it somewhere else and change this if you need HTTPS

ice.highstockUrl=https://code.highcharts.com/stock/4.2.1/highstock.js

url prefix, e.g. http://ice.netflix.com/. Will be used in alert emails.

ice.urlPrefix=

from email address

ice.fromEmail=

ec2 ondemand hourly cost threshold to send alert email. The alert email will be sent at most once per day.

ice.ondemandCostAlertThreshold=250

ec2 ondemand hourly cost alert emails, separated by ","

ice.ondemandCostAlertEmails=

modify the following 5 properties according to your billing files configuration. if you have multiple payer accounts, you will need to spec

ify multiple values for each property.

s3 bucket name where the billing files are. multiple bucket names are delimited by ",". Ice must have read access to billing s3 bucket.

ice.billing_s3bucketname=repl-xxxxxxxxxx-yyyy

location for the billing bucket. It should be specified for buckets using v4 validation

ice.billing_s3bucketregion=us-east-1

prefix of the billing files. multiple prefixes are delimited by ","

ice.billing_s3bucketprefix=repl/

specify your payer account id here if across-accounts IAM role access is used. multiple account ids are delimited by ",". "ice.billing_paye

rAccountId=,222222222222" means assumed role access is only used for the second bucket.
ice.billing_payerAccountId=,XXXXXXXXXXXXXX

specify the assumed role name here if you use IAM role access to read from billing s3 bucket. multiple role names are delimited by ",". "ic

e.billing_accessRoleName=,ice" means assumed role access is only used for the second bucket.
#ice.billing_accessRoleName=,ice

specify external id here if it is used. multiple external ids are delimited by ",". if you don't use external id, you can leave this proper

ty unset.
#ice.billing_accessExternalId=

specify your custom tags here. Multiple tags are delimited by ",". If specified, BasicResourceService will be used to generate resource gro

ups for you.

PLEASE MAKE SURE you have limited number (e.g. < 100) of unique value combinations from your custom tags, otherwise Ice performance will be

greatly affected.
#ice.customTags=tag1,tag2

start date in millis from when you want to start processing the billing files

ice.startmillis=1364774400000

you company name. it will be used by UI

ice.companyName=AAAA

s3 bucket name where Ice can store output files. Ice must have read and write access to billing s3 bucket.

ice.work_s3bucketname=repl-xxxxxxxxxxxxxxx-yyyy

prefix of Ice output files

ice.work_s3bucketprefix=repl/

local directory for Ice processor. the directory must exist.

ice.processor.localDir=/mnt/ice_processor

local directory for Ice reader. the directory must exist.

ice.reader.localDir=/mnt/ice_reader

monthly data cache size for Ice reader.

ice.monthlycachesize=12

change the follow account settings

ice.account.account1=payer account number
#ice.account.account2=123456789012

set reservation owner accounts. "ice.owneraccount.account2=account3,account4" means reservations in account2 can be shared by account3 and

account4

if reservation capacity poller is enabled, the poller will try to poll reservation capacity through ec2 API (desribeReservedInstances) for

each reservation owner account.
#ice.owneraccount.account1=12345678911
#ice.owneraccount.account2=account3,account4

if reservation capacity poller needs to use IAM role to access ec2 API, set the assumed role here for each reservation owner account

ice.owneraccount.account1.role=ice
ice.owneraccount.account2.role=ice
ice.owneraccount.account5.role=ice

if reservation capacity poller needs to use IAM role to access ec2 API and external id is used, set the external id here for each reservati

on owner account. otherwise you can leave it unset.
ice.owneraccount.account1.externalId=
ice.owneraccount.account2.externalId=
ice.owneraccount.account5.externalId=

and when i run: docker-compose up

i get error:

| 2017-10-17 15:04:40,932 [localhost-startStop-1] INFO core.StandardContext - Unable to set the web application class loader property [clearReferencesStatic] to [false] as the property does not exist.
ice_1 | 2017-10-17 15:04:40,934 [localhost-startStop-1] INFO core.StandardContext - Unable to set the web application class loader property [clearReferencesStopThreads] to [false] as the property does not exist.
ice_1 | 2017-10-17 15:04:40,934 [localhost-startStop-1] INFO core.StandardContext - Unable to set the web application class loader property [clearReferencesStopTimerThreads] to [false] as the property does not exist.
ice_1 | 2017-10-17 15:04:40,934 [localhost-startStop-1] INFO core.StandardContext - Unable to set the web application class loader property [clearReferencesHttpClientKeepAliveThread] to [true] as the property does not exist.
ice_1 | 2017-10-17 15:04:40,944 [localhost-startStop-1] INFO startup.ContextConfig - No global web.xml found
ice_1 | 2017-10-17 15:04:41,085 [localhost-startStop-1] INFO [localhost].[/ice] - No Spring WebApplicationInitializer types detected on classpath
ice_1 | 2017-10-17 15:04:41,112 [localhost-startStop-1] INFO [localhost].[/ice] - Initializing Spring root WebApplicationContext
ice_1 | 2017-10-17 15:04:47,409 [localhost-startStop-1] INFO context.GrailsConfigUtils - [GrailsContextLoader] Grails application loaded.
ice_1 | 2017-10-17 15:04:47,450 [localhost-startStop-1] INFO BootStrap - Starting ice...
ice_1 | 2017-10-17 15:04:49,173 [localhost-startStop-1] INFO common.AwsUtils - file not found in s3 /mnt/ice_processor/reservation_prices.threeyear.LIGHT
ice_1 | 2017-10-17 15:04:49,184 [localhost-startStop-1] INFO common.AwsUtils - file not found in s3 /mnt/ice_processor/reservation_prices.threeyear.MEDIUM
ice_1 | 2017-10-17 15:04:49,193 [localhost-startStop-1] INFO common.AwsUtils - file not found in s3 /mnt/ice_processor/reservation_prices.threeyear.HEAVY
ice_1 | 2017-10-17 15:04:49,256 [localhost-startStop-1] INFO common.AwsUtils - file not found in s3 /mnt/ice_processor/reservation_prices.threeyear.FIXED
ice_1 | | Error 2017-10-17 15:04:52,364 [localhost-startStop-1] ERROR basic.BasicReservationService - failed to poll reservation prices
ice_1 | Message: You are not authorized to perform this operation. (Service: AmazonEC2; Status Code: 403; Error Code: UnauthorizedOperation; Request ID: 467dfdf1-60ad-4771-81fe-5b71417e3b9f)
ice_1 | Line | Method
ice_1 | ->> 1588 | handleErrorResponse in com.amazonaws.http.AmazonHttpClient$RequestExecutor
ice_1 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ice_1 | | 1258 | executeOneRequest in ''
ice_1 | | 1030 | executeHelper . . . . . . . . . . . . . . in ''
ice_1 | | 742 | doExecute in ''
ice_1 | | 716 | executeWithTimer . . . . . . . . . . . . in ''
ice_1 | | 699 | execute in ''
ice_1 | | 667 | access$500 . . . . . . . . . . . . . . . in ''
ice_1 | | 649 | execute in com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl
ice_1 | | 513 | execute . . . . . . . . . . . . . . . . . in com.amazonaws.http.AmazonHttpClient
ice_1 | | 13611 | doInvoke in com.amazonaws.services.ec2.AmazonEC2Client
ice_1 | | 13587 | invoke . . . . . . . . . . . . . . . . . in ''
ice_1 | | 7406 | executeDescribeReservedInstancesOfferings in ''
ice_1 | | 7380 | describeReservedInstancesOfferings . . . in ''
ice_1 | | 158 | pollAPI in com.netflix.ice.basic.BasicReservationService
ice_1 | | 106 | init . . . . . . . . . . . . . . . . . . in ''
ice_1 | | 97 | in com.netflix.ice.processor.ProcessorConfig
ice_1 | | 187 | doCall . . . . . . . . . . . . . . . . . in BootStrap$_closure1
ice_1 | | 327 | evaluateEnvironmentSpecificBlock in grails.util.Environment
ice_1 | | 320 | executeForEnvironment . . . . . . . . . . in ''
ice_1 | | 296 | executeForCurrentEnvironment in ''
ice_1 | | 266 | run . . . . . . . . . . . . . . . . . . . in java.util.concurrent.FutureTask
ice_1 | | 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
ice_1 | | 617 | run . . . . . . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
ice_1 | ^ 748 | run in java.lang.Thread
ice_1 | | Error java.lang.RuntimeException: failed to poll reservation prices for You are not authorized to perform this operation. (Service: AmazonEC2; Status Code: 403; Error Code: UnauthorizedOperation; Request ID: 467dfdf1-60ad-4771-81fe-5b71417e3b9f)
ice_1 | | Error at com.netflix.ice.basic.BasicReservationService.init(BasicReservationService.java:110)
ice_1 | | Error at com.netflix.ice.processor.ProcessorConfig.(ProcessorConfig.java:97)
ice_1 | | Error at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
ice_1 | | Error at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
ice_1 | | Error at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
ice_1 | | Error at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
ice_1 | | Error at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
ice_1 | | Error at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
ice_1 | | Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
ice_1 | | Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
ice_1 | | Error at BootStrap$_closure1.doCall(BootStrap.groovy:187)
ice_1 | | Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
ice_1 | | Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
ice_1 | | Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
ice_1 | | Error at java.lang.reflect.Method.invoke(Method.java:498)
ice_1 | | Error at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
ice_1 | | Error at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
ice_1 | | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
ice_1 | | Error at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
ice_1 | | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
ice_1 | | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1081)
ice_1 | | Error at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
ice_1 | | Error at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016)
ice_1 | | Error at groovy.lang.Closure.call(Closure.java:423)
ice_1 | | Error at groovy.lang.Closure.call(Closure.java:417)
ice_1 | | Error at grails.util.Environment.evaluateEnvironmentSpecificBlock(Environment.java:327)
ice_1 | | Error at grails.util.Environment.executeForEnvironment(Environment.java:320)
ice_1 | | Error at grails.util.Environment.executeForCurrentEnvironment(Environment.java:296)
ice_1 | | Error at org.codehaus.groovy.grails.commons.DefaultGrailsBootstrapClass.callInit(DefaultGrailsBootstrapClass.java:60)
ice_1 | | Error at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.executeGrailsBootstraps(GrailsConfigUtils.java:78)
ice_1 | | Error at org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener.initWebApplicationContext(GrailsContextLoaderListener.java:110)
ice_1 | | Error at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
ice_1 | | Error at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4728)
ice_1 | | Error at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5162)
ice_1 | | Error at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
ice_1 | | Error at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
ice_1 | | Error at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
ice_1 | | Error at java.util.concurrent.FutureTask.run(FutureTask.java:266)
ice_1 | | Error at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
ice_1 | | Error at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
ice_1 | | Error at java.lang.Thread.run(Thread.java:748)
ice_1 | | Error 2017-10-17 15:04:52,416 [localhost-startStop-1] ERROR BootStrap - Startup failed
ice_1 | Message: failed to poll reservation prices for You are not authorized to perform this operation. (Service: AmazonEC2; Status Code: 403; Error Code: UnauthorizedOperation; Request ID: 467dfdf1-60ad-4771-81fe-5b71417e3b9f)
ice_1 | Line | Method
ice_1 | ->> 110 | init in com.netflix.ice.basic.BasicReservationService
ice_1 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ice_1 | | 97 | in com.netflix.ice.processor.ProcessorConfig
ice_1 | | 187 | doCall . . . . . . . . . . . . . in BootStrap$_closure1
ice_1 | | 327 | evaluateEnvironmentSpecificBlock in grails.util.Environment
ice_1 | | 320 | executeForEnvironment . . . . . in ''
ice_1 | | 296 | executeForCurrentEnvironment in ''
ice_1 | | 266 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask
ice_1 | | 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
ice_1 | | 617 | run . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
ice_1 | ^ 748 | run in java.lang.Thread
dockerice_ice_1 exited with code 0

@kamal2222ahmed
Copy link
Author

also, when i try to access my account at https://console.aws.amazon.com/billing/home?#/account
i get error:
You Need Permissions
You don't have permission to access billing information for this account. Contact your AWS administrator if you need help. If you are an AWS administrator, you can provide permissions for your users or groups by making sure that (1) this account allows IAM and federated users to access billing information and (2) you have the required IAM permissions.

Now, would a payer account id work ? or do we need to have individual account IDs for ICE to work ?
basically:
Given the s3 bucket ARN, can ICE extract the data?

@nfonrose
Copy link

nfonrose commented Oct 17, 2017 via email

@kamal2222ahmed
Copy link
Author

Hi Nicolas,
Now that i have resolved most of the issues i started getting the following error->

| 2017-10-20 13:12:39,175 [com.netflix.ice.processor.BillingFileProcessor] INFO processor.BillingFileProcessor - trying to download cloudcheckr/NNNNNNNNNN-aws-billing-detailed-line-items-with-resources-and-tags-2016-10.csv.zip...
ice_1 | 2017-10-20 13:12:39,152 [main] INFO http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8080"]
ice_1 | | Server running. Browse to http://localhost:8080/ice
ice_1 | | Error 2017-10-20 13:12:39,539 [com.netflix.ice.processor.BillingFileProcessor] ERROR processor.BillingFileProcessor - Error polling
ice_1 | Message: Unable to execute HTTP request: repl-NNNNNNNNN-backup.s3-us-east-1.amazonaws.com
ice_1 | Line | Method
ice_1 | ->> 1069 | handleRetryableException in com.amazonaws.http.AmazonHttpClient$RequestExecutor
ice_1 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ice_1 | | 1035 | executeHelper in ''
ice_1 | | 742 | doExecute . . . . . . . . in ''
ice_1 | | 716 | executeWithTimer in ''
ice_1 | | 699 | execute . . . . . . . . . in ''
ice_1 | | 667 | access$500 in ''
ice_1 | | 649 | execute . . . . . . . . . in com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl
ice_1 | | 513 | execute in com.amazonaws.http.AmazonHttpClient
ice_1 | | 4221 | invoke . . . . . . . . . . in com.amazonaws.services.s3.AmazonS3Client
ice_1 | | 4168 | invoke in ''
ice_1 | | 1249 | getObjectMetadata . . . . in ''
ice_1 | | 1224 | getObjectMetadata in ''
ice_1 | | 279 | downloadFileIfChangedSince in com.netflix.ice.common.AwsUtils
ice_1 | | 176 | poll in com.netflix.ice.processor.BillingFileProcessor
ice_1 | | 50 | doWork . . . . . . . . . . in com.netflix.ice.common.Poller
ice_1 | | 28 | access$000 in ''
ice_1 | | 88 | run . . . . . . . . . . . in com.netflix.ice.common.Poller$1
ice_1 | ^ 748 | run in java.lang.Thread
ice_1 |
ice_1 | Caused by UnknownHostException: repl-NNNNNNNNNNN-backup.s3-us-east-1.amazonaws.com

Any idea how i can resolve UnknownHostException ?

@kamal2222ahmed
Copy link
Author

i have tried on another host setup for docker, and i got:

Server running. Browse to http://localhost:8080/ice
ice_1 | | Error 2017-10-21 10:07:10,610 [com.netflix.ice.processor.BillingFileProcessor] ERROR processor.BillingFileProcessor - Error reading from file lastProcessMillis_2016-10
ice_1 | Message: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: 61D7DF788A11FD3C)
ice_1 | Line | Method
ice_1 | ->> 1588 | handleErrorResponse in com.amazonaws.http.AmazonHttpClient$RequestExecutor
ice_1 | - - -

Caused by UnknownHostException: local-ice-xxxxxxx-work-bucket.s3-us-east-1.amazonaws.com
ice_1 | ->> 1280 | getAllByName0 in java.net.InetAddress
ice_1 | -

@nfonrose
Copy link

nfonrose commented Oct 21, 2017 via email

@kamal2222ahmed
Copy link
Author

kamal2222ahmed commented Oct 22, 2017

Hi Nicolas,
Good point, i just tried:

$ aws s3 ls
2017-06-20 17:28:31 cf-templates-vvvvvvvvv-us-west-2
2017-10-18 18:39:41 local-ice-xxxxxxxxxx-work-bucket
2016-11-21 16:02:23 repl-xxxxxxxxxxxx-isd-sw
2017-09-20 14:01:29 repl-xxxxxxxxxxxx-backup

$aws s3 ls repl-xxxxxxxxxxxx-backup

stdout:
PRE cloudcheckr/
PRE ice/
2017-10-20 18:08:49 4 cloudcheckrreservation_prices.threeyear.FIXED
2017-10-20 18:08:49 529521 cloudcheckrreservation_prices.threeyear.HEAVY
2017-10-20 18:08:49 4 cloudcheckrreservation_prices.threeyear.LIGHT
2017-10-20 18:08:49 4 cloudcheckrreservation_prices.threeyear.MEDIUM

and these are the same credentials i used as the one i use with ice.

now when i run: ./grailsw -Djava.net.preferIPv4Stack=true -Dice.s3AccessKeyId= ACCESSKEY -Dice.s3SecretKey=SECRETKEY run-app
i get error:

Message: Unable to execute HTTP request: repl-XXXXXXXXXXX-YYYYY.s3-us-east-1.amazonaws.com
Line | Method
->> 1069 | handleRetryableException in com.amazonaws.http.AmazonHttpClient$RequestExecutor


| 1035 | executeHelper in ''
| 742 | doExecute . . . . . . . . in ''
| 716 | executeWithTimer in ''
| 699 | execute . . . . . . . . . in ''
| 667 | access$500 in ''
| 649 | execute . . . . . . . . . in com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl
| 513 | execute in com.amazonaws.http.AmazonHttpClient
| 4221 | invoke . . . . . . . . . . in com.amazonaws.services.s3.AmazonS3Client
| 4168 | invoke in ''
| 1249 | getObjectMetadata . . . . in ''
| 1224 | getObjectMetadata in ''
| 279 | downloadFileIfChangedSince in com.netflix.ice.common.AwsUtils
| 176 | poll in com.netflix.ice.processor.BillingFileProcessor
| 50 | doWork . . . . . . . . . . in com.netflix.ice.common.Poller
| 28 | access$000 in ''
| 88 | run . . . . . . . . . . . in com.netflix.ice.common.Poller$1
^ 748 | run in java.lang.Thread

Caused by UnknownHostException: repl-XXXXXXXXXX-YYYYYY.s3-us-east-1.amazonaws.com
->> 1273 | getAllByName0 in java.net.InetAddress


| 1185 | getAllByName in ''
| 1119 | getAllByName . . . . . . . in ''
| 27 | resolve in com.amazonaws.SystemDefaultDnsResolver
| 38 | resolve . . . . . . . . . in com.amazonaws.http.DelegatingDnsResolver
| 111 | connect in org.apache.http.impl.conn.DefaultHttpClientConnectionOperator
| 353 | connect . . . . . . . . . in org.apache.http.impl.conn.PoolingHttpClientConnectionManager
| 76 | invoke in com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler
| 380 | establishRoute . . . . . . in org.apache.http.impl.execchain.MainClientExec
| 236 | execute in ''
| 184 | execute . . . . . . . . . in org.apache.http.impl.execchain.ProtocolExec
| 82 | execute in org.apache.http.impl.client.CloseableHttpClient
| 55 | execute . . . . . . . . . in ''
| 72 | execute in com.amazonaws.http.apache.client.impl.SdkHttpClient
| 1190 | executeOneRequest . . . . in com.amazonaws.http.AmazonHttpClient$RequestExecutor
| 1030 | executeHelper in ''
| 742 | doExecute . . . . . . . . in ''
| 716 | executeWithTimer in ''
| 699 | execute . . . . . . . . . in ''
| 667 | access$500 in ''
| 649 | execute . . . . . . . . . in com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl
| 513 | execute in com.amazonaws.http.AmazonHttpClient
| 4221 | invoke . . . . . . . . . . in com.amazonaws.services.s3.AmazonS3Client
| 4168 | invoke in ''
| 1249 | getObjectMetadata . . . . in ''
| 1224 | getObjectMetadata in ''
| 279 | downloadFileIfChangedSince in com.netflix.ice.common.AwsUtils
| 176 | poll in com.netflix.ice.processor.BillingFileProcessor
| 50 | doWork . . . . . . . . . . in com.netflix.ice.common.Poller
| 28 | access$000 in ''
| 88 | run . . . . . . . . . . . in com.netflix.ice.common.Poller$1
^ 748 | run in java.lang.Thread

@Juberstine
Copy link
Contributor

FWIW, I fixed the issue by setting ice.billing_s3bucketregion=

Yes, thats right blank.

The problem seems to be when you define a region, it uses the URL of epl-XXXXXXXXXXX-YYYYY.s3-us-east-1.amazonaws.com, it should be epl-XXXXXXXXXXX-YYYYY.s3.us-east-1.amazonaws.com

Notice that it's doing s3-us-east-1 instead of s3.us-east-1. Setting it to a blank var makes it work fine in us-east-1 since s3.amazonaws.com works fine in that region

@Juberstine
Copy link
Contributor

@kamal2222ahmed Can you confirm if there is a bug that's adding a dash instead of a period?

@Juberstine
Copy link
Contributor

After figuring that out on my own, the issue is confirmed:

Teevity/ice#277

@jonbrouse
Copy link
Owner

Closing, bug in ice.

@nfonrose
Copy link

nfonrose commented Sep 20, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants