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

Adding security to the replication database leads to crashes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2
    • 1.2
    • Replication
    • None
    • Ubuntu

    Description

      If I set Admin and reader security on the replication database the replicator will crash when adding new records to the database with a "not authorised error". It will continue to crash while trying to restart replication and even after a restart

      1. Create several databases and replication rules - everything works fine
      2. Add reader security to the replication database
      3. Insert new document into the replication database. Replication will record the error and stop all replication

      [Fri, 02 Dec 2011 10:45:36 GMT] [debug] [<0.216.0>] OS Process #Port<0.2851> Input :: ["ddoc","_design/_replicator",["valida
      te_doc_update"],[{"_id":"8d158931ac19d99f96f2aad68104aa09","target":"testrep","continuous":true,"source":"http://admin:aaaaa@
      127.0.0.1:5984/dbz_molly","_revisions":{"start":0,"ids":[]}},null,

      {"db":"ndz_replicator","name":"admin","roles":["_admin"]}

      ,{
      "admins":

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

      ,"members":{"names":[],"roles":["_admin","_replicator"]}}]]
      [Fri, 02 Dec 2011 10:45:36 GMT] [debug] [<0.216.0>] OS Process #Port<0.2851> Output :: 1
      [Fri, 02 Dec 2011 10:45:36 GMT] [info] [<0.12560.0>] 109.150.210.170 - - PUT /ndz_replicator/8d158931ac19d99f96f2aad68104aa09
      201
      [Fri, 02 Dec 2011 10:45:36 GMT] [debug] [<0.117.0>] Not a reader: UserCtx

      {user_ctx,null,[],undefined}

      vs Names [] Roles [<<"
      _admin">>,
      <<"_admin">>,
      <<"_replicator">>]
      [Fri, 02 Dec 2011 10:45:36 GMT] [error] [<0.110.0>] Replication manager received unexpected message {'EXIT',
      <0.117.0>,
      {{nocatch,
      {unauthorized,
      <<"You are not authorized to access this db.">>}},
      [

      {couch_db, open, 2}

      ,

      {couch_changes, keep_sending_changes, 9}

      ,

      {couch_changes, '-handle_changes/3-fun-1-', 5}

      ,

      {couch_replication_manager, '-changes_feed_loop/0-fun-1-', 2}

      ]}}
      [Fri, 02 Dec 2011 10:45:36 GMT] [error] [emulator] Error in process <0.117.0> with exit value: {{nocatch,{unauthorized,<<41 b
      ytes>>}},[

      {couch_db,open,2}

      ,

      {couch_changes,keep_sending_changes,9}

      ,

      {couch_changes,'-handle_changes/3-fun-1-',5}

      ,

      {couch_replic ation_manager,'-changes_feed_loop/0-fun-1-',2}

      ]}

      [Fri, 02 Dec 2011 10:45:36 GMT] [info] [<0.110.0>] Stopping all ongoing replications because the replicator database was deleted or changed

      I am testing against a trunk build of CouchDB but think I have seen similar behaviour on 1.1.x but hadn't pinned down the cause

      Attachments

        Activity

          People

            Unassigned Unassigned
            mhigham Martin Higham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: