AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Docker: [Errno 101] Network is unreachable (How to troubleshoot?)

Open Nantris opened this issue 2 years ago • 11 comments

I get this error:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ff674dd8340>: Failed to establish a new connection: [Errno 101] Network is unreachable'))

It hits max retries seemingly immediately and it says "Network is unreachable."

How can we debug the network connection within the Docker image?

Nantris avatar May 07 '23 21:05 Nantris

same issue, when i use docker proxy.

"proxies":{ "default": { "httpProxy": "http://127.0.0.1:7890", "httpsProxy": "https://127.0.0.1:7890", "noProxy":"localhost" } }

klsdjft avatar May 08 '23 03:05 klsdjft

Likely an issue with that proxy.

The "Errno 101" bit should clue you in. In Google Chrome this is the same error as ERR_CONNECTION_RESET https://www.ionos.com/digitalguide/hosting/technical-matters/err-connection-reset/

This error happens during the client-server handshake. Meaning that the client detected a good handshake, but the server didn't send any data whatsoever back to the client other than the "FIN" packet which closes the connection.

Which probably means that the proxy you listed does not work.

anonhostpi avatar May 08 '23 03:05 anonhostpi

@anonhostpi I'm a bit confused - am I supposed to be configuring some proxy settings that I overlooked in the setup? We don't list any proxy anywhere and it's not configured in Docker, but still we get the Errno 101. There's no firewall to blame either.

Nantris avatar May 08 '23 18:05 Nantris

@Slapbox recommend changing title, to make it a bit more likely to get docker support.

My recommendation: Docker: [Errno 101] Network is unreachable

I am not very familiar with how docker handles network connections

anonhostpi avatar May 10 '23 00:05 anonhostpi

Thanks so much again for all of your help @anonhostpi!

Nantris avatar May 10 '23 00:05 Nantris

Proxys are not well supported right now. Feel free to open a PR to add better proxy support.

ntindle avatar May 10 '23 05:05 ntindle

@ntindle but I'm not using a proxy - or at least I'm not intending to. Are you sure this is a proxy issue?

Nantris avatar May 10 '23 16:05 Nantris

Ah okay sorry, thought the second comment was yours

ntindle avatar May 10 '23 16:05 ntindle

@ntindle but I'm not using a proxy - or at least I'm not intending to. Are you sure this is a proxy issue?

Removing the proxy label

Also #1010 had the same problem. It was closed, because maintainers originally thought that it was a rate limit error. I think it might not be.

anonhostpi avatar May 11 '23 16:05 anonhostpi

I did get it to work without Docker. It may be some problem with the Docker image configuration or its network configuration. The redis machine seems to start but the autogpt machine seems not to.

Some more details on how that all works (or is supposed to work) would be valuable to someone trying to troubleshoot.

Nantris avatar May 11 '23 23:05 Nantris

I had a similar issue. I was using a ECR service (container) to deploy the code into AWS Lambda which is making call to openAI api. It was working only about 60% of the time. After multiple trials, what worked for me was moving the code to EC2. When I tested with 100 sequential requests, I got 100% success. The underlying reason could be because of network configuration of Lambda or the extra headers that are getting added for every request going from Lambda. Not sure about the exact reason, but it is a great relief that it is working consistently.

jpsmartbots avatar Jun 05 '23 15:06 jpsmartbots

This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days.

github-actions[bot] avatar Sep 06 '23 20:09 github-actions[bot]

This issue was closed automatically because it has been stale for 10 days with no activity.

github-actions[bot] avatar Sep 18 '23 01:09 github-actions[bot]