Couldn't connect to Cluster Remote Node

Below is my .yaml file

version: '3.9'
services:
  weaviate:
    image: cr.weaviate.io/semitechnologies/weaviate:1.28.2
    container_name: weaviate
    ports:
      - "8080:8080"
      - "50051:50051"

    environment:
      QUERY_DEFAULTS_LIMIT: 25
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      ENABLE_API_BASED_MODULES: 'true'
      LIMIT_RESOURCES: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      CLUSTER_HOSTNAME: 'node1'
    volumes:
      - weaviate_data:/var/lib/weaviate
    restart: on-failure:3
volumes:
  weaviate_data:
    driver: local

I want am running the Docker Container on an Azure VM.
With inbound ports exposed: 8080 and 50051

I am getting the error of failed to join remoteNode: 172.28.0.2:8300
I dont even want to have a cluster, standalone node is something I am looking for but I am not able to achieve it.

Any solution?

hi @Ayush_Singh !!

Welcome to our community :hugs:

Can you paste the entire error stack?

Also, can you paste how you are doing to connect to that cluster?

this should work if you deploy this very same docker compose on a VPS and making sure you expose ports 8080 and 50051, and using our python client:

client = weaviate.connect_to_local(
    headers=headers,
    #auth_credentials=weaviate.auth.AuthApiKey("YOUR-WEAVIATE-API-KEY")
    host="192.168.28.99"
)
print(f"Client: {weaviate.__version__}, Server: {client.get_meta().get('version')}")

:warning: Note: this will exposes you server without any security inplace: SSL encryption and authentication!

Let me know if this helps!

Thanks!

Below are the container logs:

{"build_git_commit":"5a3991d","build_go_version":"go1.22.10","build_image_tag":"v1.28.2","build_wv_version":"1.28.2","level":"info","msg":"attempting to join","remoteNodes":["192.168.176.2:8300"],"time":"2024-12-24T01:53:10Z"}
{"build_git_commit":"5a3991d","build_go_version":"go1.22.10","build_image_tag":"v1.28.2","build_wv_version":"1.28.2","level":"info","msg":"attempted to join and failed","remoteNode":"192.168.176.2:8300","status":8,"time":"2024-12-24T01:53:10Z"}
{"build_git_commit":"5a3991d","build_go_version":"go1.22.10","build_image_tag":"v1.28.2","build_wv_version":"1.28.2","level":"info","msg":"attempting to join","remoteNodes":["192.168.176.2:8300"],"time":"2024-12-24T01:53:11Z"}
{"build_git_commit":"5a3991d","build_go_version":"go1.22.10","build_image_tag":"v1.28.2","build_wv_version":"1.28.2","level":"info","msg":"attempted to join and failed","remoteNode":"192.168.176.2:8300","status":8,"time":"2024-12-24T01:53:11Z"}

updated yml file:

version: '3.9'
services:
  weaviate:
    container_name: weaviate
    command:
    - --host
    - 0.0.0.0
    - --port
    - '8080'
    - --scheme
    - http
    image: cr.weaviate.io/semitechnologies/weaviate:1.28.2
    ports:
    - 8080:8080
    - 50051:50051
    volumes:
    - weaviate_data:/var/lib/weaviate
    restart: on-failure:0
    environment:
      QUERY_DEFAULTS_LIMIT: 25
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      ENABLE_API_BASED_MODULES: 'true'
      CLUSTER_HOSTNAME: "node1"
      CLUSTER_GOSSIP_BIND_PORT: "7102"
      CLUSTER_DATA_BIND_PORT: "7103"
volumes:
  weaviate_data:

My Weaviate Instance is not able to connect to remoteNode for some reason.
I also tried to ping the remoteNode explicitly from within the container and it was working. But for some reason the instance is not able to connect to the remoteNode

Also when i try to access the remoteNode from the container.
I dont face any issue.

/ # nc -zv 192.168.176.2 8300
192.168.176.2 (192.168.176.2:8300) open

Resolved: deleted the cache and it worked.

1 Like