Unable to join server once I init the node with hostname in Docker env

I have a Linux Ubuntu 18 machine. with Docker installer. Couchbase version is couchbase:community-5.0.1
Plan to initial a cluster with 3 couchbase nodes. I have listed the reproduce steps here:


due to this forum do not let me insert more than 2 links

After this is done, I logged into localhost/8091 using ops/ops credentials.
There is a default node existing already

  1. When I try to add a server using couchbase1.dev.example.com, I got
    Attention: Prepare join failed. Joining node to itself is not allowed.

  2. If I try to add a server using IP of couchbase1.dev.example.com ( 172.17.0.2) , I got error:
    Attention: Join completion call failed. Got HTTP status 500 from REST call post to 172.17.0.2:8091-completeJoin. Body was: “[“Unexpected server error, request logged.”]”

To compare with this, if I do not rename the node with hostname, then I will can join the node with cluster without any problem. follow the doc in couchbase docs ( docker-deploy-multi-node-cluster)

Can some one point me some directions how I could fix this? Much appreciated.