400 Client Error
See original GitHub issueWhen i trying for docker connection using https it will show this error:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/docker/api/client.py", line 261, in _raise_for_status
response.raise_for_status()
File "/usr/lib/python3.8/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http://x.x.x.x:2376/v1.35/version
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "sciprt.py", line 93, in <module>
api_ver = client.version()["ApiVersion"]
File "/usr/lib/python3.8/site-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
File "/usr/lib/python3.8/site-packages/docker/api/client.py", line 267, in _result
self._raise_for_status(response)
File "/usr/lib/python3.8/site-packages/docker/api/client.py", line 263, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/usr/lib/python3.8/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 400 Client Error: Bad Request ("b'Client sent an HTTP request to an HTTPS server.'")
But, i got the response when hit the endpoint manually like https://x.x.x.x:2376/containers/json
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to Fix a 400 Bad Request Error (Causes and Fixes)
The 400 (Bad Request) status code indicates that the server cannot or will not process the request due to something that is perceived...
Read more >How to Fix a 400 Bad Request Error: 8 Easy Methods
The HTTP status 400 – bad request indicates that the request sent to the server is invalid or corrupted. Just like other 4xx...
Read more >400 Bad Request Error: What It Is and How to Fix It
The 400 Bad Request Error is an HTTP response status code indicating that the server was unable to process the request sent by...
Read more >What is HTTP error 400 and how do you fix it? - IT PRO
A 400 Bad Request error is usually a client-side error. A good case in point is a URL string syntax error. Incorrectly typed...
Read more >How to Fix the 400 Bad Request Error
The 400 Bad Request error is an HTTP status code that means that the request you sent to the website server, often something...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, thankyou @feliperuhland you can closed this issue.
Sure, but I can’t close the issue.
You can close it and open another one if you need anything else. 😃