[Question] Embedded Weaviate on Remote Server: No Private IP Address Found

I have a remote server on which I am trying to run the embedded weaviate without docker. I have the weaviate version 4.6.4. Following is the code I use to do so:

import weaviate
from weaviate.embedded import EmbeddedOptions

client = weaviate.WeaviateClient(
    embedded_options=EmbeddedOptions()
)
client.connect()

The output I receive is:

Started /u/guptarus/.cache/weaviate-embedded: process ID 1793823
{"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-06-27T19:06:46-04:00"}
{"action":"startup","auto_schema_enabled":true,"level":"info","msg":"auto schema enabled setting is set to \"true\"","time":"2024-06-27T19:06:46-04:00"}
{"action":"memberlist_init","bind_port":51943,"error":"Failed to get final advertise address: No private IP address found, and explicit IP not provided","hostname":"Embedded_at_8079","level":"error","msg":"memberlist not created","time":"2024-06-27T19:06:46-04:00"}
{"action":"startup","error":"create member list: Failed to get final advertise address: No private IP address found, and explicit IP not provided","level":"error","msg":"could not init cluster state","time":"2024-06-27T19:06:46-04:00"}
Traceback (most recent call last):
  File "/u/guptarus/large-batch-AL/test_embed_weaviate.py", line 9, in <module>
    client.connect()
  File "/u/guptarus/miniconda3/envs/thesis/lib/python3.12/site-packages/weaviate/client.py", line 287, in connect
    self._connection.connect(self.__skip_init_checks)
  File "/u/guptarus/miniconda3/envs/thesis/lib/python3.12/site-packages/weaviate/connect/v4.py", line 711, in connect
    super().connect(skip_init_checks)
  File "/u/guptarus/miniconda3/envs/thesis/lib/python3.12/site-packages/weaviate/connect/v4.py", line 137, in connect
    self.embedded_db.start()
  File "/u/guptarus/miniconda3/envs/thesis/lib/python3.12/site-packages/weaviate/embedded.py", line 317, in start
    super().start()
  File "/u/guptarus/miniconda3/envs/thesis/lib/python3.12/site-packages/weaviate/embedded.py", line 249, in start
    self.wait_till_listening()
  File "/u/guptarus/miniconda3/envs/thesis/lib/python3.12/site-packages/weaviate/embedded.py", line 170, in wait_till_listening
    raise WeaviateStartUpError(
weaviate.exceptions.WeaviateStartUpError: Embedded DB did not start listening on port 8079 within 30 seconds

Please can anyone recommend if this is an issue with the weaviate or an effect due to some design decision of the server administrators? I can not use docker on the remote server so I need to find the solution to run embedded weaviate without docker on the server.

Thanks!

hi @Rushil_Gupta !! Welcome to our community! :hugs:

This is really not recommended :slight_smile:

Weaviate Embedded is experimental, and should only be used to… experiment :wink:

With that said…

First, can you try it with the new python v4 syntax?

This should be it, according to Weaviate Embedded docs

import weaviate
import os

client = weaviate.connect_to_embedded(
    version=weaviate_version,  # e.g. version="1.23.10"
    headers={
        "X-OpenAI-Api-Key": os.getenv("OPENAI_APIKEY")  # Replace with your API key
    },
)

Let me know if you are able to run it like that.

Thanks!

@Rushil_Gupta Would you rather run the standalone binary?

Hey @DudaNogueira ,

Thanks for the suggestion. I tried with the new syntax but I still get the same error. It didn’t work.

Thanks!

Hey @aidandv,
I tried using the standalone binary. I downloaded the 1.25.5 binary.

I prepared the config file as json:

{
    "authentication": {
      "anonymous_access": {
        "enabled": true
      }
    },
    "authorization": {
      "admin_list": {
        "enabled": false
      }
    },
    "query_defaults": {
      "limit": 100
    },
    "persistence": {
      "dataPath": "./"
    }
}

And the shell script to run the weaviate is:

DISABLE_TELEMETRY="true" \
LOG_LEVEL="warning" \
./weaviate --config-file=weaviate.conf.json --host 0.0.0.0 --port 8080 --scheme http

However, with this setup too, I am getting the same error of No Private IP Address. Am I going wrong somewhere? Please suggest.

Thanks!

@Rushil_Gupta I don’t know what it your current environment but it looks like it doesn’t allow for creating IP addresses in the valid ranges (look here)

The solution is to use a machine where Weaviate is able to create an IP address in the valid range

1 Like