Strange document that cannot be deleted

Hi
I want to move to new servers and I created XDCR process. Now on the target cluster I have one document (the first one on the list of docs) that looks like the one on the attached picture and I cannot delete it…


I cannot open it - in the Edit window I get ‘Unexpected error’. When I try to delete id directly from the document list, in logs I have this:

Client-side error-report for user undefined on node 'ns_1@cb4.savecart':
User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Browser client XHR failure encountered. (age: 1976) Diagnostic info:
s: {"url":"/pools/default/buckets/default/docs/%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%04%EF%BF%BD%EF%BF%BD%EF%BF%BDZ1~%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BDDA%14%EF%BF%BD%EF%BF%BDJ%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BDAfD0860fd9","isLocal":false,"global":true,"type":"DELETE","contentType":"application/json","processData":true,"async":true,"accepts":{"xml":"application/xml, text/xml","html":"text/html","text":"text/plain","json":"application/json, text/javascript","*":"*/*","script":"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},"contents":{"xml":{},"html":{},"json":{},"script":{}},"responseFields":{"xml":"responseXML","text":"responseText"},"converters":{"text html":true},"jsonp":"callback","timeout":30000,"cache":false,"dataType":"json","dataTypes":["text","json"],"crossDomain":false,"hasContent":true}
xhrStatus: error,
xhrReadyState: 4,
errMsg: Internal Server Error,
statusCode: 500,
responseText:
["Unexpected server error, request logged."]

Has anyone seen such thing?

The “client side error report” indicates there would be more information in the ns_server logs on the server node. It may also be really useful to capture the port 8091 traffic and file an issue.

I don’t know why, but it looks like it’s corrupt. You didn’t indicate what you were XDCR’ing from and to in Couchbase versions, but in some very old versions of Couchbase, there were some issues with flags and byte order.

One other thought, you might create a simple view that checks the meta object to find the non-json object and then emit some details into that view. That’s a better way to get info on it than through the web UI. You may want to just check for JSON, then emit the entire meta object.

I XDCR’d from CB 4.0 to 4.1.
When I created the view, this doc is not indexed… My view looks like this:

function (doc, meta) {
  if(meta.type != "json") {
    emit(meta.id, null);
  }
}

I found this in error.log:
[ns_server:error,2016-12-22T10:16:07.349+01:00,ns_1@cb4.savecart:<0.17764.1449>:menelaus_web:loop:184]Server error during processing: [“web request failed”,
{path,
[47,112,111,111,108,115,47,100,101,102,97,
117,108,116,47,98,117,99,107,101,116,115,
47,100,101,102,97,117,108,116,47,100,111,
99,115,47,239,191,189,239,191,189,239,191,
189,239,191,189,239,191,189,239,191,189,
239,191,189,239,191,189,4,239,191,189,239,
191,189,239,191,189,90,49,126,239,191,189,
239,191,189,239,191,189,239,191,189,239,
191,189,239,191,189,239,191,189,68,65,20,
239,191,189,239,191,189,74,239,191,189,239,
191,189,239,191,189,239,191,189,65,102,68,
48,56,54,48,102,100,57]},
{method,‘DELETE’},
{type,error},
{what,
{badmatch,
{badrpc,
{‘EXIT’,
{function_clause,
[{capi_crud,handle_mutation_rv,
[{mc_header,4,1,0,0,0,9,0},
{mc_entry,<<>>,<<>>,0,0,0,
<<“Not found”>>,0}],
[{file,“src/capi_crud.erl”},
{line,43}]},
{rpc,local_call,3,
[{file,“rpc.erl”},{line,329}]},
{menelaus_web_crud,attempt,6,
[{file,“src/menelaus_web_crud.erl”},
{line,229}]},
{menelaus_web_crud,handle_delete,3,
[{file,“src/menelaus_web_crud.erl”},
{line,204}]},
{request_throttler,do_request,3,
[{file,“src/request_throttler.erl”},
{line,59}]},
{menelaus_web,loop,2,
[{file,“src/menelaus_web.erl”},
{line,162}]},
{mochiweb_http,headers,5,
[{file,
"/home/couchbase/jenkins/workspace/sherlock-unix/couchdb/src/mochiweb/mochiweb_http.erl"},
{line,94}]},
{proc_lib,init_p_do_apply,3,
[{file,“proc_lib.erl”},
{line,239}]}]}}}}},
{trace,
[{menelaus_web_crud,handle_delete,3,
[{file,“src/menelaus_web_crud.erl”},
{line,204}]},
{request_throttler,do_request,3,
[{file,“src/request_throttler.erl”},
{line,59}]},
{menelaus_web,loop,2,
[{file,“src/menelaus_web.erl”},
{line,162}]},
{mochiweb_http,headers,5,
[{file,
"/home/couchbase/jenkins/workspace/sherlock-unix/couchdb/src/mochiweb/mochiweb_http.erl"},
{line,94}]},
{proc_lib,init_p_do_apply,3,
[{file,“proc_lib.erl”},{line,239}]}]}]

One more interesting (?) thing… this document is the first doc on the list, while this list is alphabetically ordered. When I inspected the panel with Firebug, this element looks like that:
> <a href="#sec=documents&amp;viewsBucket=default&amp;documentsPageNumber=0&amp;docId=%00%00%00%00%00%00%00%00%04%00%00%00Z1~%EF%BF%BD%00%00%00%00%00%00DA%14%EF%BF%BD%EF%BF%BDJ%EF%BF%BD%EF%BF%BD%00%00AfD0860fd9">Z1~�DA��J��AfD0860fd9</a>
The content (taken from firebug as well) is base64 encoded piece of real data. But I dont know where the rest of that document is…