Single node clusters are often configured with a node name of 127.0.0.1. When couchbase-cli is executed remotely it will resolve the host:port for specific services (e.g. CBAS_SERVICE), in this case that will be 127.0.0.1 and as a result it will fail.
This breaks configuring analytics links on single node clusters with a name of 127.0.0.1.
The address used to contact the cluster should be used on missing hostname and not 127.0.0.1, which it looks like is available as used_host in this function.
1. Create single-node cluster, configure w/ KV + Analytics- ensure node name is '127.0.0.1' -
2. From a separate machine that does not Couchbase w/ Analytics running, run
Define an external address on the node prior to executing the analytics-link-setup CLI command.