Does not work on ubuntu server 11.10

549 views
Skip to first unread message

Alex

unread,
Dec 14, 2011, 7:15:53 AM12/14/11
to korreio
My server ubuntu server 11.10 my postfix/oneiric uptodate
2.8.5-2~build1

My workstation is ubuntu 11.10
I connect to the server is running postfix. When connecting I get an
error


./korreio.py
Traceback (most recent call last):
File "./inc/lib/korreiolib.py", line 12048, in queue_load
queueList = self.ssh_open("postqueue -p")
File "./inc/lib/korreiolib.py", line 11446, in ssh_open
s = self.ssh_connect()
File "./inc/lib/korreiolib.py", line 11415, in ssh_connect
if not self.ssh.login("-p%s %s" % (self.iSshPort.text().ascii(),
self.iSshHost.text().ascii()), self.iSshUser.text().ascii(),
self.iSshPass.text().ascii(), login_timeout=40):
File "/usr/lib/python2.7/dist-packages/pxssh.py", line 243, in login
if not self.synch_original_prompt():
File "/usr/lib/python2.7/dist-packages/pxssh.py", line 134, in
synch_original_prompt
self.read_nonblocking(size=10000,timeout=1) # GAS: Clear out the
cache before getting the prompt
File "/usr/lib/python2.7/dist-packages/pexpect.py", line 824, in
read_nonblocking
raise TIMEOUT ('Timeout exceeded in read_nonblocking().')
pexpect.TIMEOUT: Timeout exceeded in read_nonblocking().

Please help us to understand

Reinaldo de Carvalho

unread,
Dec 14, 2011, 8:10:02 AM12/14/11
to kor...@googlegroups.com
On Wed, Dec 14, 2011 at 9:15 AM, Alex <alexey.a...@gmail.com> wrote:
>
> My server ubuntu server 11.10 my postfix/oneiric uptodate
> 2.8.5-2~build1
>

Welcome Alex!

>
> My workstation is ubuntu 11.10
> I connect to the server is running postfix. When connecting I get an
> error
>

Can you connect to the server on ssh port? Example:

rei@rpawsds10:~$ nc 10.13.0.231 22
SSH-2.0-OpenSSH_5.5p1 Debian-6+squeeze1

>
> ./korreio.py
> Traceback (most recent call last):
>  File "./inc/lib/korreiolib.py", line 12048, in queue_load
>    queueList = self.ssh_open("postqueue -p")
>  File "./inc/lib/korreiolib.py", line 11446, in ssh_open
>    s = self.ssh_connect()
>  File "./inc/lib/korreiolib.py", line 11415, in ssh_connect
>    if not self.ssh.login("-p%s %s" % (self.iSshPort.text().ascii(),
> self.iSshHost.text().ascii()), self.iSshUser.text().ascii(),
> self.iSshPass.text().ascii(), login_timeout=40):
>  File "/usr/lib/python2.7/dist-packages/pxssh.py", line 243, in login
>    if not self.synch_original_prompt():
>  File "/usr/lib/python2.7/dist-packages/pxssh.py", line 134, in
> synch_original_prompt
>    self.read_nonblocking(size=10000,timeout=1) # GAS: Clear out the
> cache before getting the prompt
>  File "/usr/lib/python2.7/dist-packages/pexpect.py", line 824, in
> read_nonblocking
>    raise TIMEOUT ('Timeout exceeded in read_nonblocking().')
> pexpect.TIMEOUT: Timeout exceeded in read_nonblocking().
>
> Please help us to understand
>

--
Reinaldo de Carvalho
http://korreio.sf.net
http://python-cyrus.sf.net

"While not fully understand a software, don't try to adapt this
software to the way you work, but rather yourself to the way the
software works" (myself)

Alex

unread,
Dec 14, 2011, 8:19:09 AM12/14/11
to korreio
Yes

On 14 дек, 15:10, Reinaldo de Carvalho <reinal...@gmail.com> wrote:

> Reinaldo de Carvalhohttp://korreio.sf.nethttp://python-cyrus.sf.net

Reinaldo de Carvalho

unread,
Dec 14, 2011, 8:31:28 AM12/14/11
to kor...@googlegroups.com
On Wed, Dec 14, 2011 at 10:19 AM, Alex <alexey.a...@gmail.com> wrote:
> Yes
>

Maybe a shell detect promblem. Did you changed the shell prompt? or
maybe, Ubuntu server 11.10 has changed it for you? I've tested this
with (like debian):

username@machine:~$
machine:~#

I'll try Ubuntu 11.10 in next days.

--
Reinaldo de Carvalho
http://korreio.sf.net

Reinaldo de Carvalho

unread,
Dec 21, 2011, 8:40:21 AM12/21/11
to kor...@googlegroups.com
On Wed, Dec 14, 2011 at 9:15 AM, Alex <alexey.a...@gmail.com> wrote:
>
> ./korreio.py
> Traceback (most recent call last):
>  File "./inc/lib/korreiolib.py", line 12048, in queue_load
>    queueList = self.ssh_open("postqueue -p")
>  File "./inc/lib/korreiolib.py", line 11446, in ssh_open
>    s = self.ssh_connect()
>  File "./inc/lib/korreiolib.py", line 11415, in ssh_connect
>    if not self.ssh.login("-p%s %s" % (self.iSshPort.text().ascii(),
> self.iSshHost.text().ascii()), self.iSshUser.text().ascii(),
> self.iSshPass.text().ascii(), login_timeout=40):
>  File "/usr/lib/python2.7/dist-packages/pxssh.py", line 243, in login
>    if not self.synch_original_prompt():
>  File "/usr/lib/python2.7/dist-packages/pxssh.py", line 134, in
> synch_original_prompt
>    self.read_nonblocking(size=10000,timeout=1) # GAS: Clear out the
> cache before getting the prompt
>  File "/usr/lib/python2.7/dist-packages/pexpect.py", line 824, in
> read_nonblocking
>    raise TIMEOUT ('Timeout exceeded in read_nonblocking().')
> pexpect.TIMEOUT: Timeout exceeded in read_nonblocking().
>
> Please help us to understand
>

Hi Alex,

The bug is on python-pexpect library. To fix the bug, add to pxssh.py
this lines (134 and 135):

/usr/lib/python2.6/dist-packages/pxssh.py
self.sendline() #134
time.sleep(0.5) #135

Best regards,

Reinaldo de Carvalho

unread,
Dec 21, 2011, 8:42:08 AM12/21/11
to kor...@googlegroups.com
On Wed, Dec 21, 2011 at 10:40 AM, Reinaldo de Carvalho
<rein...@gmail.com> wrote:
>
> Hi Alex,
>
> The bug is on python-pexpect library. To fix the bug, add to pxssh.py
> this lines (134 and 135):
>
> /usr/lib/python2.6/dist-packages/pxssh.py
>       self.sendline()        #134
>       time.sleep(0.5)       #135
>

# /usr/lib/python2.6/dist-packages/pxssh.py
def synch_original_prompt (self):
# comments
self.sendline() # add this line
time.sleep(0.5) # add this line


self.read_nonblocking(size=10000,timeout=1) # GAS: Clear out
the cache before getting the prompt

time.sleep(0.1)
self.sendline()
time.sleep(0.5)

Reply all
Reply to author
Forward
0 new messages