Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1315

Remote pull replication with filter and params fails with reason: invalid UTF-8 JSON

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.1
    • None
    • Replication
      • Windows 7 x64 on target machine
      • Windows 7 x32 on source machine

    Description

      I'm posting the following to: http://localhost:5984/_replicate
      {"source":"http://MARTIN-LT:5984/pdlib","target":"pdlib", "filter":"replication/SINGLE_COLLECTION", "query_params": {"key":"bb579347-9bfb-4dda-84eb-622b43108872"}}

      This is the output from the remote machine log:

      [Mon, 17 Oct 2011 01:20:48 GMT] [debug] [<0.476.0>] 'GET' /pdlib/_changes?key=bb579347-9bfb-4dda-84eb-622b43108872&filter=replication/SINGLE_COLLECTION&style=all_docs&heartbeat=10000&since=0&feed=normal

      {1, 1}

      Headers: [

      {'Accept',"application/json"}

      ,

      {'Content-Length',"0"}

      ,

      {'Host',"MARTIN-NEWPC:5984"}

      ,

      {'User-Agent',"CouchDB/1.0.2"}

      ]

      [Mon, 17 Oct 2011 01:20:48 GMT] [debug] [<0.476.0>] OAuth Params: [

      {"key","bb579347-9bfb-4dda-84eb-622b43108872"}

      ,

      {"filter","replication/SINGLE_COLLECTION"}

      ,

      {"style","all_docs"}

      ,

      {"heartbeat","10000"}

      ,

      {"since","0"}

      ,

      {"feed","normal"}

      ]

      [Mon, 17 Oct 2011 01:20:48 GMT] [info] [<0.476.0>] 192.168.2.3 - - 'GET' /pdlib/_changes?key=bb579347-9bfb-4dda-84eb-622b43108872&filter=replication/SINGLE_COLLECTION&style=all_docs&heartbeat=10000&since=0&feed=normal 200

      [Mon, 17 Oct 2011 01:20:48 GMT] [error] [<0.476.0>] attempted upload of invalid JSON (set log_level to debug to log it)

      [Mon, 17 Oct 2011 01:20:48 GMT] [debug] [<0.476.0>] Invalid JSON: <<"bb579347-9bfb-4dda-84eb-622b43108872">>

      [Mon, 17 Oct 2011 01:20:48 GMT] [info] [<0.476.0>] 192.168.2.3 - - 'GET' /pdlib/_changes?key=bb579347-9bfb-4dda-84eb-622b43108872&filter=replication/SINGLE_COLLECTION&style=all_docs&heartbeat=10000&since=0&feed=normal 400

      [Mon, 17 Oct 2011 01:20:48 GMT] [debug] [<0.476.0>] httpd 400 error response:

      {"error":"bad_request","reason":"invalid UTF-8 JSON"}

      This only happens on a pull replication, if I switch source and target values it works correctly.

      Attachments

        Activity

          People

            Unassigned Unassigned
            martincastell Martin Castellanos
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: