error only about 10% of the time

42 views
Skip to first unread message

Dan Sheffner

unread,
Oct 11, 2010, 3:57:09 PM10/11/10
to boto-...@googlegroups.com
once in a great while I get:

ERROR:boto:400 Bad Request
ERROR:boto:<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InvalidInstanceID.NotFound</Code><Message>The instance ID 'i-8e7c8ae3' does not exist</Message></Error></Errors><RequestID>4dda737c-0c21-471d-a610-21c5a675b6ac</RequestID></Response>

I'm pretty sure it is failing on my conn.run_instances() but like I said it is only about 10% of the time it actually fails.  Not a huge deal but was wondering if other people see this.

Thanks,

Dan

Mitchell Garnaat

unread,
Oct 11, 2010, 5:58:54 PM10/11/10
to boto-...@googlegroups.com
I wonder if this is an "eventual consistency" issue.  Are these instance id's that were just created?  I have run into situations like this where I do a run_instances and then query for the instance-id right away and get this response.  It's very sporadic for me, much less than 10% of the time, but if I query again, it succeeds.

--
You received this message because you are subscribed to the Google Groups "boto-users" group.
To post to this group, send email to boto-...@googlegroups.com.
To unsubscribe from this group, send email to boto-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.

Victor Trac

unread,
Oct 11, 2010, 6:06:50 PM10/11/10
to boto-...@googlegroups.com
I've seen this as well (or something similar), and solved it by adding a time.sleep(1) in between a run_instances and querying for the instance_id.

-- Victor

Dan Sheffner

unread,
Oct 11, 2010, 6:10:31 PM10/11/10
to boto-...@googlegroups.com
Thanks.  I just added the sleep and will let you know if I see it again.  I have a feeling that will fix it.

Chris Moyer

unread,
Oct 11, 2010, 6:11:47 PM10/11/10
to boto-...@googlegroups.com
I've seen it take upwards of 30 seconds for instances to show up.

--
Chris Moyer

Dan Sheffner

unread,
Oct 11, 2010, 6:13:42 PM10/11/10
to boto-...@googlegroups.com
Yes I'm also doing:

for i in reservation.instances:
            while not i.update() == 'running':
                self.log.info(' sleeping for 10 seconds while machine comes up')
                time.sleep(10)

There is just that random xml file every once in a while...I have a feeling Victor is right that it is querying after the connection too quickly.

Jeff Bauer

unread,
Oct 11, 2010, 6:10:59 PM10/11/10
to boto-users
This has happened to me often enough that I'm checking it
in this manner:

secs = 300
rest_interval = 5
while secs > 0 and not self.instance.state == 'running':
sleep(rest_interval)
secs -= rest_interval
self.instance.update()

Jeff Bauer
Rubicon, Inc.


On Oct 11, 4:58 pm, Mitchell Garnaat <mi...@garnaat.com> wrote:
> I wonder if this is an "eventual consistency" issue.  Are these instance
> id's that were just created?  I have run into situations like this where I
> do a run_instances and then query for the instance-id right away and get
> this response.  It's very sporadic for me, much less than 10% of the time,
> but if I query again, it succeeds.
>
> On Mon, Oct 11, 2010 at 3:57 PM, Dan Sheffner <dsheff...@gmail.com> wrote:
> > once in a great while I get:
>
> > ERROR:boto:400 Bad Request
> > ERROR:boto:<?xml version="1.0" encoding="UTF-8"?>
> > <Response><Errors><Error><Code>InvalidInstanceID.NotFound</Code><Message>The
> > instance ID 'i-8e7c8ae3' does not
> > exist</Message></Error></Errors><RequestID>4dda737c-0c21-471d-a610-21c5a675b6ac</RequestID></Response>
>
> > I'm pretty sure it is failing on my conn.run_instances() but like I said it
> > is only about 10% of the time it actually fails.  Not a huge deal but was
> > wondering if other people see this.
>
> > Thanks,
>
> > Dan
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "boto-users" group.
> > To post to this group, send email to boto-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > boto-users+...@googlegroups.com<boto-users%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages