Skip to content

Sporadic unknown_error : normal errors #1600

@flimzy

Description

@flimzy

Occasionally, when using Cookie auth, the /_all_docs endpoint returns 401, and logs an unusual error. I have observed this on both the /_users and /_replicator databases. Unknown if it happens on non-system databases.

Expected Behavior

I would expect a normal response

Current Behavior

Two log samples (both from CouchDB 2.2.0 running in Docker):

[notice] 2018-09-10T19:41:21.627729Z nonode@nohost <0.718.0> 631255b1ec localhost:6004 172.17.0.1 undefined GET /_users/_all_docs?include_docs=true 401 ok 1
[error] 2018-09-10T19:41:21.639919Z nonode@nohost <0.719.0> ec87d65d26 req_err(2525593956) unknown_error : normal
[<<"chttpd:catch_error/3 L353">>,<<"chttpd:handle_req_after_auth/2 L319">>,<<"chttpd:process_request/1 L300">>,<<"chttpd:handle_request_int/1 L240">>,<<"mochiweb_http:headers/6 L124">>,<<"proc_lib:init_p_do_apply/3 L247">>]

[notice] 2018-09-10T19:46:18.065472Z nonode@nohost <0.719.0> 1e9079ba74 localhost:6004 172.17.0.1 undefined GET /_replicator/_all_docs?include_docs=true 401 ok 3
[error] 2018-09-10T19:46:18.069496Z nonode@nohost <0.720.0> f23a984706 req_err(2525593956) unknown_error : normal
[<<"chttpd:catch_error/3 L353">>,<<"chttpd:handle_req_after_auth/2 L319">>,<<"chttpd:process_request/1 L300">>,<<"chttpd:handle_request_int/1 L240">>,<<"mochiweb_http:headers/6 L124">>,<<"proc_lib:init_p_do_apply/3 L247">>]

Steps to Reproduce (for bugs)

As stated above, this is a sporadic error. It doesn't always happen, but the requests that generated the above errors:

GET /_users/_all_docs?include_docs=true HTTP/1.1
Host: localhost:6004
Accept: application/json
Content-Type: application/json
Cookie: AuthSession=YWRtaW46NUI5NkM4RTE6pxr5rMbRBHJgbCdnRzQO0JBuzcI
User-Agent: Kivik CouchDB driver/2.0.0-prerelease (Language=go1.8.7; Platform=amd64/linux)

GET /_replicator/_all_docs?include_docs=true HTTP/1.1
Host: localhost:6004
Accept: application/json
Content-Type: application/json
Cookie: AuthSession=YWRtaW46NUI5NkNBMEE6UJcyxbwz2W6vinTcScdUNX5iQcw
User-Agent: Kivik CouchDB driver/2.0.0-prerelease (Language=go1.9.7; Platform=amd64/linux)

Context

Your Environment

I have observed this on CouchDB 1.7.1, 2.0.0, 2.1.2, and 2.2.0, but only in Travis-CI on my Kivik project. I have been unable thus far to reproduce this locally on any version.

I will continue to try to find a reliable reproduction case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions