You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Daniel Hsueh <Da...@evault.com> on 2014/08/19 19:42:57 UTC
JClouds BlobStore re-authentication when auth token expires
Hello,
I've done some google searches and haven't found much information on this -- is there a standard way (or automatic within jclouds) to perform re-authentication when the token expires?
Thank you.
Daniel Hsueh
mailto:daniel.hsueh@evault.com
RE: JClouds BlobStore re-authentication when auth token expires
Posted by Andrew Phillips <an...@apache.org>.
> fixed delay between the 2,3,4th attempts. Is there a way to
> configure an increasing backoff?
According to its Javadoc, [1] BackoffLimitedRetryHandler already
provides an exponential backoff. Is that the kind of thing you're
looking for?
Glad to hear the re-authentication is working, at least!
ap
[1]
http://javadocs.jclouds.cloudbees.net/org/jclouds/http/handlers/BackoffLimitedRetryHandler.html
RE: JClouds BlobStore re-authentication when auth token expires
Posted by Daniel Hsueh <Da...@evault.com>.
Hello everyone,
I've verified in my test program that re-authentication in fact does work, using the RetryOnRenew code that Andrew pointed out. (I don't know what happened in my earlier failures...)
One thing I'd like to configure is some kind of exponential backoff when the auth retry fails. IIRC, there are three RetryOnRenew classes, and they either retry 5 times, or retry 5 times with a fixed delay between the 2,3,4th attempts. Is there a way to configure an increasing backoff?
Thanks!
Daniel Hsueh
mailto:daniel.hsueh@evault.com tel:+1-905-287-2167
RE: JClouds BlobStore re-authentication when auth token expires
Posted by Daniel Hsueh <Da...@evault.com>.
I'll isolate the problem via a small test program and file a bug.
Daniel Hsueh
mailto:daniel.hsueh@evault.com
-----Original Message-----
From: Jeremy Daggett [mailto:jeremy.daggett@RACKSPACE.COM]
Sent: August 21, 2014 4:20 PM
To: user@jclouds.apache.org
Subject: Re: JClouds BlobStore re-authentication when auth token expires
Hi Daniel!
Can you please take a look at our ³Report a Bug² page and provide as much information to us as possible? That would be greatly appreciated!
http://jclouds.apache.org/reference/report-a-bug/
As soon as we get some additional information, we should be able to assist you further.
/jd
[snip]
Re: JClouds BlobStore re-authentication when auth token expires
Posted by Jasdeep Hundal <ja...@gmail.com>.
It's possible that you're hitting a code path that doesn't go through the
RetryOnRenew handler that Andrew linked.
This could be especially true if you're using the OpenStack Icehouse
release, as the default token expiration was changed to 1 hour from 24
hours for this cycle, and the KeystoneAuthenticationModule [1] in JClouds
hardcodes expiration for cached tokens at 11 hours.
Jasdeep
[1]
https://github.com/jclouds/jclouds/blob/744cd5d7ebb5c2135ce1330ca0ee5c4ae48ff2cb/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/config/KeystoneAuthenticationModule.java#L223
On Thu, Aug 21, 2014 at 11:25 AM, Daniel Hsueh <Da...@evault.com>
wrote:
> Hello Andrew,
>
> I'm using org.jclouds.openstack.swift.v1.SwiftApi with a v2 auth
> endpoint. I don't have an exception output text offhand (logs have been
> rotated out) but the message specifically indicated auth token expiry.
>
> Daniel Hsueh
> mailto:daniel.hsueh@evault.com
>
> -----Original Message-----
> From: Andrew Phillips [mailto:andrewp@apache.org]
> Sent: August 19, 2014 1:51 PM
> To: user@jclouds.apache.org
> Subject: Re: JClouds BlobStore re-authentication when auth token expires
>
> > I've done some google searches and haven't found much information on
> > this -- is there a standard way (or automatic within jclouds) to
> > perform re-authentication when the token expires?
>
> Which provider are you talking about specifically? There a quite a few
> APIs in jclouds the try to renew authentication automatically, see e.g. [1].
>
> I assume that catching an authentication exception in your calling code
> and retrying isn't an option for you?
>
> Regards
>
> ap
>
> [1]
>
> https://github.com/jclouds/jclouds/blob/master/common/openstack/src/main/java/org/jclouds/openstack/handlers/RetryOnRenew.java
>
>
Re: JClouds BlobStore re-authentication when auth token expires
Posted by Jeremy Daggett <je...@RACKSPACE.COM>.
Hi Daniel!
Can you please take a look at our ³Report a Bug² page and provide as much
information to us as possible? That would be greatly appreciated!
http://jclouds.apache.org/reference/report-a-bug/
As soon as we get some additional information, we should be able to assist
you further.
/jd
On 8/21/14, 11:25 AM, "Daniel Hsueh" <Da...@evault.com> wrote:
>Hello Andrew,
>
>I'm using org.jclouds.openstack.swift.v1.SwiftApi with a v2 auth
>endpoint. I don't have an exception output text offhand (logs have been
>rotated out) but the message specifically indicated auth token expiry.
>
>Daniel Hsueh
>mailto:daniel.hsueh@evault.com
>
>-----Original Message-----
>From: Andrew Phillips [mailto:andrewp@apache.org]
>Sent: August 19, 2014 1:51 PM
>To: user@jclouds.apache.org
>Subject: Re: JClouds BlobStore re-authentication when auth token expires
>
>> I've done some google searches and haven't found much information on
>> this -- is there a standard way (or automatic within jclouds) to
>> perform re-authentication when the token expires?
>
>Which provider are you talking about specifically? There a quite a few
>APIs in jclouds the try to renew authentication automatically, see e.g.
>[1].
>
>I assume that catching an authentication exception in your calling code
>and retrying isn't an option for you?
>
>Regards
>
>ap
>
>[1]
>https://github.com/jclouds/jclouds/blob/master/common/openstack/src/main/j
>ava/org/jclouds/openstack/handlers/RetryOnRenew.java
>
RE: JClouds BlobStore re-authentication when auth token expires
Posted by Daniel Hsueh <Da...@evault.com>.
Hello Andrew,
I'm using org.jclouds.openstack.swift.v1.SwiftApi with a v2 auth endpoint. I don't have an exception output text offhand (logs have been rotated out) but the message specifically indicated auth token expiry.
Daniel Hsueh
mailto:daniel.hsueh@evault.com
-----Original Message-----
From: Andrew Phillips [mailto:andrewp@apache.org]
Sent: August 19, 2014 1:51 PM
To: user@jclouds.apache.org
Subject: Re: JClouds BlobStore re-authentication when auth token expires
> I've done some google searches and haven't found much information on
> this -- is there a standard way (or automatic within jclouds) to
> perform re-authentication when the token expires?
Which provider are you talking about specifically? There a quite a few APIs in jclouds the try to renew authentication automatically, see e.g. [1].
I assume that catching an authentication exception in your calling code and retrying isn't an option for you?
Regards
ap
[1]
https://github.com/jclouds/jclouds/blob/master/common/openstack/src/main/java/org/jclouds/openstack/handlers/RetryOnRenew.java
Re: JClouds BlobStore re-authentication when auth token expires
Posted by Andrew Phillips <an...@apache.org>.
> I've done some google searches and haven't found much information on
> this -- is there a standard way (or automatic within jclouds) to
> perform re-authentication when the token expires?
Which provider are you talking about specifically? There a quite a few
APIs in jclouds the try to renew authentication automatically, see
e.g. [1].
I assume that catching an authentication exception in your calling
code and retrying isn't an option for you?
Regards
ap
[1]
https://github.com/jclouds/jclouds/blob/master/common/openstack/src/main/java/org/jclouds/openstack/handlers/RetryOnRenew.java