> On 3 January 2012 18:45, Kevin R. Coombes <[email protected]> wrote: >> Thanks for all the advice. I haven't upgraded yet; instead, inspired by the >> claim that "it works for me", I decided to poke around some more into the >> replication issue. I'm now going to report that replication of design docs >> *sometimes* fails on version 1.0.1, which is probably the worse kind of bug >> to report.... >> >> First, here is a transcript of the (64-bit Windows 7) cmd window: >> >> ############# >> C:\MyStuff\MyCodeProjects\CouchReplication>curl >> http://bcbwfl6sjn1:5984/testrepl/_all_docs >> {"total_rows":2,"offset":0,"rows":[ >> {"id":"43567c4d142e9d03f6e966a50400089b","key":"43567c4d142e9d03f6e966a50400089b", >> "value":{"rev":"1-711a20fc5975380c99726b4da845d277"}}, >> {"id":"_design/basic","key":"_design/basic","value":{"rev": >> "1-dddcf8b46c73b0102f86047765ab9284"}} >> ]} >> >> C:\MyStuff\MyCodeProjects\CouchReplication>curl >> http://bcbwfl6sjn1:5984/reptarget/_all_docs >> {"total_rows":0,"offset":0,"rows":[]} >> >> C:\MyStuff\MyCodeProjects\CouchReplication>type testrepl.json >> { >> "target" : "http://testonly:deleteme@bcbwfl6sjn1:5984/reptarget", >> "source" : "http://bcbwfl6sjn1:5984/testrepl", >> "user_ctx": { >> "name": "testonly", >> "roles": ["_admin"] >> } >> } >> >> C:\MyStuff\MyCodeProjects\CouchReplication>curl >> -H "Content-Type: application/json" -X POST -d @testrepl.json >> http://testonly:deleteme@bcbwfl6sjn1:5984/_replicate >> {"ok":true,"session_id":"d432de689e42bf1a983b8640b6835794","source_last_seq":2, >> "history":[{"session_id":"d432de689e42bf1a983b8640b6835794","start_time": >> "Tue, 03 Jan 2012 17:22:52 GMT","end_time":"Tue, 03 Jan 2012 17:22:52 GMT", >> "start_last_seq":0,"end_last_seq":2,"recorded_seq":2,"missing_checked":0, >> "missing_found":2,"docs_read":2,"docs_written":2,"doc_write_failures":0}]} >> >> C:\MyStuff\MyCodeProjects\CouchReplication>type drugbase-from-gani-to-here >> { >> "target" : "http://testonly:deleteme@bcbwfl6sjn1:5984/drugbase", >> "source" : "http://10.105.43.35:5984/drugbase", >> "user_ctx": { >> "name": "testonly", >> "roles": ["_admin"] >> } >> } >> >> C:\MyStuff\MyCodeProjects\CouchReplication>curl >> -H "Content-Type: application/json" -X POST -d @drugbase-from-gani-to-here >> http://testonly:deleteme@bcbwfl6sjn1:5984/_replicate >> {"error":"json_encode","reason":"{bad_term,{couch_doc,fold_streamed_data,\n >> [#Fun<couch_rep_att.0.90652905>,-1140,\n >> #Fun<couch_doc.13.28980337>,ok]}}"} >> ############# >> >> Note that the first replication attempt (which works) goes from one database >> to another on the same machine. This attempt uses a small test database that >> has the usual sorts of design document attachments for a CouchApp along with >> only one ordinary document. >> >> The second attempt is a pull replication from a remote machine to the local >> machine. This has the same kind of CouchApp design documents, and has about >> 16000 ordinary documents. All 16000+ ordinary documents get replicated >> without a problem. Only yte design document fails. Here is the start of >> the error message from the log file,to confirm that it is (an attachment to) >> the design document that fails: >> >> ############# >> [Tue, 03 Jan 2012 17:25:25 GMT] [error] [<0.650.0>] streaming att. ended but >> more data requested {1325,611525,197841} >> >> [Tue, 03 Jan 2012 17:25:25 GMT] [info] [<0.650.0>] request for >> "_design%2Fbasic/docs.html" timed out, retrying in 0.5 seconds >> >> [Tue, 03 Jan 2012 17:25:25 GMT] [error] [<0.650.0>] streaming att. ended but >> more data requested {1325,611525,712841} >> >> [Tue, 03 Jan 2012 17:25:25 GMT] [info] [<0.650.0>] request for >> "_design%2Fbasic/docs.html" timed out, retrying in 0.5 seconds >> >> [Tue, 03 Jan 2012 17:25:26 GMT] [error] [emulator] Error in process >> <0.650.0> with exit value: >> {function_clause,[{couch_doc,fold_streamed_data,[#Fun<couch_rep_att.0.90652905>,-1140,#Fun<couch_doc.13.28980337>,ok]},{couch_doc,atts_to_mp,4},{couch_rep_writer,streamer_fun,3}]} >> ############# >> >> Any suggestions? (I am open to the suggestion that "upgrading to Version X >> will solve the problem" for a specific value of X....) >> >> Thanks, >> Kevin >> >> On 1/2/2012 8:28 PM, Dave Cottlehuber wrote: >>> >>> On 2 January 2012 21:43, Kevin R. Coombes<[email protected]> >>> wrote: >>>> >>>> Hi, >>>> >>>> I am currently running CouchDB 1.0.1 on a 64-bit Windows 7 machine. I >>>> know >>>> this version is somewhat old, and I would like to upgrade to something >>>> newer. My main reason for wanting to upgrade is that I am currently >>>> unable >>>> to _replicate design documents along with the rest of the database >>>> (regardless of where and how many times I supply the relevant admin >>>> passwords...). >>> >>> Hi Kevin, >>> >>> "It works for me" using 1.0.2 and should be the same for 1.0.1. >>> Apologies if this is simplistic, but: >>> >>> You don't happen to have any weird characters, or : or @ in your >>> passwords? >>> Can you make a new DB using curl -vX PUT $user@$passwd:$host/newdb ? >>> Can you demonstrate the replication failure using curl.exe? The syntax, >>> -vX POST output from curl, and both couch logs with debug logging enabled >>> on a pastie site please if it fails. >>> >>> Refer to http://wiki.apache.org/couchdb/Quirks_on_Windows for quoting >>> syntax under windows. >>> interested in at the moment is that I would like my >>> existing CouchApp JavaScript code to continue to work.... >>> Re JS changes, poking around in: >>> https://github.com/apache/couchdb/tree/1.1.1/share/www/script and >>> https://github.com/apache/couchdb/commits/1.1.1 should help. >>> >>> A+ Dave
Hi Kevin, Thanks, those logs helped a lot. There are a number of fixes that could be related; https://issues.apache.org/jira/browse/COUCHDB-868 and https://issues.apache.org/jira/browse/COUCHDB-1021 which if I read my repo history right, are both in 1.0.2. I suggest you try that first which might avoid you needing to update your JS stuff, and keep us posted. A+ Dave
