Simple 2 nodes cluster with couchbase 4 (docker hub) on AWS

Hi,
I’m able to spawn a single node server, create buckets, use it, etc.
But I’m unable to link two of them together to work as a small replicated 2 nodes cluster.

I configured the first one with this (inside docker):

couchbase-cli cluster-init -c 127.0.0.1:8091 --cluster-username=root --cluster-password=12345678 --services=data,index,query --cluster-ramsize=4096 --cluster-index-ramsize=1024

And the second one with:
couchbase-cli node-init -c 172.31.53.250:8091 -u root -p 12345678

… and exposed most ports on both instances:
(When trying to run it with --net=host the web interface is not binding to 8091?)

 ports:
    - "4369:4369"                 # Erlang portmapper    
    - "8091:8091"                 # Web console, REST/HTTP Interface
    - "8092:8092"                 # API: View, queries, XDCR
    - "8093:8093"                 # Query service (4+)
    - "9998:9998"                 # Internal REST port
    - "11207:11207"               # Int/Ext. bucket SSL
    - "11209:11209"               # Int. bucket port
    - "11210:11210"               # Int/Ext. bucket
    - "11211:11211"               # Client interface proxy
    - "11214:11214"               # Incoming SSL proxy
    - "11215:11215"               # Internal outgoing SSL proxy
    - "18091:18091"               # Web console, REST/HTTP Interface (SSL)
    - "18092:18092"               # API: View, queries, XDCR (SSL)
    - "21100-21299:21100-21299"   # Internal CAPI https for SSL

But then it seems that even though they are in the same AWS VPC, and can talk to each other freely (even verified with netcat from within the 2 docker container on a free port), adding the second server using the initialized one’s web interface gives:

eaddrnotavail

Trying from the one started with cluster-init, pointing to the node-init one, I get:

> couchbase-cli server-add -c 127.0.0.1:8091 -u root -p 12345678 --server-add=172.31.53.250:8091 --server-add-username=root --server-add-password=12345678 --service=data,index,query ERROR: unable to server-add 172.31.53.250:8091 (400) Bad Request ["Prepare join failed. Could not listen on address \"172.31.53.250\": eaddrnotavail"]

  • Am I not initializing them properly?
  • Should I use other arguments?
  • Are ports used this way not working for an obscure reason?
  • … ?

Thanks!