-
Notifications
You must be signed in to change notification settings - Fork 134
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
Debugging pylxd.exceptions.ClientConnectionFailed? #317
Comments
It could probably do with a better error message, but I'm pretty sure you have to use |
I receive a valid response with wget (
|
Did you try in pylxd with |
Sorry. Yes, I did:
Capture: pylxd_https.pcap.zip |
Okay, let's eliminate pylxd from the party for a moment. If you add the The syntax is:
e.g. And then see if you can do things with it: Also, which versions of |
That works.
Versions:
|
Okay, that's good. So, that certificate that got generated is at You should now be able to connect in pylxd by just doing: client = Client(endpoint='http://192.168.123.121:8443') The problem, I suspect, is that the original lxd.key / lxd.crt weren't being found. So if the above does work then we probably need some checks in pylxd about finding certs, etc. as the code in question doesn't seem to do that sanity check. |
Same issue, I checked both with http and https:
I tried using absolute path, same result:
|
Oh, that's a bit odd. Okay, let's dig a bit deeper. If you do: import logging
logging.basicConfig(level=logging.DEBUG) before you do the client connect, we might get some more useful debugging information. |
The only additional info is that urllib3 starts the https connection:
|
I can see this message in syslog: Strange because I was using the cert generated by |
Okay, how good are you with Python? Because the only thing I can suggest now, is to go into |
Ah, re: the remote error issue. Sorry, if you add |
That indeed helped, it works now. Thanks a lot! |
@adosztal excellent! yes, we definitely need to beef up the documentation around how this works, so please do feel free to submit a PR. For example you can pass the ca bundle (as a string) to the verify parameter, but that's only documented on the docstring. It would be good to have some examples/gotchas around this area. For a very long time, pylxd was only used with the unix socket, so some of this isn't as well tested in the real world. |
Hi, we are randomly getting Terminated websocket exception when trying to do several |
@vanushwashere can you please provide details of versions of pylxd, lxd and OS? Thanks. |
Also I'm getting |
OS: Ubuntu Server 16.04 Also I found this issue over the internet: |
@vanushwashere could you re-try with master branch please? There's been a few commits in that area and it might have been fixed. |
@ajkavanagh I did that, no problems so far 👍 |
@vanushwashere I'm kind of waiting on a few PRs to land; just trying to get their tests squared away. However, due to the time its unfortunately taking, I'm thinking of releasing next week as this issue is obviously causing issues. |
That'll be great 😎 |
I'm closing this as a new version has been released and I think it solves the error. Please could you comment if it hasn't and I'll re-open the issue. Thanks. |
I am having the exact same issue as was originally stated in this thread: |
Hi @Commander-Firestrike , we disabled warnings like this import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
I'm trying to connect to an LXD cluster using the steps from this guide but I get a pylxd.exceptions.ClientConnectionFailed error:
The hosts are on the same subnet (.120 is my host, .121 is the LXD cluster member), ping works, port 8443 is open, the cert files are in place, I can get an answer back with wget:
The saved file contains "1503 0100 0202 0a" in hex. I did a capture too: pylxd.pcap.zip
Versions:
Is it something with pylxd or the LXD cluster? Is there a way I could get a detailed error message, not just the exception?
The text was updated successfully, but these errors were encountered: