Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E9290D458 for ; Fri, 5 Oct 2012 16:03:55 +0000 (UTC) Received: (qmail 17185 invoked by uid 500); 5 Oct 2012 16:03:54 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 17142 invoked by uid 500); 5 Oct 2012 16:03:54 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 17134 invoked by uid 99); 5 Oct 2012 16:03:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 16:03:54 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.216.45] (HELO mail-qa0-f45.google.com) (209.85.216.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 16:03:46 +0000 Received: by mail-qa0-f45.google.com with SMTP id s11so466606qaa.11 for ; Fri, 05 Oct 2012 09:03:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding :x-gm-message-state; bh=APF7aPZK5Wc/r5YtCs5pqTqkawqPa+jX47LBc3h2phs=; b=jdLRivR/naDj/3FVFoX4skCBiBSFf5Vbq22tmJVOdIm3+W7u5CC1X45cweVaRl9mHP iMtK9jT+uqBNkxVrqo6SliR/eEAJykubT4OXGpPzM3B0iqlaDEtY5PYV/sMpZ4etgpEw qf/KYwhRkb8ywIgtMtDPQy0v53eJBKGBlLLtL0KUyJ/xsxiXhEKoka1UIvo3PraUAJXC d58gfJ66HiFrrX4dA/rtNOaGpsKCHHJ4n5PzkxWlFvMqj200GiUaGyUfnJIKLEsDKpmq tCnrEdCnNfg3+jYZCdd8L9Vi/87zf6lG275oc03+Cq87RjuguGATVGGUNfn0SrNGcBFo EiqQ== MIME-Version: 1.0 Received: by 10.229.134.202 with SMTP id k10mr3770336qct.71.1349453005282; Fri, 05 Oct 2012 09:03:25 -0700 (PDT) Received: by 10.49.35.48 with HTTP; Fri, 5 Oct 2012 09:03:25 -0700 (PDT) X-Originating-IP: [84.112.19.176] In-Reply-To: References: Date: Fri, 5 Oct 2012 18:03:25 +0200 Message-ID: Subject: Re: replication: lexical error: invalid char in json text From: Dave Cottlehuber To: user@couchdb.apache.org Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQlI4qihIuW8MKnWv7ZugsqGdZYtJ7zdNh9J+AnXQs/Km7Ha0e3lVuesWTqyBdwS6/+RXCJ9 On 5 October 2012 17:51, Dave Cottlehuber wrote: > On 5 October 2012 16:33, Michael Bykov wrote: >> Hi, >> >> Local couchdb works great, but replication does not work. >> Replication worked perfectly several days ago. You can see the correct >> (that was replicated) part of it here: >> http://diglossa.ru:5984/_utils/database.html?greek >> >> Please advice how can I find invalid record in local DB? >> >> I got this in log: >> >> >> =3DCRASH REPORT=3D=3D=3D=3D 5-Oct-2012::18:16:23 =3D=3D=3D >> crasher: >> initial call: couch_replicator:init/1 >> pid: <0.720.0> >> registered_name: [] >> exception exit: {worker_died,<0.727.0>, >> {{nocatch, >> {invalid_json, >> {{error, >> {1, >> "lexical error: invalid char in >> json text.\n"}}, >> <<"\r\n413 >> Request Entity Too Large\r\n> bgcolor=3D\"white\">\r\n

413 Request Entity Too >> Large

\r\n
nginx/1.1.9
\r\n\r\n\r\n">>}}}, >> [{ejson,nif_decode,1,[{file,"ejson.erl"},{line,= 57}]}, >> {ejson,decode,1,[{file,"ejson.erl"},{line,38}]= }, >> {couch_replicator_httpc,process_response,5, >> [{file,"src/couch_replicator_httpc.erl"}, >> {line,88}]}, >> >> >> >> -- >> =ED. >> >> http://diglossa.ru >> xmpp://m.bykov@jabber.ru > > I'm guessing the underlying issue is replication with source being an > older version of couchdb, or for some reason (e.g. different > spidermonkey or JSON parsing library) is unable to complete parsing > one document, causing the replication to die when only a partial doc > is sent. It could be a lot more informative about where it's at > however. If you're using filtered replication perhaps that may also be > a mode of failure. > > Um there are a couple of ways to do this; the simplest is to sort & > then diff the _all_docs list from both DBs, with whatever sensible > tidyup is needed. > > Alternatively, I think in either source or destination log (when > you're in debug mode) will show the last successful doc received or > transferred. > > A+ > Dave Actually after reading the HTML bit the issue is more likely with your nginx config: 413 Request Entity Too Large I'd still diff _all_docs and then use single doc replication [1] as a quick test, instead of needing to re-run the whole replication. A+ Dave [1]: http://wiki.apache.org/couchdb/Replication#Named_Document_Replication