Description
Hi, I am using docker compose to deploy Weaviate on two machines. The first machine’s docker compose yml file is:
services:
weaviate-node-1:
init: true
command:
- --host
- 0.0.0.0
- --port
- '8080'
- --scheme
- http
image: cr.weaviate.io/semitechnologies/weaviate:1.24.2
ports:
- 8080:8080
- 7100:7100
- 7101:7101
- 50051:50051
restart: on-failure:0
volumes:
- ./data-node-1:/var/lib/weaviate
environment:
LOG_LEVEL: 'debug'
QUERY_DEFAULTS_LIMIT: 25
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
DEFAULT_VECTORIZER_MODULE: 'none'
CLUSTER_HOSTNAME: 'node1'
CLUSTER_GOSSIP_BIND_PORT: '7100'
CLUSTER_DATA_BIND_PORT: '7101'
networks:
- weaviate
networks:
weaviate:
attachable: true
The second machine docker compose file is:
services:
weaviate-node-2:
init: true
command:
- --host
- 0.0.0.0
- --port
- '8081'
- --scheme
- http
image: cr.weaviate.io/semitechnologies/weaviate:1.24.2
ports:
- 8081:8080
- 7102:7102
- 7103:7103
- 50052:50051
restart: on-failure:0
volumes:
- ./data-node-2:/var/lib/weaviate
environment:
LOG_LEVEL: 'debug'
QUERY_DEFAULTS_LIMIT: 25
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
DEFAULT_VECTORIZER_MODULE: 'none'
CLUSTER_HOSTNAME: 'node2'
CLUSTER_GOSSIP_BIND_PORT: '7102'
CLUSTER_DATA_BIND_PORT: '7103'
CLUSTER_JOIN: '10.12.226.225:7100'
networks:
- weaviate
networks:
weaviate:
attachable: true
after I ran docker compose up and I got the error as shown in the following logs.
The log from node 1:
[+] Running 2/1
✔ Network weaviate_testing_weaviate Created 0.2s
✔ Container weaviate_testing-weaviate-node-1-1 Created 0.0s
Attaching to weaviate-node-1-1
weaviate-node-1-1 | {"action":"startup","level":"debug","msg":"created startup context, nothing done so far","startup_time_left":"59m59.997886965s","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"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":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"startup","auto_schema_enabled":true,"level":"info","msg":"auto schema enabled setting is set to \"true\"","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"startup","level":"debug","msg":"config loaded","startup_time_left":"59m59.997070446s","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"startup","level":"debug","msg":"configured OIDC and anonymous access client","startup_time_left":"59m59.997044326s","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"startup","level":"debug","msg":"initialized schema","startup_time_left":"59m59.997008365s","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"startup","level":"debug","msg":"startup routine complete","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"level":"info","msg":"No resource limits set, weaviate will use all available memory and CPU. To limit resources, set LIMIT_RESOURCES=true","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"startup","level":"debug","msg":"start registering modules","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"startup","level":"debug","msg":"completed registering modules","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"startup_cluster_schema_sync","level":"debug","msg":"Only node in the cluster at this point. No schema sync necessary.","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"inverted filter2search migration","level":"debug","msg":"migration skip flag set, skipping migration","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"cluster_api_startup","level":"debug","msg":"serving cluster api on port 7101","port":7101,"time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"inverted filter2search migration","level":"debug","msg":"starting switching fallback mode","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"inverted filter2search migration","level":"debug","msg":"no missing filterable indexes, fallback mode skipped","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"startup","level":"debug","msg":"start initializing modules","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"startup","level":"debug","msg":"finished initializing modules","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"graphql_rebuild","level":"debug","msg":"rebuilding the graphql schema","schema":{"Objects":{"classes":[]}},"time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"grpc_startup","level":"info","msg":"grpc server listening at [::]:50051","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"restapi_management","level":"info","msg":"Serving weaviate at http://[::]:8080","time":"2024-03-15T05:43:29Z"}
weaviate-node-1-1 | {"action":"telemetry_push","level":"info","msg":"telemetry started","payload":"\u0026{MachineID:cd3080db-13b9-4357-8015-9fefbebf3de3 Type:INIT Version:1.24.2 Modules: NumObjects:0 OS:linux Arch:amd64}","time":"2024-03-15T05:43:30Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Stream connection from=10.12.226.153:60154","time":"2024-03-15T05:44:08Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Failed UDP ping: node2 (timeout reached)","time":"2024-03-15T05:44:10Z"}
weaviate-node-1-1 | {"level":"info","msg":" memberlist: Suspect node2 has failed, no acks received","time":"2024-03-15T05:44:11Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Failed UDP ping: node2 (timeout reached)","time":"2024-03-15T05:44:12Z"}
weaviate-node-1-1 | {"level":"info","msg":" memberlist: Suspect node2 has failed, no acks received","time":"2024-03-15T05:44:14Z"}
weaviate-node-1-1 | {"level":"info","msg":" memberlist: Marking node2 as failed, suspect timeout reached (0 peer confirmations)","time":"2024-03-15T05:44:15Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Failed UDP ping: node2 (timeout reached)","time":"2024-03-15T05:44:15Z"}
weaviate-node-1-1 | {"level":"info","msg":" memberlist: Suspect node2 has failed, no acks received","time":"2024-03-15T05:44:18Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Stream connection from=10.12.226.153:53962","time":"2024-03-15T05:44:40Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Stream connection from=10.12.226.153:34830","time":"2024-03-15T05:45:12Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Failed UDP ping: node2 (timeout reached)","time":"2024-03-15T05:45:14Z"}
weaviate-node-1-1 | {"level":"info","msg":" memberlist: Suspect node2 has failed, no acks received","time":"2024-03-15T05:45:18Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Failed UDP ping: node2 (timeout reached)","time":"2024-03-15T05:45:19Z"}
weaviate-node-1-1 | {"level":"info","msg":" memberlist: Marking node2 as failed, suspect timeout reached (0 peer confirmations)","time":"2024-03-15T05:45:22Z"}
weaviate-node-1-1 | {"level":"info","msg":" memberlist: Suspect node2 has failed, no acks received","time":"2024-03-15T05:45:24Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Stream connection from=10.12.226.153:32960","time":"2024-03-15T05:45:44Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Stream connection from=10.12.226.153:56040","time":"2024-03-15T05:46:16Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Failed UDP ping: node2 (timeout reached)","time":"2024-03-15T05:46:17Z"}
weaviate-node-1-1 | {"level":"info","msg":" memberlist: Suspect node2 has failed, no acks received","time":"2024-03-15T05:46:23Z"}
weaviate-node-1-1 | {"level":"debug","msg":" memberlist: Failed UDP ping: node2 (timeout reached)","time":"2024-03-15T05:46:24Z"}
The log from node 2:
[+] Running 2/1
✔ Network weaviate_testing_weaviate Created 0.2s
✔ Container weaviate_testing-weaviate-node-2-1 Created 0.0s
Attaching to weaviate-node-2-1
weaviate-node-2-1 | {"action":"startup","level":"debug","msg":"created startup context, nothing done so far","startup_time_left":"59m59.997878536s","time":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"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":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"action":"startup","auto_schema_enabled":true,"level":"info","msg":"auto schema enabled setting is set to \"true\"","time":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"action":"startup","level":"debug","msg":"config loaded","startup_time_left":"59m59.997113417s","time":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"action":"startup","level":"debug","msg":"configured OIDC and anonymous access client","startup_time_left":"59m59.997089937s","time":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"action":"startup","level":"debug","msg":"initialized schema","startup_time_left":"59m59.997072807s","time":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"level":"debug","msg":" memberlist: Initiating push/pull sync with: 10.12.226.225:7100","time":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"action":"startup","level":"debug","msg":"startup routine complete","time":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"level":"info","msg":"No resource limits set, weaviate will use all available memory and CPU. To limit resources, set LIMIT_RESOURCES=true","time":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"action":"startup","level":"debug","msg":"start registering modules","time":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"action":"startup","level":"debug","msg":"completed registering modules","time":"2024-03-15T05:44:08Z"}
weaviate-node-2-1 | {"level":"debug","msg":" memberlist: Failed UDP ping: node1 (timeout reached)","time":"2024-03-15T05:44:09Z"}
weaviate-node-2-1 | {"level":"info","msg":" memberlist: Suspect node1 has failed, no acks received","time":"2024-03-15T05:44:10Z"}
weaviate-node-2-1 | {"level":"debug","msg":" memberlist: Failed UDP ping: node1 (timeout reached)","time":"2024-03-15T05:44:11Z"}
weaviate-node-2-1 | {"level":"info","msg":" memberlist: Suspect node1 has failed, no acks received","time":"2024-03-15T05:44:13Z"}
weaviate-node-2-1 | {"level":"debug","msg":" memberlist: Failed UDP ping: node1 (timeout reached)","time":"2024-03-15T05:44:13Z"}
weaviate-node-2-1 | {"level":"info","msg":" memberlist: Marking node1 as failed, suspect timeout reached (0 peer confirmations)","time":"2024-03-15T05:44:14Z"}
weaviate-node-2-1 | {"level":"info","msg":" memberlist: Suspect node1 has failed, no acks received","time":"2024-03-15T05:44:16Z"}
weaviate-node-2-1 | {"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.31.0.2:7101\": send http request: Post \"http://172.31.0.2:7101/schema/transactions/\": context deadline exceeded","level":"fatal","msg":"could not initialize schema manager","time":"2024-03-15T05:44:38Z"}
weaviate-node-2-1 exited with code 0
And I have tried your suggestion here Can only Docker Compose be used for multi node deployment?, but still got same issues.
I have tested the communication between the two nodes and they can connect with each other through TCP and UDP.
Do you have any clue why this is happening and suggestion on how to resolve this? Thanks very much!