-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Paramiko fails to connect due to greenlet error 'This operation would block forever' #633
Comments
Hey, To me, this looks like the socket module was monkey-patched to use gevent. I'm not very familiar to gevent, but I imagine this could happen if the the socket module was monkey-patched to use gevent but other modules that paramiko use (such as threading) were not. Maybe you could try to add the following to the top of your file: from gevent import monkey
monkey.patch_all() And see if you still have the same problem? |
That resolved it. Thanks. |
Beautiful answer, helped me a lot ... |
OMG, I wasted so much time seeking for a solution... Thank you very-very much!!! |
Thanks a lot for this solution!!! It helped a lot!! |
Trying to create an ssh connection like so:
And I get the following exception:
Installed
paramiko
from source locally and modifiedtransport.py
like so:And got this stack as the cause of the error:
User jamadden commented at gevent:
At this point it's so far down the stack I'm a bit out of depth as to how to diagnose this. I am using
grequests
in my app to make several HTTP requests as well, so I imagine that could potentially have side effects related to this issue.Any ideas anyone?
The text was updated successfully, but these errors were encountered: