[ https://issues.apache.org/jira/browse/JCLOUDS-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15493209#comment-15493209 ]
Nick Howes commented on JCLOUDS-1179: ------------------------------------- On a blobStore.getBlob, when BaseHttpCommandExecutorService encounters a 401 it is returned as a normal response and so handled by the client retry handler, which is RetryOnRenew which renews tokens. On a blobStore.putBlob, a ProtocolException is thrown and it is handled by the IOExceptionRetryHandler, which is BackoffLimitedRetryHandler which retries 5 times but doesn't renew tokens. This seems to be because of HttpUrlConnection (the Sun/Oracle implementation anyway), which will throw {{ProtocolException("Server rejected operation")}} if the request has {{Expect: 100-Continue}} header but it receives anything other than a 100. > putBlob doesn't handle 401s > ---------------------------- > > Key: JCLOUDS-1179 > URL: https://issues.apache.org/jira/browse/JCLOUDS-1179 > Project: jclouds > Issue Type: Bug > Components: jclouds-blobstore > Affects Versions: 1.9.2, 2.0.0 > Environment: Devstack on Ubuntu 14.04 > Reporter: Nick Howes > Labels: openstack-swift, swift > > After the token used by jclouds expires, subsequent `putBlob` requests to > swift fail with 401. > Unlike other operations, the `putBlob` command does not resolve this by > `POST`ing to keystone, but instead tries a few times to `PUT` the blob to > swift. Each request fails with a 401 and then it gives up. > Other operations such as a get _will_ handle a retry by refreshing the auth > token, after which subsequent puts work (until the next expiry) > Project to reproduce can be found here > https://github.com/UniversityofWarwick/jclouds-bug > It should be noted that when running this script I have altered [token] > expiration in /etc/keystone/keystone.conf to be 2 seconds. -- This message was sent by Atlassian JIRA (v6.3.4#6332)