ERROR: 400 MalformedXML

2009-02-11
2013-02-19
  • Nobody/Anonymous

    Im getting the 400 MalformedXML error, does anyone have any ideas?    Im using rc3, maybe its the encoding?  Below is the debug log:

    # /opt/local/bin/s3cmd --no-encrypt  put /home/user/xxxxxx/s3cmd-0.9.9-rc3.tar s3://xxxxxxxx -d
    DEBUG: ConfigParser: Reading file '/xxxxxx/.s3cfg'
    DEBUG: ConfigParser: access_key->xxxxxxxxxxxx_chars...2
    DEBUG: ConfigParser: acl_public->False
    DEBUG: ConfigParser: bucket_location->US
    DEBUG: ConfigParser: cloudfront_host->cloudfront.amazonaws.com
    DEBUG: ConfigParser: cloudfront_resource->/2008-06-30/distribution
    DEBUG: ConfigParser: debug_syncmatch->False
    DEBUG: ConfigParser: default_mime_type->binary/octet-stream
    DEBUG: ConfigParser: delete_removed->False
    DEBUG: ConfigParser: dry_run->False
    DEBUG: ConfigParser: encoding->ANSI_X3.4-1968
    DEBUG: ConfigParser: encrypt->False
    DEBUG: ConfigParser: force->False
    DEBUG: ConfigParser: get_continue->False
    DEBUG: ConfigParser: gpg_command->/opt/bin/gpg2
    DEBUG: ConfigParser: gpg_decrypt->%(gpg_command)s -d --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
    DEBUG: ConfigParser: gpg_encrypt->%(gpg_command)s -c --verbose --no-use-agent --batch --yes --passphrase-fd %(passphrase_fd)s -o %(output_file)s %(input_file)s
    DEBUG: ConfigParser: gpg_passphrase->xxxxxx_chars...d
    DEBUG: ConfigParser: guess_mime_type->True
    DEBUG: ConfigParser: host_base->s3.amazonaws.com
    DEBUG: ConfigParser: host_bucket->%(bucket)s.s3.amazonaws.com
    DEBUG: ConfigParser: human_readable_sizes->False
    DEBUG: ConfigParser: preserve_attrs->True
    DEBUG: ConfigParser: progress_meter->True
    DEBUG: ConfigParser: proxy_host->
    DEBUG: ConfigParser: proxy_port->0
    DEBUG: ConfigParser: recursive->False
    DEBUG: ConfigParser: recv_chunk->4096
    DEBUG: ConfigParser: secret_key->xxxxxxxxxxx_chars...0
    DEBUG: ConfigParser: send_chunk->4096
    DEBUG: ConfigParser: simpledb_host->sdb.amazonaws.com
    DEBUG: ConfigParser: skip_existing->False
    DEBUG: ConfigParser: use_https->True
    DEBUG: ConfigParser: verbosity->WARNING
    DEBUG: Updating Config.Config encoding -> ANSI_X3.4-1968
    DEBUG: Updating Config.Config encrypt -> False
    DEBUG: Updating Config.Config verbosity -> 10
    DEBUG: Unicodising 'put' using ANSI_X3.4-1968
    DEBUG: Unicodising '/home/user/xxxxx/s3cmd-0.9.9-rc3.tar' using ANSI_X3.4-1968
    DEBUG: Unicodising 's3://xxxxxx' using ANSI_X3.4-1968
    DEBUG: Command: put
    INFO: Compiling list of local files...
    DEBUG: DeUnicodising u'/home/user/xxxxxx' using ANSI_X3.4-1968
    DEBUG: DeUnicodising u's3cmd-0.9.9-rc3.tar' using ANSI_X3.4-1968
    DEBUG: Unicodising 's3cmd-0.9.9-rc3.tar' using ANSI_X3.4-1968
    DEBUG: Unicodising '/home/user/xxxxx/s3cmd-0.9.9-rc3.tar' using ANSI_X3.4-1968
    INFO: Applying --exclude/--include
    DEBUG: CHECK: s3cmd-0.9.9-rc3.tar
    DEBUG: PASS: s3cmd-0.9.9-rc3.tar
    INFO: Summary: 1 local files to upload
    DEBUG: Content-Type set to 'application/x-tar'
    DEBUG: SignHeaders: 'PUT\n\napplication/x-tar\n\nx-amz-date:Wed, 11 Feb 2009 16:48:44 +0000\n/xxxxxxx/'
    DEBUG: CreateRequest: resource[uri]=/
    DEBUG: Unicodising '/home/user/xxxxxx/s3cmd-0.9.9-rc3.tar' using ANSI_X3.4-1968
    /home/user/xxxxxxx/s3cmd-0.9.9-rc3.tar -> s3://xxxxxxxx/  [1 of 1]
    DEBUG: get_hostname(xxxxxxxx): xxxxxxxx.s3.amazonaws.com
    DEBUG: format_uri(): /
    194560 of 194560   100% in    1s   104.76 kB/sDEBUG: Response: {'status': 400, 'headers': {'x-amz-id-2': 'xxxxxxxxxxxxxxxxxxxxx', 'server': 'AmazonS3', 'transfer-encoding': 'chunked', 'x-amz-request-id': 'xxxxxxxx', 'date': 'Wed, 11 Feb 2009 16:48:45 GMT', 'nncoection': 'close', 'content-type': 'application/xml'}, 'reason': 'Bad Request', 'data': '<?xml version="1.0" encoding="UTF-8"?>\n<Error><Code>MalformedXML</Code><Message>The XML you provided was not well-formed or did not validate against our published schema</Message><RequestId>xxxxxxxxxxxxxxxxx</RequestId><HostId>xxxxxxxxxxxxxxx</HostId></Error>', 'size': 194560L}
    194560 of 194560   100% in    1s   102.20 kB/s  done
    DEBUG: S3Error: 400 (Bad Request)
    DEBUG: HttpHeader: x-amz-id-2: xxxxxxxxxxxxxxxx
    DEBUG: HttpHeader: server: AmazonS3
    DEBUG: HttpHeader: transfer-encoding: chunked
    DEBUG: HttpHeader: x-amz-request-id: xxxxxxxxxxxxxxxxxxxxx
    DEBUG: HttpHeader: etag:
    DEBUG: HttpHeader: date: Wed, 11 Feb 2009 16:48:45 GMT
    DEBUG: HttpHeader: nncoection: close
    DEBUG: HttpHeader: content-type: application/xml
    DEBUG: ErrorXML: Code: 'MalformedXML'
    DEBUG: ErrorXML: Message: 'The XML you provided was not well-formed or did not validate against our published schema'
    DEBUG: ErrorXML: RequestId: 'xxxxxxxxxxxx'
    DEBUG: ErrorXML: HostId: 'xxxxxxxxxxxxxxxxxx'
    ERROR: S3 error: 400 (MalformedXML): The XML you provided was not well-formed or did not validate against our published schema

     
    • Michal Ludvig

      Michal Ludvig - 2009-02-11

      S3cmd 'put' shouldn't send out any XML. How could it be malformed then?? Is it still reproducible?

       
      • Nobody/Anonymous

        I think I wasnt using s3cmd correctly.  If I put a slash at the end of the s3:// path, for instance,  s3://mybucket/  <--  that last slash, then it works great.  FYI, I checked the usage logs at Amazon, and it seems like the requests that didnt have that slash at the end were going as "CreateBucket" calls. 

        Thanks for such an awesome tool.  Im using this on a hacked Linksys NSLU2 to automatically back it all up to S3.  Looks like it will work great.

         
        • Michal Ludvig

          Michal Ludvig - 2009-02-11

          > If I put a slash at the end of the s3:// path, for instance, s3://mybucket/ <-- that last slash, then it works great.

          Ah, thanks for figuring this out. Now I can reproduce it as well.
          It's indeed a bug, s3cmd should work with or without the trailing slash. I'll fix it.

           
    • Nobody/Anonymous

      Thats even stranger.  Yes it happens for every put request I try.

       
      • Michal Ludvig

        Michal Ludvig - 2009-02-11

        Does it happen for other than PUT requests as well?

         
    • Nobody/Anonymous

      I've been hitting the same bug all night.  I was following what I thought was the expected syntax from "--help" that shows no trailing "/" in the put command after the bucket name: "s3cmd put FILE [FILE...] s3://BUCKET[/PREFIX]"

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks