The lifeguard-dev group is the place for this question.
It's hard to guess what might be going wrong here. There is a bug in
PoolManager.java at line 399
http://code.google.com/p/lifeguard/source/browse/trunk/java/com/directthought/lifeguard/PoolManager.java?r=83#399
where the Exception is caught but not printed, and this prevents the
actual problem from being reported.
If you're feeling brave you can change PoolManager.java's line 399 as follows:
Old:
logger.warn("Failed to launch instance(s). Will retry");
New:
logger.warn("Failed to launch instance(s). Will retry", ex);
and rebuild the library.
This will allow the actual underlying problem to be reported.
.. Shlomo
---------- Forwarded message ----------
From: rajashekar.s <rajash...@excelindia.com>
Date: Thu, May 14, 2009 at 8:35 AM
Subject: unable to launch the instances using lifeguard
To: shlomo....@gmail.com, dkav...@gmail.com
Hi Shlomo,
Hi Guys,
I downloaded and installed lifeguard from a 0.2 zip file. after doing
config settings and run on windows machine (ec2 instance) ,I get this
message
C:\lifeguard>"C:\Program Files\Java\jdk1.6.0_13\bin\java" -classpath ".;lifeguar
d.jar;conf\;lib\activation.jar;lib\commons-codec-1.3.jar;lib\commons-httpclient-
3.1.jar;lib\commons-logging-1.1.jar;lib\jaxb-api.jar;lib\jaxb-impl.jar;lib\jsr17
3_1.0_api.jar;lib\typica.jar;lib\spring-core.jar;lib\spring-beans.jar" com.direc
tthought.lifeguard.RunManager conf\poolConfig.xml
May 12, 2009 5:25:17 AM org.springframework.beans.factory.xml.XmlBeanDefinitionR
eader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [beans.xml]
May 12, 2009 5:25:17 AM org.springframework.core.io.support.PropertiesLoaderSupp
ort loadProperties
INFO: Loading properties file from class path resource [aws.properties]
>>>>>>>>>>> service name : MultiCommandService
>>>>>>>>>>> status queue name : esklStatus
>>>>>>>>>>> work queue name : esklQInput
May 12, 2009 5:25:21 AM com.directthought.lifeguard.PoolManager run
INFO: Starting PoolManager for service : MultiCommandService
May 12, 2009 5:25:22 AM com.directthought.lifeguard.PoolManager run
INFO: queue:1 servers:0 load:0 ii:0 bi:0
May 12, 2009 5:25:22 AM com.directthought.lifeguard.PoolManager launchInstances
WARNING: Failed to launch instance(s). Will retry
May 12, 2009 5:25:26 AM com.directthought.lifeguard.PoolManager run
INFO: queue:1 servers:0 load:0 ii:0 bi:0
May 12, 2009 5:25:26 AM com.directthought.lifeguard.PoolManager launchInstances
WARNING: Failed to launch instance(s). Will retry
May 12, 2009 5:25:30 AM com.directthought.lifeguard.PoolManager run
INFO: queue:1 servers:0 load:0 ii:0 bi:0
May 12, 2009 5:25:30 AM com.directthought.lifeguard.PoolManager launchInstances
WARNING: Failed to launch instance(s). Will retry
This is my pool config file
<ServicePool>
<ServiceName>MultiCommandService</ServiceName>
<ServiceAMI>ami-0529ce6c</ServiceAMI>
<InstanceType>m1.small</InstanceType>
<PoolStatusQueue>esklStatus</PoolStatusQueue>
<ServiceWorkQueue>esklQInput</ServiceWorkQueue>
<RampUpInterval>1</RampUpInterval>
<RampUpDelay>30</RampUpDelay>
<RampDownInterval>1</RampDownInterval>
<RampDownDelay>30</RampDownDelay>
<MinSize>0</MinSize> // this tried changing to 1
<MaxSize>2</MaxSize> // this i changed to 20
<QueueSizeFactor>10</QueueSizeFactor>
</ServicePool>
and regarding launching permissions
I am able to launch instances using Elastic Fox with the same credentials
regarding number of instances presently only 7 instances are running
in the account
Please let me know any other modifications to be done to make it work
Thanks and Best regards
Rajshekar
--
The service AMI is an image that you should build yourself. On startup
it should automatically parse the UserData and start up the desired
service accordingly. You use the standard Amazon EC2 AMI Tools to
create an image and register it with EC2.
I have only built Linux AMIs, so I can't comment on how to build a
Windows AMI with the tools.
.. Shlomo
---------- Forwarded message ----------
From: rajashekar.s <rajash...@excelindia.com>
Date: Thu, May 14, 2009 at 11:41 AM
Subject: Re: Fwd: unable to launch the instances using lifeguard
To: shlomo....@gmail.com
Hi Shlomo,
Please tell me how to create Windows AMI through life guard.
ultimately I need to create Windows AMI... The error I got is when I
tried to launch a windows AMI - ami-0529ce6c
WARNING: Failed to launch instance(s). Will retry
com.xerox.amazonws.ec2.EC2Exception: Client error : Not authorized for images: [
ami-0529ce6c]
at com.xerox.amazonws.ec2.Jec2.runInstances(Jec2.java:486)
at com.xerox.amazonws.ec2.Jec2.runInstances(Jec2.java:352)
at com.directthought.lifeguard.PoolManager.launchInstances(PoolManager.j
ava:322)
at com.directthought.lifeguard.PoolManager.run(PoolManager.java:112)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.commons.httpclient.HttpException: Client error : Not autho
rized for images: [ami-0529ce6c]
at com.xerox.amazonws.common.AWSQueryConnection.makeRequest(AWSQueryConn
ection.java:172)
at com.xerox.amazonws.ec2.Jec2.runInstances(Jec2.java:455)
... 6 more
Expecting your reply.......
Thanks and Best Regards
Rajshekar
shlomo....@gmail.com wrote:
Hi Rajshekar,
Here's a response I sent to the lifeguard-dev list. I hope it helps!
Please continue this thread on the lifeguard-dev list.
.. Shlomo
Hi Rajshekar,
and rebuild the library.
.. Shlomo
________________________________
This email may contain confidential material. If you were not an
intended recipient,
please notify the sender and delete all copies.
________________________________
--
You might find the following article, written by David Kavanagh (the
creator of lifeguard) helpful overall:
http://developer.amazonwebservices.com/connect/entry.jspa?externalID=915&categoryID=102
Lifeguard is not related to the boto library. The boto library can be
used to build a framework that works similarly to lifeguard.
.. Shlomo
On Thu, May 14, 2009 at 1:13 PM, rajashekar.s
<rajash...@excelindia.com> wrote:
> Hi Shlomo,
>
> Now I am able to start a windows AMI (a different AMI ID). I think the OLD
> AMI ID has some problem in getting created. I am trying to understand the
> architectural aspects of the working of life guard. I request you to clarify
> some of my doubts
>
> (1) Who will send the message to queue when I start an instance..... is it
> necessary to embed any program in AMI (which will be started automatically
> by lifeguard) to do this work when the same is started.
>
> (2) Is it any where related to BOTO framework???
>
> (3) By seeing the diagram I understand that, Lifeguard application creates
> specified AMI, monitors the messages in the queue for a particular instance
> ID with in the pool, when it finds an instance Idle for some specified time,
> it terminates the instance, and when a new message pops into the queue
> depending the work load calculation it starts a new instance......
>
> If I am wrong in this please correct me......
>
> My main issue is who will put the message and what should be the text in the
> message??
>
> I am supposed to make an architectural document of working of life guard
>
> Please help me with this
>
> Thanks and Best regards
> Rajshekar
>
>
> --
>