# Docker cluster on 3 nodes

**URL:** <https://community.cratedb.com/t/docker-cluster-on-3-nodes/1892>\
**Category:** CrateDB\
**Tags:** getting-started\
**Created:** [November 4, 2024, 3:54pm UTC](https://community.cratedb.com/t/docker-cluster-on-3-nodes/1892 "2024-11-04T15:54:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joheams](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/joheams/32/1298_2.png) [@joheams](https://community.cratedb.com/u/joheams)\
**Post date:** [November 4, 2024, 3:54pm UTC](https://community.cratedb.com/t/docker-cluster-on-3-nodes/1892/1 "2024-11-04T15:54:05Z")

</div>

Hi all, I have seen similiar question, but for the better of me I cant get it to work.

I am trying to setup a cluster on three different docker machines (different servers) the setup looks similiar to this

```auto
docker run --rm -d \
      --name=crate01 \
      -v cratevol1:/data \
      -p 4200:4200 \
      -p 4300:4300 \
      -p 5432:5432 \
      --add-host=crate01=192.168.1.11 \
      --add-host=crate02=192.168.1.12 \
      --add-host=crate03=192.168.1.13 \
      --cpus 2 \
      --memory 8g \
      --network host \
      --env CRATE_HEAP_SIZE=4g \
      --pull=always \
      crate \
      crate -Cnetwork.host=_site_ \
            -Cnode.name=crate01 \
            -Cdiscovery.seed_hosts=crate02,crate03 \
            -Ccluster.initial_master_nodes=crate01,crate02 \
            -Cgateway.expected_data_nodes=3 \
            -Cgateway.recover_after_data_nodes=3 

```

on all hosts. Now every node starts but they dont connect, I am pretty sure the issue lies here

```auto
[2024-11-04T15:52:07,433][WARN][o.e.d.HandshakingTransportAddressConnector] [crate01] [connectToRemoteMasterNode[192.168.1.12:4300]] completed handshake with [{crate02}{ZVtAhPScQXi2HDfsQdDO-Q}{gxdTEWQnQ6-nmOxAhorbNA}{172.17.0.1}{172.17.0.1:4300}{dm}{http_address=172.17.0.1:4200}] but followup connection failed
org.elasticsearch.transport.ConnectTransportException: [crate02][172.17.0.1:4300] handshake failed. unexpected remote node {crate01}{Nhsq4gWrQ-mLLcehgkt73g}{8W4SHgqHQP2ojrQZQk0N8g}{172.17.0.1}{172.17.0.1:4300}{dm}{http_address=172.17.0.1:4200}

```

So, they find the other node, but for some strange reasons they try to connect to the docker internal ip (172.17.0.1) afterwards. As these are all different docker servers they basically find themselfs and get an issue.

I tried different things but running out of ideas. Any hint or helo would be appreciated.

Thanks in advance  
Joerg

---

<div class="post-metadata">

**Author:** ![joheams](https://sea2.discourse-cdn.com/flex020/user_avatar/community.cratedb.com/joheams/32/1298_2.png) [@joheams](https://community.cratedb.com/u/joheams)\
**Post date:** [November 4, 2024, 4:55pm UTC](https://community.cratedb.com/t/docker-cluster-on-3-nodes/1892/2 "2024-11-04T16:55:41Z")

</div>

Okay, so it is actually easy to fix

```auto
-Cnetwork.host=192.168.1.11

```

sets the publish and communication address, as I use "host"as network this works actually
