XDCR and Docker

I’m running a Couchbase cluster in Docker containers on AWS. I’m trying to setup a second cluster, also in Docker containers on a local network to serve as a real-time backup of AWS cluster using XDCR. I’m able to add the second cluster as a ‘Remote Cluster’ in XDCR setup, however, replication is producing the following error and will not succeed:

Attention - 2016-09-29 18:40:02 127.0.0.1:Pipeline d100a706ebf7833f03a4482a53a48d4a/rentalcore/rentalcore failed to start, err=map[xmem_d100a706ebf7833f03a4482a53a48d4a/rentalcore/rentalcore_172.17.0.4:11210_0:dial tcp 172.17.0.4:11210: getsockopt: connection refused]

It looks like it’s trying to connect using a local IP address, rather than the public IP address used when configuring the ‘Remote Cluster’ connection? I have verified that port 11210 is accessible remotely. Does anyone have a working setup with multiple clusters using XDCR and Docker containers?

Thanks for any help!

I’ve figured this out. For anyone else struggling with this, here’s what I had to do.

I’m configuring my clusters using the REST API, so, I had to add a ‘hostname’ declaration when setting this up like:
curl -v -X POST http://127.0.0.1:8091/pools/default -d memoryQuota=$COUCHBASE_MEMORY_QUOTA -d indexMemoryQuota=$COUCHBASE_INDEX_MEMORY_QUOTA -d hostname=$COUCHBASE_HOSTNAME

This seemed logical, however, the next thing I had to do was change the hosts file, which was odd since the hostname is a FQDN that routes properly already:

127.0.0.1 COUCHBASE_HOSTNAME

1 Like