Problem with pexpect when executing a command on a remote machine

Chris Angelico rosuav at gmail.com
Wed Aug 27 11:52:33 EDT 2014


On Thu, Aug 28, 2014 at 1:27 AM, Kiran kumar Venkumahanti
<leo.cool001 at gmail.com> wrote:
> ''Error sending command: cluster config -r -a Timeout exceeded in
> read_nonblocking().\n<scp_ssh_lib.eSSH object at 0xa60cd0>\nversion: 2.4
> ($Revision: 516 $)\ncommand: /usr/bin/ssh\nargs: [\'/usr/bin/ssh\', \'-o\',
> \'ServerAliveInterval=60\', \'-o\', \'UserKnownHostsFile=/dev/null\',
> \'-o\', \'StrictHostKeyChecking=no\', \'root at 192.168.7.1\', \'-p\',
> \'22\']\nsearcher: searcher_re:\n    0: re.compile("(:[^\\r\\n]*
> #|[^\\r\\n]*] ->| [^\\r\\n]*][$#]|:[^\\r\\n]*[$#])")\nbuffer (last 100
> chars):  \x1b[0;10mcluster config -r -a\r\nConfiguration is OK!\r\nReloading
> configuration on all nodes\r\n\nbefore (last 100 chars):  \x1b[0;10mcluster
> config -r -a\r\nConfiguration is OK!\r\nReloading configuration on all
> nodes\r\n\nafter: <class \'pexpect.pexpect.TIMEOUT\'>\nmatch:
> None\nmatch_index: None\nexitstatus: None\nflag_eof: False\npid:
> 28817\nchild_fd: 7\nclosed: False\ntimeout: 10\ndelimiter: <class
> \'pexpect.pexpect.EOF\'>\nlogfile: None\nlogfile_read: None\nlogfile_send:
> None\nmaxread: 2000\nignorecase: False\nsearchwindowsize:
> None\ndelaybeforesend: 0.05\ndelayafterclose: 0.1\ndelayafterterminate: 0.1'

This is a bit hard to read... but here it is, decoded from repr() format:

Error sending command: cluster config -r -a Timeout exceeded in
read_nonblocking().
<scp_ssh_lib.eSSH object at 0xa60cd0>
version: 2.4 ($Revision: 516 $)
command: /usr/bin/ssh
args: ['/usr/bin/ssh', '-o', 'ServerAliveInterval=60', '-o',
'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no',
'root at 192.168.7.1', '-p', '22']
searcher: searcher_re:
    0: re.compile("(:[^\r\n]* #|[^\r\n]*] ->| [^\r\n]*][$#]|:[^\r\n]*[$#])")
buffer (last 100 chars):  cluster config -r -a
Configuration is OK!
Reloading configuration on all nodes

before (last 100 chars):  cluster config -r -a
Configuration is OK!
Reloading configuration on all nodes

after: <class 'pexpect.pexpect.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 28817
child_fd: 7
closed: False
timeout: 10
delimiter: <class 'pexpect.pexpect.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1


Do you know why it's timing out?

ChrisA



More information about the Python-list mailing list