{"action":"created","issue":{"url":"https://api.github.com/repos/fabric/fabric/issues/1255","labels_url":"https://api.github.com/repos/fabric/fabric/issues/1255/labels{/name}","comments_url":"https://api.github.com/repos/fabric/fabric/issues/1255/comments","events_url":"https://api.github.com/repos/fabric/fabric/issues/1255/events","html_url":"https://github.com/fabric/fabric/issues/1255","id":54410159,"number":1255,"title":"paramiko error when attempting to make two connections in one command","user":{"login":"sumdog","id":156601,"avatar_url":"https://avatars.githubusercontent.com/u/156601?v=3","gravatar_id":"","url":"https://api.github.com/users/sumdog","html_url":"https://github.com/sumdog","followers_url":"https://api.github.com/users/sumdog/followers","following_url":"https://api.github.com/users/sumdog/following{/other_user}","gists_url":"https://api.github.com/users/sumdog/gists{/gist_id}","starred_url":"https://api.github.com/users/sumdog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sumdog/subscriptions","organizations_url":"https://api.github.com/users/sumdog/orgs","repos_url":"https://api.github.com/users/sumdog/repos","events_url":"https://api.github.com/users/sumdog/events{/privacy}","received_events_url":"https://api.github.com/users/sumdog/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-15T04:00:10Z","updated_at":"2015-12-02T19:43:49Z","closed_at":null,"body":"I'm trying to write a fabric task that will download some of our packages from our debain repo and put them on out client's server. I'm using the following:\r\n\r\n```\r\n@task\r\ndef publish_to_client(version):\r\n\r\n    home = os.path.expanduser('~')\r\n    keyfile = os.path.join(home, '.ssh', ACT_SFTP_KEY_FILE)\r\n\r\n    if not os.path.isfile(keyfile):\r\n        print(red('Please install SFTP key from turing/pview into {}'.format(keyfile)))\r\n    else:\r\n        print(green('Using SFTP Key {}'.format(keyfile)))\r\n\r\n        downloads = []\r\n        with lcd('/tmp'):\r\n            for p in ['', '-application', '-doc', '-static']:\r\n                deb = 'act{}_{}_all.deb'.format(p, version)\r\n                with settings(host_string=REPOSITORY_SERVER):\r\n                    downloads = downloads + get(os.path.join('/opt/repositories/misc/dists/moe/act/production/binary-all', deb))\r\n                disconnect_all()\r\n            with settings(host_string=ACT_SFTP_SERVER, user='atlist', key_filename=keyfile):\r\n                for d in downloads:\r\n                    put(d)\r\n                    os.unlink(d)\r\n```\r\n\r\nIf I make two septate tasks using the same `with setttings()`, I can preform the upload. \r\nand I get the following error:\r\n\r\n```\r\nNo handlers could be found for logger \"paramiko.transport\"\r\nTraceback (most recent call last):\r\n  File \"/usr/lib64/python2.7/site-packages/fabric/main.py\", line 743, in main\r\n    *args, **kwargs\r\n  File \"/usr/lib64/python2.7/site-packages/fabric/tasks.py\", line 419, in execute\r\n    results['<local-only>'] = task.run(*args, **new_kwargs)\r\n  File \"/usr/lib64/python2.7/site-packages/fabric/tasks.py\", line 174, in run\r\n    return self.wrapped(*args, **kwargs)\r\n  File \"/home/sumit/pactspace/pact/fabfile.py\", line 114, in publish_to_ministry\r\n    put(d)\r\n  File \"/usr/lib64/python2.7/site-packages/fabric/network.py\", line 647, in host_prompting_wrapper\r\n    return func(*args, **kwargs)\r\n  File \"/usr/lib64/python2.7/site-packages/fabric/operations.py\", line 346, in put\r\n    ftp = SFTP(env.host_string)\r\n  File \"/usr/lib64/python2.7/site-packages/fabric/sftp.py\", line 30, in __init__\r\n    self.ftp = connections[host_string].open_sftp()\r\n  File \"/usr/lib64/python2.7/site-packages/paramiko/client.py\", line 345, in open_sftp\r\n    return self._transport.open_sftp_client()\r\n  File \"/usr/lib64/python2.7/site-packages/paramiko/transport.py\", line 719, in open_sftp_client\r\n    return SFTPClient.from_transport(self)\r\n  File \"/usr/lib64/python2.7/site-packages/paramiko/sftp_client.py\", line 110, in from_transport\r\n    chan = t.open_session()\r\n  File \"/usr/lib64/python2.7/site-packages/paramiko/transport.py\", line 543, in open_session\r\n    return self.open_channel('session')\r\n  File \"/usr/lib64/python2.7/site-packages/paramiko/transport.py\", line 640, in open_channel\r\n    raise e\r\nparamiko.ssh_exception.SSHException: Invalid packet blocking\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/fabric/fabric/issues/comments/161411267","html_url":"https://github.com/fabric/fabric/issues/1255#issuecomment-161411267","issue_url":"https://api.github.com/repos/fabric/fabric/issues/1255","id":161411267,"user":{"login":"kaaveland","id":27794,"avatar_url":"https://avatars.githubusercontent.com/u/27794?v=3","gravatar_id":"","url":"https://api.github.com/users/kaaveland","html_url":"https://github.com/kaaveland","followers_url":"https://api.github.com/users/kaaveland/followers","following_url":"https://api.github.com/users/kaaveland/following{/other_user}","gists_url":"https://api.github.com/users/kaaveland/gists{/gist_id}","starred_url":"https://api.github.com/users/kaaveland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaaveland/subscriptions","organizations_url":"https://api.github.com/users/kaaveland/orgs","repos_url":"https://api.github.com/users/kaaveland/repos","events_url":"https://api.github.com/users/kaaveland/events{/privacy}","received_events_url":"https://api.github.com/users/kaaveland/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T19:43:49Z","updated_at":"2015-12-02T19:43:49Z","body":"Tried several older pairs of fabric / paramiko, can't reproduce this."}}