Hi Andy,I'm also seeing the exact same issue trying to replicate isaacs.iriscouch.com to another iriscouch.com database, it gets stuck at 17,286 documents (16gb) and those errors start to appear in the log.Have you found any more details about this issue?Sincerely,Kevin
--
--
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 nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
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 nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Why do you want replication at all? I was thinking about it for myself recently, but I found out that there're lots of libraries you won't ever use.
So isn't it better to write something like proxying repository server that would host your private projects, but proxy all other requests to npm central repository (with caching of course to avoid heavy load)?
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-repository but 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
Why do you want replication at all? I was thinking about it for myself recently, but I found out that there're lots of libraries you won't ever use.
So isn't it better to write something like proxying repository server that would host your private projects, but proxy all other requests to npm central repository (with caching of course to avoid heavy load)?
On Tuesday, May 14, 2013 7:16:51 AM UTC+4, 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-repository but 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
--
Give this one a shot,curl -svX PUT http://admin:pas...@127.0.0.1:5984/_replicator/mirror_npm -d '{"source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "user_ctx": {"name": "admin"}, "continuous": true' -HContent-Type:application/json
Switch the admin in the user_ctx as well. Also make sure that the admin is added to the registry database as well as an admin so that it has full permissions. This worked for me for everything except for _design/app and I just replicated that separately through futon after this one finished.Hope it helps,Joshwa
A somewhat old post but for anyone stuck on this, it seems that the npmjs couchapp (the thing that works for /registry/_design/app/...) has a validate_doc_update function to user-control 'npm login' and 'npm publish' operations. But it also effects the replication, simply the function does not let replication user to write to the database. For couchdb 1.3. the _replicator database also accepts a user_ctx parameter that the replication process will use. So instead of using the old style _replicate command, couchdb 1.3 users should do something like:curl -X POST http://127.0.0.1:5984/_replicator -d '{"_id": "npmjs_repl", "source":"http://isaacs.iriscouch.com/registry/", "target":"registry", "continuous":true, "user_ctx": {"name":"replicator", "roles":["_admin"]}}' -H "Content-Type: application/json"This will run the replication as an admin user (roles: _admin) and validate_doc_update function will allow writes. My replication seems to continue now
--
--