question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When 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:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
myugancommented, Jan 20, 2020

Ok, thankyou @feliperuhland you can closed this issue.

0reactions
feliperuhlandcommented, Jan 20, 2020

Sure, but I can’t close the issue.

You can close it and open another one if you need anything else. 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found