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
EOF occurred in violation of protocol error #74
Comments
I ran into this while I was at COS, actually :). It's a problem with the
installation of SSL on your mac, if I recall correctly. My solution
(probably not the most parsimonious) was to upgrade openssl using
homebrew. I will google about a bit and see if I can find something simpler.
|
duh, I think I remember this old frustrater now, I'll piddle around w upgrading ssl but that's going to be an awkward fix to bake in to the osf-cli requirements for end-users so we may want another way around it? and in meantime I'll try it from a different terminal too. |
you might try installing and using python3.6 --
but in any case all we can do is document the brokenness :). I don't think
we want OSF to be using bad crypto, of course.
|
okay I'm still on 2.7.13, I'll give that a go first! thx! |
I'm on python 3.6 now, and I got a similar error as above. Here's what I saw while recursively uploading a directory:
And a few more similar errors showed up "during handling of the above exception". The error message didn't say what file it had an issue with, so I don't know how far the upload got before failing... |
Also a Mac @benlindsay? Could you post the version of your OS. On my 10.11.16 (El capitan) it seems to work, at least I can't reproduce this. Another thing I can think of is: did you install openssl via |
A few results from googling:
They point to the TLS handshake not working. Either because the server is doing weird things or a proxy :-/ |
I'm on a campus research cluster with a lot of out-of-date software where I don't have root access. The result of
|
Let's collect a bit more data till we can figure out what the pattern is. If we figure out how to solve this -> solve it. Otherwise probably a good idea to catch this exception and print a useful message (once we know what that message should be) |
I've investigated it a few times, for myself and others. It appears to be
caused by an outdated version of openssl.
|
I have openssl 1.0.2l on my mac, who can offer an earlier one that works? Proposed error message: "Please update your version of openssl to at least version X" |
I also have openssl 1.0.21 on my linux machine, so I don't think it's simply an openssl version issue. I'd guess that it has something to do with other old software that I don't have downloaded via Anaconda. My python modules are up-to-date. |
@nkmeyers I fixed this issue by running:
On OSX, the issue is related to python using the system OpenSSL which happens to be an outdated version. Several people have faced this issue and there are a few things to try as listed on psf/requests#3006. In most cases, the above should solve the issue. Here is another thread related to a similar issue: psf/requests#3391. |
Ran into this again, |
Not able to resolve with above solutions
|
As @theoutlander and @ctb 'pip install pyopenssl' did the trick for me as well. I had to make 30.000 requests asap., but I couldn't avoid being cut for by or the other SSL- or other connection error exception. If I was lucky the app ran 5 min without throwing an exception, and being cut off. After installing pyopenssl I've been starring like a happy child at console outputs :) Environment is Python 3.5.2, and I'm using the requests library. |
I installed osf-cli have .osfcli.config with this content:
[osf]
username = natalie.meyers@nd.edu
project = d3jx7
why do I get EOF occurred in violation of protocol (_ssl.c:661) error when I try command:
osf -p d3jx7 list
and enter my osf password at the prompt as shown below?
LIB-2176:osf-cli nmunn$ osf -p d3jx7 list
Please input your password:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/osf", line 11, in
load_entry_point('osfclient', 'console_scripts', 'osf')()
File "/Users/nmunn/osf-cli/osfclient/main.py", line 97, in main
exit_code = args.func(args)
File "/Users/nmunn/osf-cli/osfclient/cli.py", line 182, in list_
project = osf.project(args.project)
File "/Users/nmunn/osf-cli/osfclient/api.py", line 24, in project
return Project(self._json(self._get(url), 200), self.session)
File "/Users/nmunn/osf-cli/osfclient/models/core.py", line 23, in _get
return self.session.get(url, *args, **kwargs)
File "/Users/nmunn/osf-cli/osfclient/models/session.py", line 43, in get
response = super(OSFSession, self).get(url, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 515, in get
return self.request('GET', url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 502, in request
resp = self.send(prep, **send_kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 612, in send
r = adapter.send(request, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: EOF occurred in violation of protocol (_ssl.c:661)
LIB-2176:osf-cli nmunn$
The text was updated successfully, but these errors were encountered: