jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zack Shoylev <zack.shoy...@RACKSPACE.COM>
Subject Re: put operation is not repeatable
Date Wed, 23 Nov 2016 22:28:22 GMT
There were some bugfixes in 2.0.0 that can potentially fix your problem based on exactly what
is failing. Have you tried that?
From: Aleksandra Nowak <aleksandra.nowak@man.poznan.pl>
Sent: Wednesday, November 23, 2016 5:08 AM
To: user@jclouds.apache.org
Subject: put operation is not repeatable


I use jclouds to communicate with Openstack Swift (authentication is
provided by Keystone).

Every once in a while I get this exception:

Cannot retry after server error, command is not replayable:
[method=org.jclouds.openstack.swift.SwiftKeystoneClient.public abstract

Server rejected operation connecting to PUT http://swift... (full
exception here: http://pastebin.com/WVtc0U3f)

Here is the code which I run to upload objects: http://pastebin.com/GKr1CaSQ

After the error the application can be "fixed" by a restart or by
executing a GET request to an existing object. I figured that this
happens because the key from Keystone expires before the PUT command is
executed. And while GET method is requesting a new key from Keystone,
PUT is not. And I confirmed it using ngrep on Keystone port. During PUT
there is no communication to Keystone, but during GET I can see that it
requested key renewal:


I turned on jclouds logging on TRACE level. Here is the log when I try
PUT method: http://pastebin.com/RxRBTXDH and here is log for GET first:

So, it looks like PUT method is not repeatable/replayable for
InputStream. Can somebody tell me why? Or point to a point in
documentation where it is described?

Is there a why to upload InputStream to Swift in a repeatable way? My
could is wrapped by a REST call which uses Multipart, so I really would
like to use InputStream. Or is it any other way to renew the key?

Thanks in advance!
Kind regards,

View raw message