You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/12/17 13:20:25 UTC

[GitHub] [couchdb] m90 opened a new issue #2369: Cluster to single node replication prints "Could not parse cookie from response headers cookie_format_invalid"

m90 opened a new issue #2369: Cluster to single node replication prints "Could not parse cookie from response headers cookie_format_invalid"
URL: https://github.com/apache/couchdb/issues/2369
 
 
   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   ## Description
   
   We are running a CouchDB cluster of 9 nodes. For backup purposes et. al. we would like to replicate all of its databases to a standalone single node CouchDB instance. The replication is a push-replication, i.e. the cluster has multiple continuous replications set up that target the single node.
   
   Both the cluster and the single node are protected, so the replication knows about BasicAuth credentials for accessing the target as well as the source. We can use this setup to replicate data as expected and will see changes to the cluster being reflected in the backup node instantly.
   
   Yet, for reasons unclear to us, all of the nodes in the cluster will log a message like this on each request made to the replication target:
   
   ```
   [error] 2019-12-17T12:43:59.736014Z couchdb@couchdb2.local <0.24235.3> -------- couch_replicator_auth_session : Could not parse cookie from response headers cookie_format_invalid
   ```
   Log output for the single node looks unsuspicious.
   
   From what I understand, the replication should use the Authentication header defined in the replication docs and no HTTP cookies are involved, yet after digging through the codebase it looks like the second branch is hit here: https://github.com/apache/couchdb/blob/1347806d2feebce53325070b475f9e211d240ddf/src/couch_replicator/src/couch_replicator_auth_session.erl#L307-L312 when i would expect it to hit the above one saying `cookie_not_found`.
   
   I'm not entirely sure if this expected, or if there is something going wrong in how we have set things up.
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
   
   * CouchDB Version used: 2.3.1
   * Browser name and version: n/a
   * Operating System and version: Ubuntu 16 running CouchDB in Docker
   
   Both the cluster as well as the single node are behind NGINX using the following proxy settings:
   
   ```
     location / {
       proxy_pass http://couchdb:5984;
       proxy_redirect off;
       proxy_set_header Host $host;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     }
   ```
   
   As far as I understand this should not add or remove any cookie related headers.
   
   All of the nodes in the cluster share the same `couchdb.uuid` and `couch_httpd_auth.secret` when the single node has different values.
   
   `chttpd.authentication_handlers` is not set / using the default value. Explicitly defining this to be basic auth only seemed to make no difference.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services