You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Robert Campbell <rr...@gmail.com> on 2009/12/18 16:09:58 UTC

Simple replication fails to copy over design docs

I have a small database (only 20 docs) and I'm trying to replicate it.
The result is this:

{"session_id":"7ae2bab4cff6911316ba06f038818cb9","start_time":"Fri, 18
Dec 2009 15:03:05 GMT","end_time":"Fri, 18 Dec 2009 15:03:09
GMT","start_last_seq":0,"end_last_seq":121,"recorded_seq":121,"missing_checked":0,"missing_found":24,"docs_read":25,"docs_written":20,"doc_write_failures":5}

None of the design docs get brought over. Both are 0.10.0 instances
running on Ubuntu 9.10. Retrying the replication doesn't help.

Re: Simple replication fails to copy over design docs

Posted by Robert Campbell <rr...@gmail.com>.
I'm actually using Futon.

> Alternatively, you can trigger the replication from the source and supply a user:pass in the target URL.

Thanks Adam, this worked, and my design docs were successfully
replicated. I still have no idea why it doesn't work when you want to
pull from an ungated DB into a gated DB where you already
authenticated.

Rob, Chris, thanks for the help.



On Mon, Dec 21, 2009 at 9:19 AM, Chris Anderson <jc...@apache.org> wrote:
> On Sun, Dec 20, 2009 at 6:07 PM, Adam Kocoloski <ko...@apache.org> wrote:
>> Hi Robert (Campbell), the replicator uses the authentication credentials you supply in your POST to /_replicate to open any local DBs.  If you're doing this through Futon, it may be that Futon is not sending an Authorization header in that replication request.  I suspect that if you try the request manually, e.g.
>>
>> curl http://user:pass@destination.net:5984/_replicate -d '{"source":"http://source.net:5984/dbname", "target":"dbname"}'
>>
>> it will successfully replicate the design docs.  Alternatively, you can trigger the replication from the source and supply a user:pass in the target URL.
>
> I've been working around this by using the Futon replicator, but
> treating both requests as remote dbs, so I can add basic auth
> credentials to the target URL.
>
> Best,
>>
>> Adam
>>
>> On Dec 20, 2009, at 11:35 AM, Robert Campbell wrote:
>>
>>> The source machine is completely open, while the destination machine
>>> is locked down. I log in to the destination machine, then select the
>>> remote (source, open) database to copy from, then the local, empty DB
>>> to copy into.
>>>
>>>
>>>
>>> On Fri, Dec 18, 2009 at 6:31 PM, Robert Newson <ro...@gmail.com> wrote:
>>>> Is your source machine locked down with admin passwords? If so, the
>>>> other machine can't read your design documents, you'll need to
>>>> authenticate the replication task.
>>>>
>>>> B.
>>>>
>>>> On Fri, Dec 18, 2009 at 3:09 PM, Robert Campbell <rr...@gmail.com> wrote:
>>>>> I have a small database (only 20 docs) and I'm trying to replicate it.
>>>>> The result is this:
>>>>>
>>>>> {"session_id":"7ae2bab4cff6911316ba06f038818cb9","start_time":"Fri, 18
>>>>> Dec 2009 15:03:05 GMT","end_time":"Fri, 18 Dec 2009 15:03:09
>>>>> GMT","start_last_seq":0,"end_last_seq":121,"recorded_seq":121,"missing_checked":0,"missing_found":24,"docs_read":25,"docs_written":20,"doc_write_failures":5}
>>>>>
>>>>> None of the design docs get brought over. Both are 0.10.0 instances
>>>>> running on Ubuntu 9.10. Retrying the replication doesn't help.
>>>>>
>>>>
>>
>>
>
>
>
> --
> Chris Anderson
> http://jchrisa.net
> http://couch.io
>

Re: Simple replication fails to copy over design docs

Posted by Chris Anderson <jc...@apache.org>.
On Sun, Dec 20, 2009 at 6:07 PM, Adam Kocoloski <ko...@apache.org> wrote:
> Hi Robert (Campbell), the replicator uses the authentication credentials you supply in your POST to /_replicate to open any local DBs.  If you're doing this through Futon, it may be that Futon is not sending an Authorization header in that replication request.  I suspect that if you try the request manually, e.g.
>
> curl http://user:pass@destination.net:5984/_replicate -d '{"source":"http://source.net:5984/dbname", "target":"dbname"}'
>
> it will successfully replicate the design docs.  Alternatively, you can trigger the replication from the source and supply a user:pass in the target URL.

I've been working around this by using the Futon replicator, but
treating both requests as remote dbs, so I can add basic auth
credentials to the target URL.

Best,
>
> Adam
>
> On Dec 20, 2009, at 11:35 AM, Robert Campbell wrote:
>
>> The source machine is completely open, while the destination machine
>> is locked down. I log in to the destination machine, then select the
>> remote (source, open) database to copy from, then the local, empty DB
>> to copy into.
>>
>>
>>
>> On Fri, Dec 18, 2009 at 6:31 PM, Robert Newson <ro...@gmail.com> wrote:
>>> Is your source machine locked down with admin passwords? If so, the
>>> other machine can't read your design documents, you'll need to
>>> authenticate the replication task.
>>>
>>> B.
>>>
>>> On Fri, Dec 18, 2009 at 3:09 PM, Robert Campbell <rr...@gmail.com> wrote:
>>>> I have a small database (only 20 docs) and I'm trying to replicate it.
>>>> The result is this:
>>>>
>>>> {"session_id":"7ae2bab4cff6911316ba06f038818cb9","start_time":"Fri, 18
>>>> Dec 2009 15:03:05 GMT","end_time":"Fri, 18 Dec 2009 15:03:09
>>>> GMT","start_last_seq":0,"end_last_seq":121,"recorded_seq":121,"missing_checked":0,"missing_found":24,"docs_read":25,"docs_written":20,"doc_write_failures":5}
>>>>
>>>> None of the design docs get brought over. Both are 0.10.0 instances
>>>> running on Ubuntu 9.10. Retrying the replication doesn't help.
>>>>
>>>
>
>



-- 
Chris Anderson
http://jchrisa.net
http://couch.io

Re: Simple replication fails to copy over design docs

Posted by Adam Kocoloski <ko...@apache.org>.
Hi Robert (Campbell), the replicator uses the authentication credentials you supply in your POST to /_replicate to open any local DBs.  If you're doing this through Futon, it may be that Futon is not sending an Authorization header in that replication request.  I suspect that if you try the request manually, e.g.

curl http://user:pass@destination.net:5984/_replicate -d '{"source":"http://source.net:5984/dbname", "target":"dbname"}'

it will successfully replicate the design docs.  Alternatively, you can trigger the replication from the source and supply a user:pass in the target URL.  Best,

Adam

On Dec 20, 2009, at 11:35 AM, Robert Campbell wrote:

> The source machine is completely open, while the destination machine
> is locked down. I log in to the destination machine, then select the
> remote (source, open) database to copy from, then the local, empty DB
> to copy into.
> 
> 
> 
> On Fri, Dec 18, 2009 at 6:31 PM, Robert Newson <ro...@gmail.com> wrote:
>> Is your source machine locked down with admin passwords? If so, the
>> other machine can't read your design documents, you'll need to
>> authenticate the replication task.
>> 
>> B.
>> 
>> On Fri, Dec 18, 2009 at 3:09 PM, Robert Campbell <rr...@gmail.com> wrote:
>>> I have a small database (only 20 docs) and I'm trying to replicate it.
>>> The result is this:
>>> 
>>> {"session_id":"7ae2bab4cff6911316ba06f038818cb9","start_time":"Fri, 18
>>> Dec 2009 15:03:05 GMT","end_time":"Fri, 18 Dec 2009 15:03:09
>>> GMT","start_last_seq":0,"end_last_seq":121,"recorded_seq":121,"missing_checked":0,"missing_found":24,"docs_read":25,"docs_written":20,"doc_write_failures":5}
>>> 
>>> None of the design docs get brought over. Both are 0.10.0 instances
>>> running on Ubuntu 9.10. Retrying the replication doesn't help.
>>> 
>> 


Re: Simple replication fails to copy over design docs

Posted by Robert Newson <ro...@gmail.com>.
Possibly the same problem but in reverse then? Your replication tasks
doesn't authenticate and therefore can't update documents in the
_design namespace on the destination?

B.

On Sun, Dec 20, 2009 at 4:35 PM, Robert Campbell <rr...@gmail.com> wrote:
> The source machine is completely open, while the destination machine
> is locked down. I log in to the destination machine, then select the
> remote (source, open) database to copy from, then the local, empty DB
> to copy into.
>
>
>
> On Fri, Dec 18, 2009 at 6:31 PM, Robert Newson <ro...@gmail.com> wrote:
>> Is your source machine locked down with admin passwords? If so, the
>> other machine can't read your design documents, you'll need to
>> authenticate the replication task.
>>
>> B.
>>
>> On Fri, Dec 18, 2009 at 3:09 PM, Robert Campbell <rr...@gmail.com> wrote:
>>> I have a small database (only 20 docs) and I'm trying to replicate it.
>>> The result is this:
>>>
>>> {"session_id":"7ae2bab4cff6911316ba06f038818cb9","start_time":"Fri, 18
>>> Dec 2009 15:03:05 GMT","end_time":"Fri, 18 Dec 2009 15:03:09
>>> GMT","start_last_seq":0,"end_last_seq":121,"recorded_seq":121,"missing_checked":0,"missing_found":24,"docs_read":25,"docs_written":20,"doc_write_failures":5}
>>>
>>> None of the design docs get brought over. Both are 0.10.0 instances
>>> running on Ubuntu 9.10. Retrying the replication doesn't help.
>>>
>>
>

Re: Simple replication fails to copy over design docs

Posted by Robert Campbell <rr...@gmail.com>.
The source machine is completely open, while the destination machine
is locked down. I log in to the destination machine, then select the
remote (source, open) database to copy from, then the local, empty DB
to copy into.



On Fri, Dec 18, 2009 at 6:31 PM, Robert Newson <ro...@gmail.com> wrote:
> Is your source machine locked down with admin passwords? If so, the
> other machine can't read your design documents, you'll need to
> authenticate the replication task.
>
> B.
>
> On Fri, Dec 18, 2009 at 3:09 PM, Robert Campbell <rr...@gmail.com> wrote:
>> I have a small database (only 20 docs) and I'm trying to replicate it.
>> The result is this:
>>
>> {"session_id":"7ae2bab4cff6911316ba06f038818cb9","start_time":"Fri, 18
>> Dec 2009 15:03:05 GMT","end_time":"Fri, 18 Dec 2009 15:03:09
>> GMT","start_last_seq":0,"end_last_seq":121,"recorded_seq":121,"missing_checked":0,"missing_found":24,"docs_read":25,"docs_written":20,"doc_write_failures":5}
>>
>> None of the design docs get brought over. Both are 0.10.0 instances
>> running on Ubuntu 9.10. Retrying the replication doesn't help.
>>
>

Re: Simple replication fails to copy over design docs

Posted by Robert Newson <ro...@gmail.com>.
Is your source machine locked down with admin passwords? If so, the
other machine can't read your design documents, you'll need to
authenticate the replication task.

B.

On Fri, Dec 18, 2009 at 3:09 PM, Robert Campbell <rr...@gmail.com> wrote:
> I have a small database (only 20 docs) and I'm trying to replicate it.
> The result is this:
>
> {"session_id":"7ae2bab4cff6911316ba06f038818cb9","start_time":"Fri, 18
> Dec 2009 15:03:05 GMT","end_time":"Fri, 18 Dec 2009 15:03:09
> GMT","start_last_seq":0,"end_last_seq":121,"recorded_seq":121,"missing_checked":0,"missing_found":24,"docs_read":25,"docs_written":20,"doc_write_failures":5}
>
> None of the design docs get brought over. Both are 0.10.0 instances
> running on Ubuntu 9.10. Retrying the replication doesn't help.
>