Hi Andy,

I am not sure if you need this, but maybe some other folks would find this 
helpful.

I was able to reproduce this reliably on unrestricted couchdb (no login 
required)

1. Replicate one module to a new db to make sure replication works:
curl http://localhost:5984/_replicate -X POST -d 
'{"source":"http://isaacs.iriscouch.com/registry/","target":"pub-registry2","create_target":true,"continuous":false,"doc_ids":["system"]}'
 
-H "Content-Type: application/json"
2. Replicate _design/app
curl http://npmjs-db.stratus.dev.ebay.com/_replicate -X POST -d 
'{"source":"http://isaacs.iriscouch.com/registry/","target":"pub-registry2","create_target":true,"continuous":false,"doc_ids":["_design/app"]}'
 
-H "Content-Type: application/json"
3. Then try replicate some other module
curl http://npmjs-db.stratus.dev.ebay.com/_replicate -X POST -d 
'{"source":"http://isaacs.iriscouch.com/registry/","target":"pub-registry2","create_target":true,"continuous":false,"doc_ids":["socket.io"]}'
 
-H "Content-Type: application/json"
4. Now delete _design/app and compact the DB and try replicating other 
modue as socket.io would be marked as failed and probably would take time 
to re-try by couchdb later.

The root cause is _design/app (not sure if it is specific to one or any 
design docs), once it gets replicated, the replication starts getting 
//Error: `forbidden`, reason: `Please log in before writing to the db`.//
And _design/app is used to handle some requests to couchdb.

So in your case it looks like the case where it was replicating till it got 
some _design doc replicated which forbad further replication.

In my case I was replicating from http://isaacs.iriscouch.com/registry/

I have not found what part in _design/app restricts the replication and 
require login first, just posting if someone got better clue faster than me.

Regards,
Dmytro

On Monday, May 13, 2013 8:16:51 PM UTC-7, andy wrote:
>
> Based on the awesome feedback I got from 
> https://groups.google.com/d/msg/nodejs/sX4mbsRPwls/WtDDE-To2o4J, we tried 
> replicating the npm repo so we could use it in an offline environment.
>
> We're essentially following the instructions at 
> http://clock.co.uk/tech-blogs/how-to-create-a-private-npmjs-repositorybut 
> replication fails after syncing about 17k documents.
>
> We've tried reinstalling couch (found one issue that suggested using a 
> patched version of SpiderMonkey) but the same thing keeps happening, even 
> after restarting replication several times.
>
> Here's our setup:
>
> CentOS 6.4
> CouchDB 1.3
> SpiderMonkey 1.8.5-7 
>
> Replication works fine for over 17,000 documents, then we see this error 
> and can't get past it:
>
> [Sat, 11 May 2013 00:55:39 GMT] [error] [<0.12970.4>] Replicator: couldn't 
> write document `bufferhelper`, revision 
> `19-d339684ee7f5eaf4cc18d84da753832d`, to target database `registry`. 
> Error: `unauthorized`, reason: `Please log in before writing to the db`.
>
> Any ideas?
>
> Thanks,
>
> Andy
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to