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

Replication errors when posting doc as admin to _replicator db where doc contains a target db which has a security doc with "members":{"names":[],"roles":["_admin"]}

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 1.2
    • 1.2
    • Replication
    • None
    • Regular Contributors Level (Easy to Medium)

    Description

      The following are the curl commands to reproduce this error:

      curl -X PUT http://admin:admin@localhost:5984/test-broken-replicator/
      curl -X PUT http://admin:admin@localhost:5984/test-broken-replicator/_security \
      -H "Content-Type: application/json" -d '{"admins":

      {"names":[],"roles":[]}

      ,"members":{"names":[],"roles":["_admin"]}}'
      curl -X PUT http://admin:admin@localhost:5984/test-broken-replicator-2/
      curl -X POST http://admin:admin@localhost:5984/_replicator \
      -H "Content-Type: application/json" -d '

      { "source" : "test-broken-replicator-2", "target" : "test-broken-replicator"}

      '

      here is the _replicator doc created, with the error state:
      {
      "_id": "d3d80187927957468e11f2e9cd000bc7",
      "_rev": "2-210555af6240c91fd5ed8f4c65009c7a",
      "source": "test-broken-replicator-2",
      "target": "test-broken-replicator",
      "owner": "admin",
      "_replication_state": "error",
      "_replication_state_time": "2012-04-25T20:52:16-06:00",
      "_replication_id": "e19511da196febe1da5f74495f132255"
      }

      Here is the snip from the debug log

      2012-04-25 20:52:16.792 [info] <0.149.0>@couch_httpd:log_request:662 127.0.0.1 - - POST /_replicator 201
      2012-04-25 20:52:16.795 [info] <0.206.0>@couch_replicator_manager:maybe_start_replication:374 Attempting to start replication `e19511da196febe1da5f74495f132255` (document `d3d80187927957468e11f2e9cd000bc7`).
      2012-04-25 20:52:16.798 [error] <0.1996.0> CRASH REPORT Process <0.1996.0> with 0 neighbours crashed with reason:

      {unauthorized,<<"unauthorized to access or create database test-broken-replicator">>}
      2012-04-25 20:52:16.810 [error] <0.206.0>@couch_replicator_manager:maybe_retry_replication:487 Error in replication `e19511da196febe1da5f74495f132255` (triggered by document `d3d80187927957468e11f2e9cd000bc7`): {unauthorized,<<"unauthorized to access or create database test-broken-replicator">>}

      Restarting replication in 5 seconds.
      2012-04-25 20:52:21.817 [error] <0.2005.0> CRASH REPORT Process <0.2005.0> with 0 neighbours crashed with reason:

      {unauthorized,<<"unauthorized to access or create database test-broken-replicator">>}
      2012-04-25 20:52:21.819 [error] <0.206.0>@couch_replicator_manager:maybe_retry_replication:487 Error in replication `e19511da196febe1da5f74495f132255` (triggered by document `d3d80187927957468e11f2e9cd000bc7`): {unauthorized,<<"unauthorized to access or create database test-broken-replicator">>}

      Restarting replication in 10 seconds.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ryanramage Ryan Ramage
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: