I'm just starting to use Milvus, but cannot connect to the port given in the example. I am running directly on my machine (i.e. not a Docker image), but cannot get initial exampe to work:
$ python
Python 3.10.14 (main, May 6 2024, 19:42:50) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymilvus
>>> pymilvus.__version__
'2.4.4'
>>> host="localhost"
>>> port = 19530
>>> from pymilvus import connections
>>> connections.connect("default",host=host,port=port)
Traceback (most recent call last):
File "/home/me/anaconda3/envs/ShopTalk/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 147, in _wait_for_channel_ready
grpc.channel_ready_future(self._channel).result(timeout=timeout)
File "/home/me/anaconda3/envs/ShopTalk/lib/python3.10/site-packages/grpc/_utilities.py", line 162, in result
self._block(timeout)
File "/home/me/anaconda3/envs/ShopTalk/lib/python3.10/site-packages/grpc/_utilities.py", line 106, in _block
raise grpc.FutureTimeoutError()
grpc.FutureTimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/me/anaconda3/envs/ShopTalk/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 447, in connect
connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
File "/home/me/anaconda3/envs/ShopTalk/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 398, in connect_milvus
gh._wait_for_channel_ready(timeout=timeout)
File "/home/me/anaconda3/envs/ShopTalk/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 150, in _wait_for_channel_ready
raise MilvusException(
pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on localhost:19530, illegal connection params or server unavailable)>
>>>
I've tried to guarantee that 19530 is listening:
$ sudo ufw status
Status: active
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
19530/tcp ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
19530/tcp (v6) ALLOW Anywhere (v6)
But this doesn't seem to make a difference. I suppose there's something `networky' that I'm missing here, but I have no idea what it is. The only installation instructions I saw were 'pip install -U milvus', which I did. What am I not doing here?