When I run Milvus in standalone mode on docker (by executing docker-compose on the default Milvus docker-compose.yml file, resulting in the three containers being created), I cannot connect to the Milvus server from a task running in another docker container on the same host. I have configured this container to be on the same network as the Milvus server, and I can ping the Milvus server from this container via the Milvus server's IP.
In the task container I run:
connections.connect(
alias="default",
host='192.168.192.4',
port='19530',
secure=False
)
The error log shows:
Traceback (most recent call last):
File "task.py", line 45, in
secure=True
File "/usr/local/lib/python3.7/site-packages/pymilvus/orm/connections.py", line 262, in connect
connect_milvus(**kwargs, password=password)
File "/usr/local/lib/python3.7/site-packages/pymilvus/orm/connections.py", line 233, in connect_milvus
gh._wait_for_channel_ready()
File "/usr/local/lib/python3.7/site-packages/pymilvus/client/grpc_handler.py", line 118, in _wait_for_channel_ready
raise MilvusException(Status.CONNECT_FAILED, f'Fail connecting to server on {self._address}. Timeout')
pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on 192.168.192.4:19530. Timeout)>
192.168.192.4 is the ip address of the milvus-standalone container.