YC opened a new issue #2858:
URL: https://github.com/apache/couchdb/issues/2858


   Followup to #2797 
   
   ## Description
   Cluster setup fails when request to `/` is not made before `finish_cluster`. 
   
   ## Steps to Reproduce
   Assuming that 192.168.56.101 is setup node:
   ```
   #curl http://192.168.56.101:5984/
   curl http://192.168.56.102:5984/
   curl http://user:[email protected]:5984/_cluster_setup
   curl --request POST
     --url http://user:[email protected]:5984/_cluster_setup \
     --header 'content-type: application/json' \
     --data '{
        "action": "enable_cluster",
        "bind_address": "0.0.0.0",
        "username": "user",
        "password": "pass",
        "port": 5984,
        "node_count": 2,
        "remote_node": "192.168.56.102",
        "remote_current_user": "user",
        "remote_current_password": "pass"
   }'
   curl --request POST \
     --url http://user:[email protected]:5984/_cluster_setup \
     --header 'content-type: application/json' \
     --data '{
       "action": "add_node",
       "host": "192.168.56.102",
       "port": 5984,
       "username": "user",
       "password": "pass",
       "singlenode": false
   }'
   curl --request POST \
     --url http://user:[email protected]:5984/_cluster_setup \
     --header 'content-type: application/json' \
     --data '{ "action": "finish_cluster" }'
   curl http://user:[email protected]:5984/_cluster_setup
   ```
   
   ```
   
{"couchdb":"Welcome","version":"3.0.0-ebdfbba","git_sha":"ebdfbba","uuid":"18b03233b7265d32443a8d576041a981","features":["access-ready","partitioned","pluggable-storage-engines","reshard","scheduler"],"vendor":{"name":"The
 Apache Software Foundation"}}
   {"state":"cluster_enabled"}
   {"ok":true}
   {"ok":true}
   {"error":"setup_error","reason":"Cluster setup unable to sync admin 
passwords"}
   {"state":"cluster_enabled"}
   ```
   ## Expected Behaviour
   Cluster setup should succeed without visiting `/`.
   
   ## Your Environment
   Docker containers built with 
[couchdb-docker/dev](https://github.com/apache/couchdb-docker/tree/master/dev) 
executed on 2 virtualbox vms
   
   ## Additional Context
   Here are the corresponding logs of the setup node:
   [Without GET 
/](https://github.com/apache/couchdb/files/4563132/logs_cleaned.txt)
   Lines of note:
   ```
   [error] 2020-05-01T09:04:07.246153Z [email protected] <0.714.0> 
3e471a2ab6 setup sync_admin results 
[{badrpc,{'EXIT',{badarg,[{config,set,5,[{file,"src/config.erl"},{line,186}]},{rpc,'-handle_call_call/6-fun-0-',5,[{file,"rpc.erl"},{line,197}]}]}}}]
 errors []
   [notice] 2020-05-01T09:04:07.255094Z [email protected] <0.714.0> 
3e471a2ab6 192.168.56.101:5984 192.168.56.101 user POST /_cluster_setup 500 ok 
43
   ```
   [With GET 
/](https://github.com/apache/couchdb/files/4563134/logs2_cleaned.txt)


----------------------------------------------------------------
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:
[email protected]


Reply via email to