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 2021/10/27 10:39:50 UTC

[GitHub] [couchdb] bravier opened a new issue #3805: [CouchDB 3.2.0] Cluster setup unable to sync admin passwords

bravier opened a new issue #3805:
URL: https://github.com/apache/couchdb/issues/3805


   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   ## Description
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   
   Cluster Setup API fails on final action `finish_cluster` when moving `secret` option from `[couch_httpd_auth]` to `[chttpd_auth]` as recommended in the [release note](https://docs.couchdb.org/en/stable/whatsnew/3.2.html#version-3-2-0) and the [documentation](https://docs.couchdb.org/en/stable/config/auth.html#chttpd_auth/secret).
   
   ## Steps to Reproduce
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   
   Start multiple CouchDB nodes with the exact same configuration in `/etc/couchdb/local.d/custom.ini` which includes:
   ```ini
   [chttpd_auth]
   secret = supersecret
   ```
   
   Use the `/_cluster_setup` API to create a cluster by running on each node (I use 3 nodes in the examples):
   ```sh
   for i in $(seq 1 3); do
       curl http://localhost:"$i"5984/_cluster_setup -X POST -H "Content-Type: application/json" -u root:password -d '{"action": "enable_cluster", "bind_address":"0.0.0.0", "username": "root", "password":"password", "node_count":"3"}';
   done;
   {"ok":true}
   {"ok":true}
   {"ok":true}
   ```
   
   Choose a "setup coordination node" and continue the procedure to join the 2 other nodes.
   ```sh
   for i in $(seq 2 3); do
       curl http://localhost:15984/_cluster_setup -X POST -H "Content-Type: application/json" -u root:password -d '{"action": "add_node", "host":"127.0.0.1", "port": "'"$i"'5984", "username": "root", "password":"password"}';
   done;
   {"ok":true}
   {"ok":true}
   ```
   
   The problem occurs on the final step with the action `finish_cluster` on the "setup coordination node":
   ```sh
   curl http://localhost:15984/_cluster_setup -X POST -H "Content-Type: application/json" -u root:password -d '{"action": "finish_cluster"}'
   {"error":"setup_error","reason":"Cluster setup unable to sync admin passwords"}
   ```
   
   The logs on the "setup coordination node" shows the following error:
   ```log
   [notice] 2021-10-27T10:05:52.033895Z node1@127.0.0.1 <0.24713.0> 647edac0e7 Setup: [{<<"action">>,<<"finish_cluster">>}]
   
   [notice] 2021-10-27T10:05:52.034066Z node1@127.0.0.1 <0.24713.0> 647edac0e7 finish_cluster: [{<<"action">>,<<"finish_cluster">>}]
   
   [error] 2021-10-27T10:05:52.043892Z node1@127.0.0.1 <0.24713.0> 647edac0e7 setup sync_admin results [{badrpc,{'EXIT',{function_clause,[{config,set,["couch_httpd_auth","secret",undefined,true,nil],[{file,"src/config.erl"},{line,189}]},{config,set,3,[]}]}}},{badrpc,{'EXIT',{function_clause,[{config,set,["couch_httpd_auth","secret",undefined,true,nil],[{file,"src/config.erl"},{line,189}]},{config,set,3,[]}]}}}] errors []
   
   [notice] 2021-10-27T10:05:52.044396Z node1@127.0.0.1 <0.24713.0> 647edac0e7 localhost:15984 127.0.0.1 root POST /_cluster_setup 500 ok 12
   ```
   
   ## Expected Behaviour
   
   [NOTE]: # ( Tell us what you expected to happen. )
   
   The `finish_cluster` request should succeed and return a 201 status code which indicated the cluster is effectively finished building.
   
   Checking the cluster state shows:
   ```sh
   curl -u root:password localhost:15984/_cluster_setup
   {"state":"cluster_enabled"}
   ```
   instead of:
   ```sh
   {"state":"cluster_finished"}
   ```
   
   ## 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: 3.2.0 (built from source and packaged [here](https://copr.fedorainfracloud.org/coprs/adrienverge/couchdb/build/2886193/))
   * Operating system and version: Fedora 34
   
   ## Additional Context
   
   [TIP]:  # ( Add any other context about the problem here. )
   
   From the error log, it looks like CouchDB cluster setup still expects the `secret` option to be inside the `[couch_httpd_auth]` section.
   
   Moving back `secret` to `[couch_httpd_auth]` like:
   ```ini
   [couch_httpd_auth]
   secret = supersecret
   ```
   and doing the whole procedure again fixes the issue but doesn't comply to release note and documentation.


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [couchdb] janl closed issue #3805: [CouchDB 3.2.0] Cluster setup unable to sync admin passwords

Posted by GitBox <gi...@apache.org>.
janl closed issue #3805:
URL: https://github.com/apache/couchdb/issues/3805


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org