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

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

Closed
Nantris opened this issue May 7, 2023 · 14 comments
Closed

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

Nantris opened this issue May 7, 2023 · 14 comments

Comments

@Nantris
Copy link

Nantris commented May 7, 2023

Support note

For others facing this issue:

Thanks, @lc0rp

=== Orig Report ===

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?

@klsdjft
Copy link

klsdjft commented May 8, 2023

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"
}
}

@anonhostpi
Copy link

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.

@Nantris
Copy link
Author

Nantris commented May 8, 2023

@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.

@anonhostpi
Copy link

@Slapbox's Error Log
@Slapbox's .env

@anonhostpi
Copy link

anonhostpi commented May 10, 2023

@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

@Nantris Nantris changed the title How to troubleshoot connection errors? Docker: [Errno 101] Network is unreachable (How to troubleshoot?) May 10, 2023
@Nantris
Copy link
Author

Nantris commented May 10, 2023

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

@ntindle
Copy link
Member

ntindle commented May 10, 2023

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

@ntindle ntindle closed this as completed May 10, 2023
@Nantris
Copy link
Author

Nantris commented May 10, 2023

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

@ntindle
Copy link
Member

ntindle commented May 10, 2023

Ah okay sorry, thought the second comment was yours

@anonhostpi
Copy link

anonhostpi commented May 11, 2023

@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.

@Nantris
Copy link
Author

Nantris commented May 11, 2023

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.

@jpsmartbots
Copy link

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.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

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 github-actions bot added the Stale label Sep 6, 2023
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants