You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Antony Blakey <an...@gmail.com> on 2009/05/21 11:28:52 UTC

Strange replication error

Anyone seen this before?

=ERROR REPORT==== 21-May-2009::16:51:57 ===
Error in process <0.15765.3> with exit value: {{badmatch,undefined}, 
[{couch_rep,get_missing_revs,2},{couch_rep,enum_docs_since,4}]}

[info] [<0.15762.3>] 127.0.0.1 - - 'POST' /acumen-content/ 
_missing_revs 404
[error] [<0.275.0>] replication enumerator exited with  
{{badmatch,undefined},
                                     [{couch_rep,get_missing_revs,2},
                                      {couch_rep,enum_docs_since, 
4}]} .. respawning
[debug] [<0.15770.3>] couch_rep HTTP get request: http://localhost:5985/acumen-content/_all_docs_by_seq?limit=100&startkey=0
[debug] [<0.15770.3>] couch_rep HTTP post request: http://localhost:5984/acumen-content/_missing_revs
[debug] [<0.15767.3>] 'POST' /acumen-content/_missing_revs {1,1}
Headers: [{'Host',"localhost:5984"},{'Transfer-Encoding',"chunked"}]
[debug] [<0.15767.3>] httpd 404 error response:
  {"error":"not_found","reason":"Missing"}

[error] [emulator] Error in process <0.15770.3> with exit value:  
{{badmatch,undefined},[{couch_rep,get_missing_revs,2}, 
{couch_rep,enum_docs_since,4}]}


I had a replication that started giving this error. If I kill it and  
restart the replication it immediately throws this again and again  
i.e. the ability to replicate is permanently hosed.


Antony Blakey
-------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

If you pick up a starving dog and make him prosperous, he will not  
bite you. This is the principal difference between a man and a dog.
   -- Mark Twain



Re: Strange replication error

Posted by Paul Davis <pa...@gmail.com>.
In trunk now when you hit a non-existant database you should get back
a JSON body:

{"error": "missing", "reason": "no_db_file"} or similar which would
make it an easy error to detect. As to just creating the database on
the fly, I could see it either way.

On Thu, May 21, 2009 at 8:09 AM, Adam Kocoloski <ko...@apache.org> wrote:
> The reason you can't stop the replication process is because that pid is
> supervised and will be restarted in the event of abnormal termination, even
> if the HTTP request is canceled.
>
> I agree that it's pretty pointless to keep trying to restart the replication
> if the source or target DB does not exist.  I can add some code to
> short-circuit things and return a sensible error.  I wonder if the policy
> should be to try to create the target if it does not exist?
>
> Adam
>
> On May 21, 2009, at 6:12 AM, Antony Blakey wrote:
>
>> OK, this was stupid stupid user error, but interesting in that I couldn't
>> stop the replication process - I had to go through the process list and kill
>> each couchdb process.
>>
>> This occurs if you pull replicate into a db that hasn't been created. I
>> think the replicate call should fail in that case.
>>
>> On 21/05/2009, at 6:58 PM, Antony Blakey wrote:
>>
>>> Anyone seen this before?
>>>
>>> =ERROR REPORT==== 21-May-2009::16:51:57 ===
>>> Error in process <0.15765.3> with exit value:
>>> {{badmatch,undefined},[{couch_rep,get_missing_revs,2},{couch_rep,enum_docs_since,4}]}
>>>
>>> [info] [<0.15762.3>] 127.0.0.1 - - 'POST' /acumen-content/_missing_revs
>>> 404
>>> [error] [<0.275.0>] replication enumerator exited with
>>> {{badmatch,undefined},
>>>                                  [{couch_rep,get_missing_revs,2},
>>>                                   {couch_rep,enum_docs_since,4}]} ..
>>> respawning
>>> [debug] [<0.15770.3>] couch_rep HTTP get request:
>>> http://localhost:5985/acumen-content/_all_docs_by_seq?limit=100&startkey=0
>>> [debug] [<0.15770.3>] couch_rep HTTP post request:
>>> http://localhost:5984/acumen-content/_missing_revs
>>> [debug] [<0.15767.3>] 'POST' /acumen-content/_missing_revs {1,1}
>>> Headers: [{'Host',"localhost:5984"},{'Transfer-Encoding',"chunked"}]
>>> [debug] [<0.15767.3>] httpd 404 error response:
>>> {"error":"not_found","reason":"Missing"}
>>>
>>> [error] [emulator] Error in process <0.15770.3> with exit value:
>>> {{badmatch,undefined},[{couch_rep,get_missing_revs,2},{couch_rep,enum_docs_since,4}]}
>>>
>>>
>>> I had a replication that started giving this error. If I kill it and
>>> restart the replication it immediately throws this again and again i.e. the
>>> ability to replicate is permanently hosed.
>>
>> Antony Blakey
>> --------------------------
>> CTO, Linkuistics Pty Ltd
>> Ph: 0438 840 787
>>
>> Isn't it enough to see that a garden is beautiful without having to
>> believe that there are fairies at the bottom of it too?
>>  -- Douglas Adams
>>
>
>

Re: Strange replication error

Posted by Adam Kocoloski <ko...@apache.org>.
The reason you can't stop the replication process is because that pid  
is supervised and will be restarted in the event of abnormal  
termination, even if the HTTP request is canceled.

I agree that it's pretty pointless to keep trying to restart the  
replication if the source or target DB does not exist.  I can add some  
code to short-circuit things and return a sensible error.  I wonder if  
the policy should be to try to create the target if it does not exist?

Adam

On May 21, 2009, at 6:12 AM, Antony Blakey wrote:

> OK, this was stupid stupid user error, but interesting in that I  
> couldn't stop the replication process - I had to go through the  
> process list and kill each couchdb process.
>
> This occurs if you pull replicate into a db that hasn't been  
> created. I think the replicate call should fail in that case.
>
> On 21/05/2009, at 6:58 PM, Antony Blakey wrote:
>
>> Anyone seen this before?
>>
>> =ERROR REPORT==== 21-May-2009::16:51:57 ===
>> Error in process <0.15765.3> with exit value: {{badmatch,undefined}, 
>> [{couch_rep,get_missing_revs,2},{couch_rep,enum_docs_since,4}]}
>>
>> [info] [<0.15762.3>] 127.0.0.1 - - 'POST' /acumen-content/ 
>> _missing_revs 404
>> [error] [<0.275.0>] replication enumerator exited with  
>> {{badmatch,undefined},
>>                                   [{couch_rep,get_missing_revs,2},
>>                                    {couch_rep,enum_docs_since, 
>> 4}]} .. respawning
>> [debug] [<0.15770.3>] couch_rep HTTP get request: http://localhost:5985/acumen-content/_all_docs_by_seq?limit=100&startkey=0
>> [debug] [<0.15770.3>] couch_rep HTTP post request: http://localhost:5984/acumen-content/_missing_revs
>> [debug] [<0.15767.3>] 'POST' /acumen-content/_missing_revs {1,1}
>> Headers: [{'Host',"localhost:5984"},{'Transfer-Encoding',"chunked"}]
>> [debug] [<0.15767.3>] httpd 404 error response:
>> {"error":"not_found","reason":"Missing"}
>>
>> [error] [emulator] Error in process <0.15770.3> with exit value:  
>> {{badmatch,undefined},[{couch_rep,get_missing_revs,2}, 
>> {couch_rep,enum_docs_since,4}]}
>>
>>
>> I had a replication that started giving this error. If I kill it  
>> and restart the replication it immediately throws this again and  
>> again i.e. the ability to replicate is permanently hosed.
>
> Antony Blakey
> --------------------------
> CTO, Linkuistics Pty Ltd
> Ph: 0438 840 787
>
> Isn't it enough to see that a garden is beautiful without having to  
> believe that there are fairies at the bottom of it too?
>  -- Douglas Adams
>


Re: Strange replication error

Posted by Antony Blakey <an...@gmail.com>.
OK, this was stupid stupid user error, but interesting in that I  
couldn't stop the replication process - I had to go through the  
process list and kill each couchdb process.

This occurs if you pull replicate into a db that hasn't been created.  
I think the replicate call should fail in that case.

On 21/05/2009, at 6:58 PM, Antony Blakey wrote:

> Anyone seen this before?
>
> =ERROR REPORT==== 21-May-2009::16:51:57 ===
> Error in process <0.15765.3> with exit value: {{badmatch,undefined}, 
> [{couch_rep,get_missing_revs,2},{couch_rep,enum_docs_since,4}]}
>
> [info] [<0.15762.3>] 127.0.0.1 - - 'POST' /acumen-content/ 
> _missing_revs 404
> [error] [<0.275.0>] replication enumerator exited with  
> {{badmatch,undefined},
>                                    [{couch_rep,get_missing_revs,2},
>                                     {couch_rep,enum_docs_since, 
> 4}]} .. respawning
> [debug] [<0.15770.3>] couch_rep HTTP get request: http://localhost:5985/acumen-content/_all_docs_by_seq?limit=100&startkey=0
> [debug] [<0.15770.3>] couch_rep HTTP post request: http://localhost:5984/acumen-content/_missing_revs
> [debug] [<0.15767.3>] 'POST' /acumen-content/_missing_revs {1,1}
> Headers: [{'Host',"localhost:5984"},{'Transfer-Encoding',"chunked"}]
> [debug] [<0.15767.3>] httpd 404 error response:
> {"error":"not_found","reason":"Missing"}
>
> [error] [emulator] Error in process <0.15770.3> with exit value:  
> {{badmatch,undefined},[{couch_rep,get_missing_revs,2}, 
> {couch_rep,enum_docs_since,4}]}
>
>
> I had a replication that started giving this error. If I kill it and  
> restart the replication it immediately throws this again and again  
> i.e. the ability to replicate is permanently hosed.

Antony Blakey
--------------------------
CTO, Linkuistics Pty Ltd
Ph: 0438 840 787

Isn't it enough to see that a garden is beautiful without having to  
believe that there are fairies at the bottom of it too?
   -- Douglas Adams