What does missing refer to in { [Error: REST error: not_found] code: 4104, reason: 'missing' }?


#1

When running a view query I got the following error: { [Error: REST error: not_found] code: 4104, reason: ‘missing’ } I don’t always get this error though, just rarely on some views.

What does the “missing” refer to? I can’t find anything in the nodejs SDK documentation explaining the error codes or their meaning, but if there is a page somewhere that explains these then a link to it would be great for future reference.

For context, I just added a new node to a cluster and ran a backup replica rebalance (I only have 2 nodes in the cluster and 1 replica enabled for my bucket). I never configured any buckets or views on the new node, I just created it and then added it to the cluster and ran a rebalance.
Also I can hit the view directly in the browser by using the _design url and it returns all the view results correctly.

I’m using couchnode version 1.4.28, and my original node in my cluster is couchbase server 2.5.1 and the new one I just added is version 3.0.2.


#2

Hey alexegli,

The ‘not_found’ error indicates that the server responded to the view query indicating the the view does not actually exist on the node. This can occur directly surrounding the time when a view is inserted before the initial data for it is built, but should not happen sporadically once the view has already been added and indexed.

Cheers, Brett


#3

Thanks. I had stale=false in the query, but it should have been stale=“false”, so it was probably trying to hit a view for the first time that hadn’t been created yet on the new server.