couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tibor Gemes <>
Subject _replicator and _users
Date Wed, 06 Feb 2013 09:17:01 GMT

I have some problem with persistent continouos replicating the _users

I've set up 2 servers, one local and one remote. I want to replicate the
_users database always. So I decided to add a document to the _replicator
database. This seems to be fine. But after I add a user document to the
_users database, the replicator keeps failing. It is in an endless
triggered-error-triggered-error cycle, but the replication does not take
place. If I call _replicate with the same json, then the replication
happens perfectly. If the two _users databases are in sync then the
replicator document settles in the triggered state.

Both REMOTE_URL and LOCAL_URL variables contains the proper basic auth
crendentials for the admin user.

Here are the steps to reproduce:
# add a replicator document
curl  -H "Content-type: application/json" -X PUT -d "{\"source\":
\"_users\", \"target\": \"${REMOTE_URL}/_users\", \"continuous\":  true,
\"user_ctx\": {\"name\": \"admin\", \"roles\": [\"admin\"]}}"

#verify the replicator document. It is in triggered state
curl -X GET  ${LOCAL_URL}/_replicator/users:devices_users

# Add a user
curl -X PUT -d  '{ "type": "user",   "name": "u1",  "roles": ["u1"],
 "password": "XXX"}' ${LOCAL_URL}/_users/org.couchdb.user:u1

#check the replicator document, it is in error.
curl -X GET  ${LOCAL_URL}/_replicator/users:devices_users

# a few minutes later it is still in error, but the revision is 9.
curl -X GET  ${LOCAL_URL}/_replicator/users:devices_users

What is wrong with this? How should I create a replication between these
two _users database which survives the server restart?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message