TypeError: ('__init__() takes exactly 2 arguments (3 given)', <class 'paramiko.ssh_exception.NoValidConnectionsError'>, (None, 'Unable to connect to port 22 on or 10.20.30.40')) #1429

Closed
mgedmin opened this Issue Feb 4, 2016 · 3 comments

Projects

None yet

2 participants

@mgedmin
mgedmin commented Feb 4, 2016

Ran fab all -P update upgrade:yes which in my fabfile means "run apt-get update && apt-get upgrade -y on all servers". This used to work fine. This time I saw

Traceback (most recent call last):
  File "/home/mg/.venv/local/lib/python2.7/site-packages/fabric/main.py", line 743, in main
    *args, **kwargs
  File "/home/mg/.venv/local/lib/python2.7/site-packages/fabric/tasks.py", line 412, in execute
    ran_jobs = jobs.run()
  File "/home/mg/.venv/local/lib/python2.7/site-packages/fabric/job_queue.py", line 168, in run
    self._fill_results(results)
  File "/home/mg/.venv/local/lib/python2.7/site-packages/fabric/job_queue.py", line 191, in _fill_results
    datum = self._comms_queue.get_nowait()
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 152, in get_nowait
    return self.get(False)
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 135, in get
    res = self._recv()
TypeError: ('__init__() takes exactly 2 arguments (3 given)', <class 'paramiko.ssh_exception.NoValidConnectionsError'>, (None, 'Unable to connect to port 22 on  or 10.20.30.40'))

in the middle -- the commands worked fine for all other hosts.

(I've replaced the real IP address with 10.20.30.40.)

$ fab --version
Fabric 1.10.2
Paramiko 1.16.0
@mgedmin
mgedmin commented Feb 4, 2016

FWIW the connection failure is real -- 10.20.30.40 is not accessible over SSH (OpenSSH fails with "No route to host").

@mgedmin
mgedmin commented Feb 4, 2016

Looks like the bug is in paramiko, specifically paramiko/paramiko#617.

@mgedmin mgedmin referenced this issue in paramiko/paramiko Feb 4, 2016
Closed

Make NoValidConnectionsError picklable correctly #679

@kaaveland

We can probably close the fabric issue here and rely on this getting fixed in paramiko.

@mgedmin mgedmin closed this Feb 5, 2016
@bitprophet bitprophet added a commit to paramiko/paramiko that referenced this issue Apr 24, 2016
@bitprophet bitprophet Changelog re #617, #679, #678, #685.
Also re fabric/fabric#1429 but IDK if Github will tickle that repo correctly :D
e2206bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment