Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'skip:\\ 20': 0.07; '0.1': 0.09; 'kumar': 0.09; 'skip:/ 10': 0.09; 'skip:\\ 10': 0.09; 'subject:command': 0.09; 'cc:addr:python-list': 0.11; '(last': 0.16; 'args:': 0.16; 'closed:': 0.16; 'command:': 0.16; 'format:': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'kiran': 0.16; 'match:': 0.16; 'nodes': 0.16; 'ok!': 0.16; 'repr()': 0.16; 'skip:[ 30': 0.16; 'skip:[ 40': 0.16; 'skip:\\ 30': 0.16; 'subject:Problem': 0.16; 'subject:when': 0.16; 'timeout': 0.16; 'timeout:': 0.16; 'wrote:': 0.18; 'bit': 0.19; "skip:' 30": 0.19; 'thu,': 0.19; 'aug': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; 'config': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'skip:# 10': 0.33; 'skip:d 20': 0.34; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'false': 0.36; 'version:': 0.36; 'skip:[ 10': 0.38; 'skip:- 10': 0.38; 'skip:n 10': 0.64; '2000': 0.65; 'here': 0.66; 'skip:r 30': 0.69; '100': 0.79; 'to:none': 0.92; 'exceeded': 0.97 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=eTJ3gdrE9jgIZFPZC1q/bXXS63Zre70e1S5ss0oqUHA=; b=G69CHW3bTgFQsTFIj+2TsMGsTa+RS+x7HFnJohYdID5afrIz3Iz7Rz+tLFGCQCUrlq GRjNCdfo/G6trayqEwVfq7S7gde2PJN0I6OVQDpFtjxb6xIn65iD8Ke77/ZBPL4HNl9C T/lIls2D+w/DI50wCtDfhSRL4IQdRsMeWo2iUGJ8B8VQp7ysf+Gww6FWdT7/Ye0azc2w mLBFhxOfQZREUbgmV9DDR8Frafirq6jk0eFXDqS+h9DW7oZCMFORzJ6hVrHn+fyYAMRp Mxxg2uQ0PZbKnLq8ka2fdPwMp/w433O6swN8UFfdHd+XRpc+8tFImmMa0eQE5cIrhZVh ll4A== MIME-Version: 1.0 X-Received: by 10.50.30.72 with SMTP id q8mr30887127igh.14.1409154753619; Wed, 27 Aug 2014 08:52:33 -0700 (PDT) In-Reply-To: References: Date: Thu, 28 Aug 2014 01:52:33 +1000 Subject: Re: Problem with pexpect when executing a command on a remote machine From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 69 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1409154762 news.xs4all.nl 2911 [2001:888:2000:d::a6]:56909 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:77142 On Thu, Aug 28, 2014 at 1:27 AM, Kiran kumar Venkumahanti wrote: > ''Error sending command: cluster config -r -a Timeout exceeded in > read_nonblocking().\n\nversion: 2.4 > ($Revision: 516 $)\ncommand: /usr/bin/ssh\nargs: [\'/usr/bin/ssh\', \'-o\= ', > \'ServerAliveInterval=3D60\', \'-o\', \'UserKnownHostsFile=3D/dev/null\', > \'-o\', \'StrictHostKeyChecking=3Dno\', \'root@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\nReload= ing > configuration on all nodes\r\n\nbefore (last 100 chars): \x1b[0;10mclust= er > config -r -a\r\nConfiguration is OK!\r\nReloading configuration on all > nodes\r\n\nafter: \nmatch: > None\nmatch_index: None\nexitstatus: None\nflag_eof: False\npid: > 28817\nchild_fd: 7\nclosed: False\ntimeout: 10\ndelimiter: \'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(). version: 2.4 ($Revision: 516 $) command: /usr/bin/ssh args: ['/usr/bin/ssh', '-o', 'ServerAliveInterval=3D60', '-o', 'UserKnownHostsFile=3D/dev/null', '-o', 'StrictHostKeyChecking=3Dno', 'root@192.168.7.1', '-p', '22'] searcher: searcher_re: 0: re.compile("(:[^\r\n]* #|[^\r\n]*] ->| [^\r\n]*][$#]|:[^\r\n]*[$#])"= ) buffer (last 100 chars): =1B[0;10mcluster config -r -a Configuration is OK! Reloading configuration on all nodes before (last 100 chars): =1B[0;10mcluster config -r -a Configuration is OK! Reloading configuration on all nodes after: match: None match_index: None exitstatus: None flag_eof: False pid: 28817 child_fd: 7 closed: False timeout: 10 delimiter: 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