Connecting to remote docker container using plumbum.SshMachine

82 views
Skip to first unread message

M S Vishwanath Bhat

unread,
Oct 12, 2015, 11:06:08 AM10/12/15
to rpyc
Hi,

I have a docker setup with etcd/flannel. So each of the docker containers have an IP with which I can ssh to the container from within the cluster.

Now when I try to connect to the docker container using plumbum.SshMachine(), I get below traceback

>>> rem = SshMachine("10.0.11.3")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/plumbum/machines/ssh_machine.py", line 106, in __init__
    new_session = new_session)
  File "/usr/lib/python2.7/site-packages/plumbum/machines/remote.py", line 150, in __init__
    self._session = self.session(new_session = new_session)
  File "/usr/lib/python2.7/site-packages/plumbum/machines/ssh_machine.py", line 150, in session
    self.encoding, isatty, self.connect_timeout)
  File "/usr/lib/python2.7/site-packages/plumbum/machines/session.py", line 141, in __init__
    self.run("")
  File "/usr/lib/python2.7/site-packages/plumbum/machines/session.py", line 224, in run
    return run_proc(self.popen(cmd), retcode)
  File "/usr/lib/python2.7/site-packages/plumbum/commands/processes.py", line 244, in run_proc
    stdout, stderr = proc.communicate()
  File "/usr/lib/python2.7/site-packages/plumbum/machines/session.py", line 92, in communicate
    line = pipe.readline()
  File "/usr/lib/python2.7/site-packages/plumbum/machines/session.py", line 42, in readline
    raise EOFError()
EOFError


I have the passwordless ssh setup between those two systems. Can anybody tell me what does traceback indicate? Like some port not being open? Or some process not running?

Any help is appreciated.

Thanks,
Vishwanath
Reply all
Reply to author
Forward
0 new messages