[Bug]: Trouble setting up the service P2
ElioErrico opened this issue · 2 comments
ElioErrico commented
Current Behavior
This is the procedure I followed:
- I have set the environment variable OPENAI_API_KEY
- I created an account on Zilliz and set up a standard cluster using the free trial. in order to have URI and user and password
- I tryied the connection of the Zilliz account using the following script and seems to be connected, then I setted the enviroment variables
import os
from pymilvus import connections, utility
connections.connect(uri=os.getenv('MILVUS_URI', 'https://the_link_given:19530'), user=os.getenv('MILVUS_USER', 'db_admin'), password=os.getenv('MILVUS_PASSWORD', 'tmy_password'), secure=True)
print(utility.list_collections())
- I installed postgresql and setted a std database named chathistory and checked the connection to the database with the code below and it was working. Then setted the enviroment variable
import psycopg2
import os
connect_str = os.getenv('SQL_URI', 'postgresql://postgres:My_password@localhost/chathistory')
try:
conn = psycopg2.connect(connect_str)
print("its working!")
except Exception as e:
print(f"not working: {e}")
- Then I tryied to run the code using:
py main.py --towhee
I've seen that there's a similar problem that has already been solved #43
so I tryied both Zilliztech/akcio and Jaelgu/akcio but i have exactly the same error.
Any advice how to fix it?
The error shown is:
Traceback (most recent call last):
File "C:\Users\erric\Desktop\Corso python\Notizie internazionale 2\internazionale\Lib\site-packages\pymilvus\client\grpc_handler.py", line 131, in _wait_for_channel_ready
grpc.channel_ready_future(self._channel).result(timeout=timeout)
File "C:\Users\erric\Desktop\Corso python\Notizie internazionale 2\internazionale\Lib\site-packages\grpc\_utilities.py", line 151, in result
self._block(timeout)
File "C:\Users\erric\Desktop\Corso python\Notizie internazionale 2\internazionale\Lib\site-packages\grpc\_utilities.py", line 97, in _block
raise grpc.FutureTimeoutError()
grpc.FutureTimeoutError
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\erric\Desktop\Corso python\Notizie internazionale 2\03 - Secondo Tentativo Akcio\akcio-main\main.py", line 40, in <module>
from src_towhee.operations import chat, insert, drop, check, get_history, clear_history, count # pylint: disable=C0413
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\erric\Desktop\Corso python\Notizie internazionale 2\03 - Secondo Tentativo Akcio\akcio-main\src_towhee\operations.py", line 14, in <module>
towhee_pipelines = TowheePipelines()
^^^^^^^^^^^^^^^^^
File "C:\Users\erric\Desktop\Corso python\Notizie internazionale 2\03 - Secondo Tentativo Akcio\akcio-main\src_towhee\pipelines\__init__.py", line 58, in __init__
connections.connect(
File "C:\Users\erric\Desktop\Corso python\Notizie internazionale 2\internazionale\Lib\site-packages\pymilvus\orm\connections.py", line 355, in connect
connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name)
File "C:\Users\erric\Desktop\Corso python\Notizie internazionale 2\internazionale\Lib\site-packages\pymilvus\orm\connections.py", line 302, in connect_milvus
gh._wait_for_channel_ready(timeout=timeout)
File "C:\Users\erric\Desktop\Corso python\Notizie internazionale 2\internazionale\Lib\site-packages\pymilvus\client\grpc_handler.py", line 134, in _wait_for_channel_ready
raise MilvusException(
pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on in01-54ec8f16cac25a2.aws-us-west-2.vectordb.zillizcloud.com:19530. Timeout)>
Expected Behavior
No response
Steps To Reproduce
No response
Environment
No response
Anything else?
No response
jaelgu commented
@ElioErrico Have you tried to export MILVUS_URI, MILVUS_USER, MILVUS_PASSWORD, MILVUS_SECURE with your connection values?
ElioErrico commented
Thanks:
- I didn't setted the enviroment variable MILVUS_SECURE on True (Now I did IT)
- Than I had to launch visual studio as administrator
- Than I could connect to http://127.0.0.1:8900/docs
Is working!