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

Connection to openaipublic.blob.core.windows.net timed out and I cannot figure it out #3341

Closed
1 task done
CaixetaValim opened this issue Apr 26, 2023 · 12 comments
Closed
1 task done

Comments

@CaixetaValim
Copy link

⚠️ Search for existing issues first ⚠️

  • I have searched the existing issues, and there is no existing issue for my problem

Which Operating System are you using?

Docker

Which version of Auto-GPT are you using?

Stable (branch)

GPT-3 or GPT-4?

GPT-3.5

Steps to reproduce 🕹

I have configured AutoGPT within a Docker container just as explained in the Installation material.
After I enter the requested info, I am getting a Connection timeout error

Describe your AI's role: A short book with the story of two simblings (boy and a girl) that invented Hatabana, a gadget that helps children talk to animals
Enter up to 5 goals for your AI:
Goal 1: Must be a child book
Goal 2: Short sentences
Goal 3: The book should be divided into 5 chapters
Goal 4: Easy to read language
Goal 5: Enphasize their freedom to take risks
Using memory of type:  LocalCache
Using Browser:  chrome
  Token limit: 4000
  Memory Stats: (0, (0, 1536))

This is the info I wrote to AutoGPT

Current behavior 😯

I reaches a connection timeout error

Expected behavior 🤔

I was expecting that the AI kept thinking and loading information required for my task

Your prompt 📝

# Paste your prompt here
sudo docker-compose run --rm auto-gpt --gpt3only --continuous --debug

Your Logs 📒

<insert your logs here>
Traceback (most recent call last):
  File "/home/appuser/.local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/home/appuser/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/home/appuser/.local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/appuser/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/home/appuser/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/home/appuser/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/home/appuser/.local/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect
    self.sock = conn = self._new_conn()
  File "/home/appuser/.local/lib/python3.10/site-packages/urllib3/connection.py", line 179, in _new_conn
    raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x7f3692cc6770>, 'Connection to openaipublic.blob.core.windows.net timed out. (connect timeout=None)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/appuser/.local/lib/python3.10/site-packages/requests/adapters.py", line 487, in send
    resp = conn.urlopen(
  File "/home/appuser/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/home/appuser/.local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f3692cc6770>, 'Connection to openaipublic.blob.core.windows.net timed out. (connect timeout=None)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/appuser/autogpt/__main__.py", line 5, in <module>
    autogpt.cli.main()
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/appuser/.local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/appuser/autogpt/cli.py", line 151, in main
    agent.start_interaction_loop()
  File "/home/appuser/autogpt/agent/agent.py", line 75, in start_interaction_loop
    assistant_reply = chat_with_ai(
  File "/home/appuser/autogpt/chat.py", line 95, in chat_with_ai
    ) = generate_context(prompt, relevant_memory, full_message_history, model)
  File "/home/appuser/autogpt/chat.py", line 43, in generate_context
    current_tokens_used = token_counter.count_message_tokens(current_context, model)
  File "/home/appuser/autogpt/token_counter.py", line 25, in count_message_tokens
    encoding = tiktoken.encoding_for_model(model)
  File "/home/appuser/.local/lib/python3.10/site-packages/tiktoken/model.py", line 75, in encoding_for_model
    return get_encoding(encoding_name)
  File "/home/appuser/.local/lib/python3.10/site-packages/tiktoken/registry.py", line 63, in get_encoding
    enc = Encoding(**constructor())
  File "/home/appuser/.local/lib/python3.10/site-packages/tiktoken_ext/openai_public.py", line 64, in cl100k_base
    mergeable_ranks = load_tiktoken_bpe(
  File "/home/appuser/.local/lib/python3.10/site-packages/tiktoken/load.py", line 114, in load_tiktoken_bpe
    contents = read_file_cached(tiktoken_bpe_file)
  File "/home/appuser/.local/lib/python3.10/site-packages/tiktoken/load.py", line 46, in read_file_cached
    contents = read_file(blobpath)
  File "/home/appuser/.local/lib/python3.10/site-packages/tiktoken/load.py", line 24, in read_file
    return requests.get(blobpath).content
  File "/home/appuser/.local/lib/python3.10/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/home/appuser/.local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/appuser/.local/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/appuser/.local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/home/appuser/.local/lib/python3.10/site-packages/requests/adapters.py", line 508, in send
    raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f3692cc6770>, 'Connection to openaipublic.blob.core.windows.net timed out. (connect timeout=None)'))
ERROR: 1
@CaixetaValim
Copy link
Author

I need to add that I am not behind any proxy and I am running in Ubuntu 22.04
Python 3.10.6
docker-compose version 1.29.2, build unknown (with this warning: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography (40.0) will be the last to support Python 3.6.)

@CaixetaValim
Copy link
Author

I don'k now why.. but after rebooting it started working.

@Nantris
Copy link

Nantris commented May 7, 2023

Didn't fix it for me unfortunately. Related #3977

@anonhostpi
Copy link

see #3977 (comment)

@niuhuluzhihao
Copy link

same error.How can i solve it

@CaixetaValim
Copy link
Author

@summer-silence I had to delete the full folder and start over. I could not tell what was wrong. But after that, it worked ok

@niuhuluzhihao
Copy link

niuhuluzhihao commented Jul 19, 2023

@CaixetaValim But I am in China. Will this affect me ?

@CaixetaValim
Copy link
Author

I makes no difference where you are at. All you need to do is to create a new folder with a new AutoGPT and try again

@niuhuluzhihao
Copy link

niuhuluzhihao commented Jul 20, 2023

@CaixetaValim OK,Thank you . I will try it.

@greywolf0324
Copy link

@CaixetaValim , I've tried and it worked successfully.
But, did you find exact reason why it is working?
thanks

@CaixetaValim
Copy link
Author

@CaixetaValim , I've tried and it worked successfully. But, did you find exact reason why it is working? thanks

Nope, never found out what whas the problem. Maybe any apt updates that was done or even new builds might have corrected the issue.

@ParetoOptimalDev
Copy link

It's because you downloaded the vocab files needed and that bypassed the branch that hits that host. See openai/whisper#1399 (comment).

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

6 participants