Skip to content
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

parallel error not caught properly #986

Closed
karlp opened this issue Sep 18, 2013 · 1 comment
Closed

parallel error not caught properly #986

karlp opened this issue Sep 18, 2013 · 1 comment

Comments

@karlp
Copy link

karlp commented Sep 18, 2013

I had a bad host key setup, and the "NetworkError: Host key for 192.168.5.201 did not match pre-existing key! Server's key was changed recently, or possible man-in-the-middle attack." was raised properly, but then not caught before it was used as the parameters to init, it shouldn't have gotten that far.

fab 1.7.0

!!! Parallel execution exception under host '192.168.5.201':
Process 192.168.5.201:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/tasks.py", line 233, in inner
    submit(task.run(*args, **kwargs))
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/tasks.py", line 171, in run
    return self.wrapped(*args, **kwargs)
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/decorators.py", line 181, in inner
    return func(*args, **kwargs)
  File "/home/karlp/src/mqtt-scalbility/fabfile.py", line 55, in publish
    everybody()
  File "/home/karlp/src/mqtt-scalbility/fabfile.py", line 49, in everybody
    "python-virtualenv"
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabtools/require/deb.py", line 134, in packages
    pkg_list = [pkg for pkg in pkg_list if not is_installed(pkg)]
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabtools/deb.py", line 44, in is_installed
    res = run("dpkg -s %(pkg_name)s" % locals())
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/network.py", line 578, in host_prompting_wrapper
    return func(*args, **kwargs)
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/operations.py", line 1042, in run
    shell_escape=shell_escape)
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/operations.py", line 909, in _run_command
    channel=default_channel(), command=wrapped_command, pty=pty,
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/state.py", line 387, in default_channel
    chan = _open_session()
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/state.py", line 379, in _open_session
    return connections[env.host_string].get_transport().open_session()
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/network.py", line 118, in __getitem__
    self.connect(key)
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/network.py", line 110, in connect
    self[key] = connect(user, host, port, sock)
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/network.py", line 405, in connect
    raise NetworkError("Host key for %s did not match pre-existing key! Server's key was changed recently, or possible man-in-the-middle attack." % host, e)
NetworkError: Host key for 192.168.5.201 did not match pre-existing key! Server's key was changed recently, or possible man-in-the-middle attack.
Traceback (most recent call last):
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/main.py", line 743, in main
    *args, **kwargs
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/tasks.py", line 393, in execute
    ran_jobs = jobs.run()
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/job_queue.py", line 167, in run
    self._fill_results(results)
  File "/home/karlp/src/mqtt-scalbility/.env/lib/python2.7/site-packages/fabric/job_queue.py", line 189, in _fill_results
    datum = self._comms_queue.get_nowait()
  File "/usr/lib64/python2.7/multiprocessing/queues.py", line 152, in get_nowait
    return self.get(False)
  File "/usr/lib64/python2.7/multiprocessing/queues.py", line 135, in get
    res = self._recv()
TypeError: ('__init__() takes exactly 4 arguments (2 given)', <class 'paramiko.BadHostKeyException'>, ('Host key for server 192.168.5.201 does not match!',))
@bitprophet
Copy link
Member

See the related #714 which has other info in comments as well. We may just close this one as a duplicate later.

xarg pushed a commit to xarg/paramiko that referenced this issue Apr 16, 2014
bitprophet added a commit to paramiko/paramiko that referenced this issue Apr 16, 2014
dkhapun pushed a commit to cyberx-labs/paramiko that referenced this issue Jun 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants