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

requests don't work well:Failed to establish a new connection: [Errno -2] Name or service not known' #90

Open
aliasxiao opened this issue Sep 24, 2024 · 1 comment

Comments

@aliasxiao
Copy link

aliasxiao commented Sep 24, 2024

I have deployed the service on a docker container and tested some simple python code for run service, but when requests used, the service not worked well. Below is the request body
data = { "language": "python3", "code": '''import requests resp = requests.get("http://www.baidu.com") ''' }
And this is part response content
requests.exceptions.ConnectionError: HTTPConnectionPool(host='www.baidu.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('\u003curllib3.connection.HTTPConnection object at 0x7f65e8690450\u003e: Failed to establish a new connection: [Errno -2] Name or service not known'))\nerror: exit status 255\n
Firstly, I think DNS not work well. Maybe something wrong happened in my work.
Also I tested cmd/test/permission/main.go, it seemed have some problem. Can you give me some idea, Thank you very much!

@rickythink
Copy link

+1

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

2 participants