Skip to content

[BUG] Marqo cannot connect to Zookeeper #945

@tot-ra

Description

@tot-ra

Describe the bug
A clear and concise description of what the bug is.

To Reproduce

docker-compose file:

services:
  marqo:
    image: marqoai/marqo:2.11
    ports:
      - "8882:8882"
    volumes:
      - ./marqoai_data:/opt/vespa/

code:

mq = marqo.Client(url='http://localhost:8882')

collection_name = "collection_768"
mq.create_index(
    index_name=collection_name,
    type='structured',
    model="no_model",
    model_properties={
        "type": "no_model",
        "dimensions": 768
    },
    ann_parameters={
        "spaceType": "prenormalized-angular",
        "parameters": {
            "efConstruction": 512,
            "m": 16
        }
    },
    # field types can be found here: https://docs.marqo.ai/2.7/API-Reference/Indexes/create_structured_index/#fields
    all_fields=[
        {
            "name": "custom",
            "type": "custom_vector",
            "features": ["lexical_search", "filter"]
        },
    ],
    tensor_fields=["custom"])

index = mq.index(collection_name)

Logs:

marqo-1  | Traceback (most recent call last):
marqo-1  |   File "/app/src/marqo/core/distributed_lock/zookeeper_distributed_lock.py", line 47, in acquire
marqo-1  |     self._zookeeper_client.start()
marqo-1  |   File "/app/src/marqo/vespa/zookeeper_client.py", line 12, in start
marqo-1  |     super().start(timeout if timeout is not None else self.zookeeper_connection_timeout)
marqo-1  |   File "/usr/local/lib/python3.8/site-packages/kazoo/client.py", line 669, in start
marqo-1  |     raise self.handler.timeout_exception("Connection time-out")
marqo-1  | kazoo.handlers.threading.KazooTimeoutError: Connection time-out
marqo-1  |
marqo-1  | The above exception was the direct cause of the following exception:
marqo-1  |
marqo-1  | Traceback (most recent call last):
marqo-1  |   File "/app/src/marqo/api/route.py", line 20, in marqo_custom_route_handler
marqo-1  |     return await original_route_handler(request)
marqo-1  |   File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 235, in app
marqo-1  |     raw_response = await run_endpoint_function(
marqo-1  |   File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
marqo-1  |     return await run_in_threadpool(dependant.call, **values)
marqo-1  |   File "/usr/local/lib/python3.8/site-packages/starlette/concurrency.py", line 41, in run_in_threadpool
marqo-1  |     return await anyio.to_thread.run_sync(func, *args)
marqo-1  |   File "/usr/local/lib/python3.8/site-packages/anyio/to_thread.py", line 33, in run_sync
marqo-1  |     return await get_asynclib().run_sync_in_worker_thread(
marqo-1  |   File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
marqo-1  |     return await future
marqo-1  |   File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 807, in run
marqo-1  |     result = context.run(func, *args)
marqo-1  |   File "/app/src/marqo/tensor_search/api.py", line 250, in create_index
marqo-1  |     marqo_config.index_management.create_index(settings.to_marqo_index_request(index_name))
marqo-1  |   File "/app/src/marqo/core/index_management/index_management.py", line 125, in create_index
marqo-1  |     with self._deployment_lock_context_manager():
marqo-1  |   File "/usr/lib64/python3.8/contextlib.py", line 113, in __enter__
marqo-1  |     return next(self.gen)
marqo-1  |   File "/app/src/marqo/core/index_management/index_management.py", line 648, in _deployment_lock_context_manager
marqo-1  |     with self._zookeeper_deployment_lock:
marqo-1  |   File "/app/src/marqo/core/distributed_lock/zookeeper_distributed_lock.py", line 71, in __enter__
marqo-1  |     self.acquire()
marqo-1  |   File "/app/src/marqo/core/distributed_lock/zookeeper_distributed_lock.py", line 49, in acquire
marqo-1  |     raise BackendCommunicationError("Marqo cannot connect to Zookeeper") from e
marqo-1  | marqo.core.exceptions.BackendCommunicationError: Marqo cannot connect to Zookeeper
marqo-1  | INFO:     192.168.65.1:63132 - "POST /indexes/collection_768 HTTP/1.1" 500 Internal Server Error

Desktop (please complete the following information):

  • OS: OSX Sonoma 14.1
  • Docker desktop 4.33.0
Screenshot 2024-08-24 at 15 07 52

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions