You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Matthew Woodward <ma...@mattwoodward.com> on 2013/10/18 17:37:07 UTC

Diagnosing Replication Issues

I have one particular database (out of 18) for which I've configured
continuous replication in the _replicator database that is behaving
strangely.

The first thing I noticed is that new documents added to the source
database are not added to the target database. I deleted the document in
the _replicator database on the target server and recreated it, but the
behavior is the same.

I then deleted the database entirely from the target server, created an
empty database, and then added a document to the _replicator database again
to do continuous replication, and it replicated everything *but* the design
documents. Noe clue why it left out only the design documents.

I then went into the replicator tool in Futon and kicked off a one-time
replication and that picked up the three missing design documents, but the
target database STILL does not pick up changes on the source database. I
can add new documents to the source and they don't show up on the target,
and I can delete documents on the source and they aren't deleted from the
target. If I do a one-time replication from the replicator tool it fixes
the problems.

My other 17 databases configured in the same way are working fine.

What might cause this, and what's the best way to go about troubleshooting
this problem?

Thanks.

-- 
Matthew Woodward
matt@mattwoodward.com
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

Re: Diagnosing Replication Issues

Posted by Matthew Woodward <ma...@mattwoodward.com>.
That seems to have done the trick. Still not sure why the different
behavior between the databases but I'll redo them all this way. Really
appreciate the help.


On Fri, Oct 18, 2013 at 8:59 AM, Matthew Woodward <ma...@mattwoodward.com>wrote:

> Ah thanks -- so sounds like in addition to having admin creds included in
> the source url, I should put it in the target too? Odd that I did
> everything the same way but only this one database is having issues, but
> I'll give that a shot.
>
> Thanks!
>
>
> On Fri, Oct 18, 2013 at 8:55 AM, Jens Alfke <je...@couchbase.com> wrote:
>
>>
>> On Oct 18, 2013, at 8:37 AM, Matthew Woodward <ma...@mattwoodward.com>
>> wrote:
>>
>> > it replicated everything *but* the design
>> > documents. Noe clue why it left out only the design documents.
>>
>> I don’t have an insight into your larger problem, but I do know about
>> this one: The reason is that for security reasons only administrators can
>> install design documents, but a persistent replication by default runs as
>> an anonymous user. To fix that you’ll need to add credentials to the
>> replication document (I don’t recall the details, but they’re in the API
>> docs.)
>>
>> > I then went into the replicator tool in Futon and kicked off a one-time
>> > replication and that picked up the three missing design documents
>>
>> That worked because you were logged into Futon as an administrator, so
>> the one-time replication it kicked off for you was authenticated as an
>> admin.
>>
>> (Actually your larger issue might be permissions-related too, if your
>> target database has access privileges configured. If so, authenticating the
>> replicator as a user with write permission, and admin privileges, would fix
>> everything.)
>>
>> —Jens
>
>
>
>
> --
> Matthew Woodward
> matt@mattwoodward.com
> http://blog.mattwoodward.com
> identi.ca / Twitter: @mpwoodward
>
> Please do not send me proprietary file formats such as Word, PowerPoint,
> etc. as attachments.
> http://www.gnu.org/philosophy/no-word-attachments.html
>



-- 
Matthew Woodward
matt@mattwoodward.com
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

Re: Diagnosing Replication Issues

Posted by Matthew Woodward <ma...@mattwoodward.com>.
Ah thanks -- so sounds like in addition to having admin creds included in
the source url, I should put it in the target too? Odd that I did
everything the same way but only this one database is having issues, but
I'll give that a shot.

Thanks!


On Fri, Oct 18, 2013 at 8:55 AM, Jens Alfke <je...@couchbase.com> wrote:

>
> On Oct 18, 2013, at 8:37 AM, Matthew Woodward <ma...@mattwoodward.com>
> wrote:
>
> > it replicated everything *but* the design
> > documents. Noe clue why it left out only the design documents.
>
> I don’t have an insight into your larger problem, but I do know about this
> one: The reason is that for security reasons only administrators can
> install design documents, but a persistent replication by default runs as
> an anonymous user. To fix that you’ll need to add credentials to the
> replication document (I don’t recall the details, but they’re in the API
> docs.)
>
> > I then went into the replicator tool in Futon and kicked off a one-time
> > replication and that picked up the three missing design documents
>
> That worked because you were logged into Futon as an administrator, so the
> one-time replication it kicked off for you was authenticated as an admin.
>
> (Actually your larger issue might be permissions-related too, if your
> target database has access privileges configured. If so, authenticating the
> replicator as a user with write permission, and admin privileges, would fix
> everything.)
>
> —Jens




-- 
Matthew Woodward
matt@mattwoodward.com
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

Re: Diagnosing Replication Issues

Posted by Jens Alfke <je...@couchbase.com>.
On Oct 18, 2013, at 8:37 AM, Matthew Woodward <ma...@mattwoodward.com> wrote:

> it replicated everything *but* the design
> documents. Noe clue why it left out only the design documents.

I don’t have an insight into your larger problem, but I do know about this one: The reason is that for security reasons only administrators can install design documents, but a persistent replication by default runs as an anonymous user. To fix that you’ll need to add credentials to the replication document (I don’t recall the details, but they’re in the API docs.)

> I then went into the replicator tool in Futon and kicked off a one-time
> replication and that picked up the three missing design documents

That worked because you were logged into Futon as an administrator, so the one-time replication it kicked off for you was authenticated as an admin.

(Actually your larger issue might be permissions-related too, if your target database has access privileges configured. If so, authenticating the replicator as a user with write permission, and admin privileges, would fix everything.)

—Jens