> > I notice you filed a related bug against s3ninja recently -- you may
> > want to try S3Proxy[1] instead which has a more complete implementation
> > and actually uses jclouds as its backend.

Hi Andrew,

Just tried out s3proxy - it's exactly what we're looking for. I tried setting 
it up to use aws-v4 authorization against a filesystem backend like this:

$ cat s3proxy.conf 
s3proxy.authorization=aws-v4
s3proxy.endpoint=http://0.0.0.0:8080
s3proxy.identity=identity
s3proxy.credential=secret
jclouds.provider=filesystem
jclouds.filesystem.basedir=/tmp/s3proxy

It seemed to work, but it can't find the container (test-bucket) when I do a 
PUT that works against amazon. This came back from jclouds client when 
configured to use the aws-s3 provider (I added an /etc/hosts entry for the 
vhost-buckets issue - worked like a charm):

Exception in thread "main" org.jclouds.http.HttpResponseException: command: PUT 
http://test-bucket.jmc-dev:8080/myblob HTTP/1.1 failed with response: HTTP/1.1 
500 Unexpected character 'N' (code 78) in prolog; expected '<'? at [row,col 
{unknown-source}]: [1,1]; content: [<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
<title>Error 500 </title>
</head>
<body>
<h2>HTTP ERROR: 500</h2>
<p>Problem accessing /myblob. Reason:
<pre>    Unexpected character &apos;N&apos; (code 78) in prolog; expected 
&apos;&lt;&apos;
 at [row,col {unknown-source}]: [1,1]</pre></p>
<hr /><i><small>Powered by Jetty://</small></i>
</body>
</html>

This came out on the s3proxy console:

com.fasterxml.jackson.core.JsonParseException: Unexpected character 'N' (code 
78) in prolog; expected '<'
 at [row,col {unknown-source}]: [1,1]
        at 
com.fasterxml.jackson.dataformat.xml.util.StaxUtil.throwAsParseException(StaxUtil.java:37)
        at 
com.fasterxml.jackson.dataformat.xml.XmlFactory._initializeXmlReader(XmlFactory.java:657)
        at 
com.fasterxml.jackson.dataformat.xml.XmlFactory._createParser(XmlFactory.java:536)
        at 
com.fasterxml.jackson.dataformat.xml.XmlFactory._createParser(XmlFactory.java:29)
        at 
com.fasterxml.jackson.core.JsonFactory.createParser(JsonFactory.java:820)
        at 
com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3058)
        at 
org.gaul.s3proxy.S3ProxyHandler.handleContainerCreate(S3ProxyHandler.java:1207)
        at org.gaul.s3proxy.S3ProxyHandler.doHandle(S3ProxyHandler.java:707)
        at 
org.gaul.s3proxy.S3ProxyHandlerJetty.handle(S3ProxyHandlerJetty.java:70)
        at 
org.gaul.shaded.org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at 
org.gaul.shaded.org.eclipse.jetty.server.Server.handle(Server.java:499)
        at 
org.gaul.shaded.org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
        at 
org.gaul.shaded.org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
        at 
org.gaul.shaded.org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
        at 
org.gaul.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at 
org.gaul.shaded.org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 
'N' (code 78) in prolog; expected '<'
 at [row,col {unknown-source}]: [1,1]
        at 
com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:653)
        at 
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2133)
        at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1181)
        at 
com.fasterxml.jackson.dataformat.xml.XmlFactory._initializeXmlReader(XmlFactory.java:653)
        ... 15 common frames omitted

The 'N' that it says it's seeing could be coming from my PUT data: "Now is the 
time for all good men..."

Any thoughts?

John

Reply via email to