# How to deploy to two machines？

**URL:** <https://forum.weaviate.io/t/how-to-deploy-to-two-machines/743>\
**Category:** Support\
**Created:** [September 27, 2023, 3:54am UTC](https://forum.weaviate.io/t/how-to-deploy-to-two-machines/743 "2023-09-27T03:54:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris\_hoo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/chris_hoo/32/521_2.png) [@chris\_hoo](https://forum.weaviate.io/u/chris_hoo)\
**Post date:** [September 27, 2023, 3:54am UTC](https://forum.weaviate.io/t/how-to-deploy-to-two-machines/743/1 "2023-09-27T03:54:05Z")

</div>

I want to use Docker to deploy Weaviate on two machines,The starting command for Docker is：

my node1 machine docker run this ：

docker run -d -p 3081:8080   
-p 7100:7100   
-p 7101:7101   
-v $PWD/data:/var/lib/weaviate   
–name weaviate   
–restart=always   
-e AUTHORIZATION\_ADMINLIST\_ENABLED=true   
-e AUTHORIZATION\_ADMINLIST\_USERS=admin   
-e AUTHENTICATION\_APIKEY\_ENABLED=true   
-e AUTHENTICATION\_APIKEY\_ALLOWED\_KEYS=WVF5RgsX3tD5ngdN8pkiy   
-e AUTHENTICATION\_APIKEY\_USERS=admin   
-e PERSISTENCE\_DATA\_PATH=/var/lib/weaviate   
-e CLUSTER\_HOSTNAME=node1   
-e CLUSTER\_GOSSIP\_BIND\_PORT=7100   
-e CLUSTER\_DATA\_BIND\_PORT=7101   
semitechnologies/weaviate

node2 machine docker run this:

docker run --name weaviate   
-p 3081:8080   
-p 7102:7102   
-p 7103:7103   
-v $PWD/data:/var/lib/weaviate   
-e AUTHORIZATION\_ADMINLIST\_ENABLED=true   
-e AUTHORIZATION\_ADMINLIST\_USERS=admin   
-e AUTHENTICATION\_APIKEY\_ENABLED=true   
-e AUTHENTICATION\_APIKEY\_ALLOWED\_KEYS= WVF5RgsX3tD5ngdN8pkiy   
-e AUTHENTICATION\_APIKEY\_USERS=admin   
-e PERSISTENCE\_DATA\_PATH=/var/lib/weaviate   
-e CLUSTER\_HOSTNAME=node2   
-e CLUSTER\_GOSSIP\_BIND\_PORT=7102   
-e CLUSTER\_DATA\_BIND\_PORT=7103   
-e CLUSTER\_JOIN=10.254.140.134:7100   
semitechnologies/weaviate

Node 2 starts and reports the following error:

{“action”:“startup”,“default\_vectorizer\_module”:“none”,“level”:“info”,“msg”:“the default vectorizer modules is set to "none", as a result all new schema classes without an explicit vectorizer setting, will use this vectorizer”,“time”:“2023-09-27T03:53:44Z”}  
{“action”:“startup”,“auto\_schema\_enabled”:true,“level”:“info”,“msg”:“auto schema enabled setting is set to "true"”,“time”:“2023-09-27T03:53:44Z”}  
{“action”:“broadcast\_abort\_transaction”,“error”:“host "172.17.0.2:7101": send http request: Delete "[http://172.17.0.2:7101/schema/transactions/9ecd4dc0-ace9-439c-986f-e1945ddcc389\](http://172.17.0.2:7101/schema/transactions/9ecd4dc0-ace9-439c-986f-e1945ddcc389%5C)”: dial tcp 172.17.0.2:7101: connect: connection refused",“id”:“9ecd4dc0-ace9-439c-986f-e1945ddcc389”,“level”:“error”,“msg”:“broadcast tx abort failed”,“time”:“2023-09-27T03:53:44Z”}  
{“action”:“startup”,“error”:“could not load or initialize schema: sync schema with other nodes in the cluster: read schema: open transaction: broadcast open transaction: host "172.17.0.2:7101": send http request: Post "[http://172.17.0.2:7101/schema/transactions/\](http://172.17.0.2:7101/schema/transactions/%5C)”: dial tcp 172.17.0.2:7101: connect: connection refused",“level”:“fatal”,“msg”:“could not initialize schema manager”,“time”:“2023-09-27T03:53:44Z”}

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [September 27, 2023, 12:33pm UTC](https://forum.weaviate.io/t/how-to-deploy-to-two-machines/743/2 "2023-09-27T12:33:01Z")

</div>

Hi @chris_hoo !

I believe the problem is that those two containers might not be able to consistently communicate with each other.

while using docker, you should avoid using IPs, as those are subject to be changed.

I believe you have seen this post (saw you comment there):

> [@Can only Docker Compose be used for multi node deployment?](https://forum.weaviate.io/t/can-only-docker-compose-be-used-for-multi-node-deployment/517/2):
>
> Hi @codehelen ! Welcome to our community slight_smile This must be some networking issue along the way, as your docker is correct (see below) A starting point is making sure that weaviate-node2-IP can communicate with weaviate-node1-IP on all specified ports. A good example on how to run with ad-hoc containers (at the same docker host): First, create a docker attachable network docker network create weaviate --atachable note that weaviate, above, can be whatever network name you want. Mak…

Where you able to use it?

---

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [September 27, 2023, 12:33pm UTC](https://forum.weaviate.io/t/how-to-deploy-to-two-machines/743/3 "2023-09-27T12:33:34Z")

</div>

Ah! And welcome to our community 😉

---

<div class="post-metadata">

**Author:** ![jasper2077](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jasper2077/32/2816_2.png) [@jasper2077](https://forum.weaviate.io/u/jasper2077)\
**Post date:** [December 2, 2024, 1:31am UTC](https://forum.weaviate.io/t/how-to-deploy-to-two-machines/743/4 "2024-12-02T01:31:18Z")

</div>

Hello, I’m currently facing the same issue. Have you figured out how to solve the error? 🤔
