Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
MIT License
166.34k stars 44.03k forks source link

Failed to establish a new connection: [Errno 11001] getaddrinfo failed') #460

Closed BalajiSriraman closed 1 year ago

BalajiSriraman commented 1 year ago

Duplicates

Steps to reproduce 🕹

Traceback (most recent call last): File "C:\Python311\Lib\site-packages\urllib3\connection.py", line 174, in _new_conn conn = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\util\connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\socket.py", line 962, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno 11001] getaddrinfo failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "C:\Python311\Lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn conn.connect() File "C:\Python311\Lib\site-packages\urllib3\connection.py", line 363, in connect self.sock = conn = self._new_conn() ^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x000001AF91FD8210>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Balaji S\Desktop\Auto-GPT\scripts\main.py", line 288, in memory = PineconeMemory() ^^^^^^^^^^^^^^^^ File "C:\Users\Balaji S\Desktop\Auto-GPT\scripts\config.py", line 17, in call cls._instances[cls] = super( ^^^^^^ File "C:\Users\Balaji S\Desktop\Auto-GPT\scripts\memory.py", line 30, in init if table_name not in pinecone.list_indexes(): ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pinecone\manage.py", line 185, in list_indexes response = api_instance.list_indexes() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pinecone\core\client\api_client.py", line 776, in call return self.callable(self, *args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pinecone\core\client\api\index_operations_api.py", line 1132, in __list_indexes return self.call_with_http_info(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pinecone\core\client\api_client.py", line 838, in call_with_http_info return self.api_client.call_api( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\pinecone\core\client\api_client.py", line 413, in call_api return self.__call_api(resource ^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\urllib3\util\retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='controller.your-pinecone-region.pinecone.io', port=443): Max retries exceeded with url: /databases (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001AF91FD8210>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

Current behavior 😯

Application Failed to load

Expected behavior 🤔

THE PROGRAM SHOULD HAVE RUN

Your prompt 📝

python scripts/main.py

charlpcronje commented 1 year ago

I have the same issue, here are my output when I run the application:

Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib64/python3.8/socket.py", line 918, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f5ee96ed340>: Failed to establish a new connection: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "scripts/main.py", line 288, in memory = PineconeMemory() File "/home/cp/autoGPT/scripts/config.py", line 17, in call cls._instances[cls] = super( File "/home/cp/autoGPT/scripts/memory.py", line 30, in init if table_name not in pinecone.list_indexes(): File "/home/cp/.local/lib/python3.8/site-packages/pinecone/manage.py", line 185, in list_indexes response = api_instance.list_indexes() File "/home/cp/.local/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 776, in call return self.callable(self, *args, kwargs) File "/home/cp/.local/lib/python3.8/site-packages/pinecone/core/client/api/index_operations_api.py", line 1132, in __list_indexes return self.call_with_http_info(kwargs) File "/home/cp/.local/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 838, in call_with_http_info return self.api_client.call_api( File "/home/cp/.local/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 413, in call_api return self.__call_api(resource_path, method, File "/home/cp/.local/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 200, in __call_api response_data = self.request( File "/home/cp/.local/lib/python3.8/site-packages/pinecone/core/client/api_client.py", line 439, in request return self.rest_client.GET(url, File "/home/cp/.local/lib/python3.8/site-packages/pinecone/core/client/rest.py", line 236, in GET return self.request("GET", url, File "/home/cp/.local/lib/python3.8/site-packages/pinecone/core/client/rest.py", line 202, in request r = self.pool_manager.request(method, url, File "/usr/local/lib/python3.8/site-packages/urllib3/request.py", line 74, in request return self.request_encode_url( File "/usr/local/lib/python3.8/site-packages/urllib3/request.py", line 96, in request_encode_url return self.urlopen(method, url, extra_kw) File "/usr/local/lib/python3.8/site-packages/urllib3/poolmanager.py", line 376, in urlopen response = conn.urlopen(method, u.request_uri, kw) File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 815, in urlopen return self.urlopen( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 815, in urlopen return self.urlopen( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 815, in urlopen return self.urlopen( File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/usr/local/lib/python3.8/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='controller.your-pinecone-region.pinecone.io', port=443): Max retries exceeded with url: /databases (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f5ee96ed340>: Failed to establish a new connection: [Errno -2] Name or service not known'))

fastbone commented 1 year ago

+1

RajatavaMahajan commented 1 year ago

Thats also my issue

hemcharan22 commented 1 year ago

same issue here

hemcharan22 commented 1 year ago

found the error: you might have too many pods on Pinecone delete all the data in your Pinecone and execute it or check if you have the Pinecone API key in your .env file

fastbone commented 1 year ago

It is pinecone!

Make sure you have a pinecone API Key in the .env file. Also make sure you are within the limits of your pinecone plan, and you have at least one active index.

TheZaind commented 1 year ago

Same problem! Tried everything but the problem is still there.

barbsblc commented 1 year ago

Same problem here... What is the limit of the free Pinecone plan? The first thing I tried to do already generated this error...

barbsblc commented 1 year ago

I found a solution! Although I'm having a different problem now lol

I changed the .env file on Visual Studio Code and put all the API keys and everything, but I didn't save the changes. You need to close the .env tab and save the changes. That's why it was having problems with the Pinecone key, I guess. Check if you've done this correctly. Now I'm having another problem...

Update: the new problem was fixed by leaving almost all spaces of API keys blank (except for the pinecone, openai, and some other that have information provided by them, like the azure = false and image = dalle). Then, there was a new problem with openai API usage limit which was fixed by putting a credit card on the account and setting a limit for monthly usage. Now, it's running (very slowly but it is). And I can see the openai API is being used already!

Qoyyuum commented 1 year ago

Just need the Pinecone API Key and region setup on .env file properly and it will connect. The latest stable release has these fixed. Closing issue.