Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: MilvusContainer is not working on M1 #755

Open
franciscojavierarceo opened this issue Jan 7, 2025 · 0 comments
Open

Bug: MilvusContainer is not working on M1 #755

franciscojavierarceo opened this issue Jan 7, 2025 · 0 comments

Comments

@franciscojavierarceo
Copy link

Describe the bug

The Milvus image fails to spin up and thus fails to authenticate.

To Reproduce

This script should suffice:

from testcontainers.core.container import DockerContainer
from testcontainers.core.waiting_utils import wait_for_logs

from pymilvus import MilvusClient

# MILVUS_CONTAINER = "milvusdb/milvus:v2.4.4"
MILVUS_CONTAINER = "milvusdb/milvus:latest"

def test_container(CONTAINER_TAG, Container):
    with Container(CONTAINER_TAG) as container:
        container.start()
        _ = wait_for_logs(container, "", timeout=30)
        print("Hello from Docker (Milvus)!")
        client = MilvusClient(uri="http://localhost:19530", token="usernamae:password")
        print(client.server_status())

# test_container(MILVUS_CONTAINER, MilvusContainer) # MilvusContainer gave me other issues
test_container(MILVUS_CONTAINER, DockerContainer)

Will result in:

pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:19530, illegal connection params or server unavailable)>

Runtime environment

# Get the operating system information (on a unix os).
$ uname -a
>Darwin farceo-mac 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000 arm64

# Get the python version.
$ python --version
>Python 3.11.10

Get the docker version and other docker information.

$ docker info
Client: Docker Engine - Community
 Version:    27.4.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.18.0
    Path:     /opt/homebrew/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  2.31.0
    Path:     /opt/homebrew/lib/docker/cli-plugins/docker-compose

Server:
 Containers: 30
  Running: 10
  Paused: 0
  Stopped: 20
 Images: 51
 Server Version: 24.0.9
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.5.0-15-generic
 Operating System: Ubuntu 23.10
 OSType: linux
 Architecture: aarch64
 CPUs: 2
 Total Memory: 3.813GiB
 Name: colima
 ID: 439f1675-9f87-479e-a6b0-3f8c96afe646
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: franciscojavierarceo
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Get all python packages.

$ pip freeze | grep testcontainers

testcontainers==4.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant