Hi,
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
java.lang.String
org.jclouds.openstack.swift.CommonSwiftClient.putObject(java.lang.String,org.jclouds.openstack.swift.domain.SwiftObject)...
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:
http://pastebin.com/Wi2xzWZ9
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:
http://pastebin.com/WhvG4Wy9
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,
Aleksandra