Issue with aws identifiers

27 views
Skip to first unread message

somer

unread,
Aug 30, 2009, 2:02:26 PM8/30/09
to lifeguard-dev
Hello,

Can you tell me what to put in
aws.secret.accessId=
aws.secret.secretKey=
aws.double.secret.accessId=
aws.double.secret.secretKey=

I know aws.accessId and aws.secretKey but have no idea about the
above.



Also, can you please help me, what does following mean and how can i
fix this ?


[java] Aug 30, 2009 1:58:12 PM
org.springframework.beans.factory.xml.XmlBea
nDefinitionReader loadBeanDefinitions
[java] INFO: Loading XML bean definitions from class path
resource [beans.x ml]
[java] Aug 30, 2009 1:58:13 PM
org.springframework.core.io.support.Properti
esLoaderSupport loadProperties
[java] INFO: Loading properties file from class path resource
[aws.properti es]
[java] Exception in thread "main"
org.springframework.beans.factory.BeanDef
initionStoreException: Error registering bean with name 'manager'
defined in cla ss path
resource [beans.xml]: Could not resolve placeholder
'aws.secret.accessId '
[java] at
org.springframework.beans.factory.config.PropertyPlaceholderC
onfigurer.processProperties(PropertyPlaceholderConfigurer.java:249)
[java] at
org.springframework.beans.factory.config.PropertyResourceConf
igurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
[java] at com.directthought.lifeguard.RunManager.main
(RunManager.java:3 8)
[java] Java Result: 1

BUILD SUCCESSFUL
Total time: 2 seconds

shlomo

unread,
Aug 30, 2009, 2:53:30 PM8/30/09
to lifeguard-dev
Hi somer,

The secret and double-secret credentials can be two sets of AWS
credentials.
The "secret" and "double-secret" concept is from an article by Mitch
Garnaat. Part 1 describes the various different AWS account
credentials
http://www.elastician.com/2009/06/managing-your-aws-credentials-part-1.html
and part 2 introduces the technique of keeping two separate
credentials for enhanced security:
http://www.elastician.com/2009/06/managing-your-aws-credentials-part-2.html

If you don't need the enhanced security of two separate accounts then
just put the same credentials in the double-secret properties as you
put in the secret properties.
That's an error you get when the AWS credentials properties do not
have a value. Define them as described above and try again - it should
work.

.. Shlomo

somer

unread,
Aug 30, 2009, 5:07:59 PM8/30/09
to lifeguard-dev
Hi shlomo

Thank you very much, i`ll update this topic once i fix my issue.

Best Regards

somer

unread,
Aug 30, 2009, 5:44:50 PM8/30/09
to lifeguard-dev
Hi,

I wont use two separate accounts i guess.

So i`ve access id and secret access key for all services at once.

Lets say access id is 7GJKDMSDHJH9980 and secret access key is
9HSSDKH/79JSLDSNDHSDHSJ

so i`ve put

# note, use single access id/secret key
aws.accessId=
aws.secretKey=


aws.secret.accessId= 7GJKDMSDHJH9980
aws.secret.secretKey= 9HSSDKH/79JSLDSNDHSDHSJ
aws.double.secret.accessId= 7GJKDMSDHJH9980
aws.double.secret.secretKey= 9HSSDKH/79JSLDSNDHSDHSJ


Notice that i havent put anything at aws.accessId and aws.secretKey,
it did not work, i received the same error, what am i doing wrong ?

Best Regards

shlomo....@gmail.com

unread,
Aug 30, 2009, 5:54:49 PM8/30/09
to lifegu...@googlegroups.com
Ah. It looks like the beans.xml might need updating to use the secret and double-secret credentials cleanly.

In the meantime, you can use the aws.accessId and aws.secretKey properties and leave the "aws.secret.*" and "aws.double.secret.*" properties blank.

somer

unread,
Aug 31, 2009, 5:49:08 AM8/31/09
to lifeguard-dev
Hi,

When i only use aws.accessId and aws.secretKey properties and leave
other empty then i receive error regarding aws.secret.accessId (the
same error), i`m using latest svn.

Best Regards

shlomo....@gmail.com

unread,
Aug 31, 2009, 6:28:50 AM8/31/09
to lifegu...@googlegroups.com
somer,

Sounds like a bug.

What happens if, as a workaround, you specify the same keys in all three places?

.. Shlomo

somer

unread,
Aug 31, 2009, 3:25:43 PM8/31/09
to lifeguard-dev
Hi,

Its same error when i use same keys for all three places. What do you
suggest me to do ? Thanks

Best Regards

David Kavanagh

unread,
Aug 31, 2009, 3:47:36 PM8/31/09
to lifegu...@googlegroups.com
Hi, Sorry I didn't reply right away, but glad that Shlomo stepped in!
If you simply define the aws.accessId and aws.secretKey, but don't
define the others, the pool manager will work as it always has. There
is a test in the code that checks for the secret and double secret
creds, so if you define those, it will try to use them. I honestly
can't say that the double secret mode works totally as planned, so
unless you really want to use it, I'd avoid it. I was testing this at
work last month, but other priorities took me away from it (we're
still using lifeguard in the traditional security sense).

David

somer

unread,
Aug 31, 2009, 5:00:41 PM8/31/09
to lifeguard-dev
Hi David,

I`m glad he has replied, thanks to him.

When i only define aws.accessId and aws.secretKey i still get that
error while trying to run ant run, the error is always same "class
path
resource [beans.xml]: Could not resolve placeholder
'aws.secret.accessId "

I guess i`m missing something here but cant understand what might be,
i can run the text2pdf service (I run it in test mode, nolaunch set to
true)


Thanks for everything.

Best Regards

somer

unread,
Sep 4, 2009, 10:28:01 AM9/4/09
to lifeguard-dev
Hi,

Just an update, i tried using older svn and revision 70 worked without
any issue.

Can i ask if the queues have to be created before running the service
or lifeguard creates them ?

Best Regards

shlomo....@gmail.com

unread,
Sep 4, 2009, 10:32:33 AM9/4/09
to lifegu...@googlegroups.com
somer,

Lifeguard creates the queues if they do not exist. It uses the Typica library (also written by David Kavanagh) and its getOrCreateMessageQueue function to get the queue.

.. Shlomo

somer

unread,
Sep 6, 2009, 7:49:48 AM9/6/09
to lifeguard-dev
Hi Shlomo,

Thanks, now i receive the following

run:
[java] Sep 6, 2009 7:46:37 AM
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
[java] INFO: Loading XML bean definitions from class path
resource [beans.xml]
[java] Sep 6, 2009 7:46:38 AM
org.springframework.core.io.support.PropertiesLoaderSupport
loadProperties
[java] INFO: Loading properties file from class path resource
[aws.properties]
[java] >>>>>>>>>>> service name : Transcode
[java] >>>>>>>>>>> status queue name : poolStatusTranscode
[java] >>>>>>>>>>> work queue name : transcode-input
[java] Sep 6, 2009 7:46:41 AM
com.directthought.lifeguard.util.QueueUtil getQueueOrElse
[java] SEVERE: Error access message queue, Retrying.
[java] com.xerox.amazonws.sqs.SQSException: Client error :
[java] at
com.xerox.amazonws.sqs.QueueService.getOrCreateMessageQueue
(QueueService.java:132)
[java] at
com.directthought.lifeguard.util.QueueUtil.getQueueOrElse
(QueueUtil.java:18)
[java] at com.directthought.lifeguard.PoolManager.run
(PoolManager.java:125)
[java] at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(Unknown Source)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run
(Unknown Source)
[java] at java.lang.Thread.run(Unknown Source)
[java] Caused by: org.apache.commons.httpclient.HttpException:
Client error :
[java] at
com.xerox.amazonws.common.AWSQueryConnection.makeRequest
(AWSQueryConnection.java:172)
[java] at
com.xerox.amazonws.sqs.QueueService.getOrCreateMessageQueue
(QueueService.java:124)
[java] ... 5 more
[java] Sep 6, 2009 7:46:41 AM
com.directthought.lifeguard.util.QueueUtil getQueueOrElse
[java] SEVERE: Error access message queue, Retrying.
[java] com.xerox.amazonws.sqs.SQSException: Client error :
[java] at
com.xerox.amazonws.sqs.QueueService.getOrCreateMessageQueue
(QueueService.java:132)
[java] at
com.directthought.lifeguard.util.QueueUtil.getQueueOrElse
(QueueUtil.java:18)
[java] at com.directthought.lifeguard.StatusLogger.run
(StatusLogger.java:57)
[java] at java.lang.Thread.run(Unknown Source)
[java] Caused by: org.apache.commons.httpclient.HttpException:
Client error :
[java] at
com.xerox.amazonws.common.AWSQueryConnection.makeRequest
(AWSQueryConnection.java:172)
[java] at
com.xerox.amazonws.sqs.QueueService.getOrCreateMessageQueue
(QueueService.java:124)
[java] ... 3 more
[java] Exception in thread "main" java.lang.NullPointerException
[java] at com.directthought.lifeguard.RunManager.main
(RunManager.java:57)

I guess this is because the input queue(work) having no messages, am i
correct ?

I also receive the following when i try to run ingest.sh or
poolmanager.sh

Exception in thread "main" java.lang.NoClassDefFoundError: com/
directthought/lifeguard/RunManager

How can i fix it ? I dont get the same error with apache ant utility,
it works.

Thank you very much.

Best Regards
> > > > On Mon, Aug 31, 2009 at 3:25 PM, somer<someror...@gmail.com> wrote:
>
> > > > > Hi,
>
> > > > > Its same error when i use same keys for all three places. What do you
> > > > > suggest me to do ? Thanks
>
> > > > > Best Regards
>
> > > > > shlomo.swid...@gmail.com wrote:
> > > > >> somer,
>
> > > > >> Sounds like a bug.
>
> > > > >> What happens if, as a workaround, you specify the same keys in all
> > three
> > > > >> places?
>
> > > > >> .. Shlomo
> > > > >> On Mon, Aug 31, 2009 at 12:49 PM, somer <someror...@gmail.com>
> > wrote:
>
> > > > >> > Hi,
>
> > > > >> > When i only use aws.accessId and aws.secretKey properties and
> > leave
> > > > >> > other empty then i receive error regarding aws.secret.accessId
> > (the
> > > > >> > same error), i`m using latest svn.
>
> > > > >> > Best Regards
>
> > > > >> > shlomo.swid...@gmail.com wrote:
> > > > >> > > Ah. It looks like the beans.xml might need updating to use the
> > secret and
> > > > >> > > double-secret credentials cleanly.
>
> > > > >> > > In the meantime, you can use the aws.accessId and aws.secretKey
> > > > >> > properties
> > > > >> > > and leave the "aws.secret.*" and "aws.double.secret.*"
> > properties blank.
>
> > > > >> > > On Mon, Aug 31, 2009 at 12:44 AM, somer <someror...@gmail.com>
> >http://www.elastician.com/2009/06/managing-your-aws-credentials-part-...
> > > > >> > > > > and part 2 introduces the technique of keeping two separate
> > > > >> > > > > credentials for enhanced security:
>
> >http://www.elastician.com/2009/06/managing-your-aws-credentials-part-...
> > > > >> > > > > .. Shlomo- Hide quoted text -
>
> - Show quoted text -

somer

unread,
Sep 6, 2009, 7:55:31 AM9/6/09
to lifeguard-dev
And sqs queues are not created.
> ...
>
> read more »- Hide quoted text -

David Kavanagh

unread,
Sep 6, 2009, 9:32:32 AM9/6/09
to lifegu...@googlegroups.com
I wonder if (and the error messages don't call this out), if you had
created the message queues in the old API and they are interfering
with using those queues in the new API? This is probably an easy
question to answer. Prior to June of this year, lifeguard was using
the older SQS APi. I upgraded lifeguard to use the new SQS API in June
and that is good in general, but causes some problems. Queues created
with the old API can't be used with the new API. You get a name
collision. The trick then is to use the old API and delete your
queues. You can do this with some of the typica test code since typica
supports both APIs. There is code called "TestQueueSevice" in the
test/java directory in SVN. If you look at the code, you'll see that
it has a loop in there to delete queues based on some name prefix...
that was for my own uses, but you'd want to change the code to delete
all queues. Also, make sure the imports near the top of the file point
to the "sqs" package (not the "sqs2" package).

David
Reply all
Reply to author
Forward
0 new messages