-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
error 54, 'Connection reset by peer' #3189
Comments
Can you confirm for me what the output of these two commands is on your OS X machine?
|
So... obviously that's an issue there. But this looks even worse...
|
Alright! Good, we're getting somewhere. So, the |
I'm 99% sure I went with the OSX baked in python last time I rebuilt my dev environment. When I'm not in a virtualenv, which python points to '/usr/bin/python' and that file is not a symlink to the Cellar directory. |
Ok, so that there is going to be the issue. The system Python uses the ancient OpenSSL that OS X ships. I'd like to tag @reaperhulk in here to try to understand why PyOpenSSL isn't correctly installed, because that should have resolved the problem. |
I went ahead and installed a new version of python using homebrew (using brewed OpenSSL) and that fixed it for me. |
@degroat Yup, that'll do it too. =) |
I met the same issue. Is there a solution to solve this without upgrade python? |
@goalong It's possible, but it depends on the specifics of your situation. In this instance, all we know is that the server you're connecting to doesn't like your TLS handshake. That can happen for lots of reasons, but without specifics it's hard to know what would fix the problem. |
For the sake of others like me coming to this issue by googling this exception: I resolved this issue for myself by updating my system |
while researching online another solution was |
@Bashar That specific list is now out of date. You should make sure you use |
Hey guys, I've tried the solution given above but still I'm facing the same issue. Could you please help. TIA |
Tried pip install pyopenssl ndg-httpsclient pyasn1 and also installed requests but still no result |
Ignore my post mates. I had multiple version of pythons in my machine due to which it wasn't able to pick the right one and was throwing error. Posting this thinking it may be helpful for someone. |
Was facing the same issue: python ConnectionError: ('Connection aborted.', error(54, 'Connection reset by peer'))
|
I'm getting the dreaded Error 54, Connection reset by peer when trying to do a POST to a URL with a payment provider I'm using. Here is the basic code I'm running:
If I run this exact code on an Ubuntu server it works fine (meaning it returns a json message stating that the username and password are incorrect).
If I run it on OSX 10.11.4, I get the connection reset error.
After reading a ton of issues on here and various postings on StackOverflow, everyone seems to think it's related to SNI. Unfortunately, none of the recommendations that I've come across have fixed the issue.
My Ubuntu server has Python 2.7.6, OpenSSL 1.0.1f and requests 2.8.1.
My OSX has Python 2.7.10, OpenSSL 1.0.2g and requests 2.10.0. I also have ndg-httpsclient and pyopenssl both installed per #1347
Any idea what it is that I'm missing?
The text was updated successfully, but these errors were encountered: