Jul-31-2017, 10:54 AM
At some situation I'm facing this error, I have added the error details below. Can somebody help me in fixing this issue?
1 2 3 4 5 6 7 8 |
... s = pxssh.pxssh(timeout = 5 , maxread = 2000000 ) switch_ip = raw_input ( 'Enter the switch ip: ' ) username = raw_input ( 'username: ' ) password = getpass.getpass( 'password: ' ) s.PROMPT = "\[.][\#]" s.force_password = True ... |
Error:Traceback (most recent call last):
File "clean_intf_acl_pxssh.py", line 100, in <module>
s.logout()
File "/usr/lib/python2.7/dist-packages/pexpect/pxssh.py", line 350, in logout
index = self.expect([EOF, "(?i)there are stopped jobs"])
File "/usr/lib/python2.7/dist-packages/pexpect/spawnbase.py", line 315, in expect
timeout, searchwindowsize, async)
File "/usr/lib/python2.7/dist-packages/pexpect/spawnbase.py", line 339, in expect_list
return exp.expect_loop(timeout)
File "/usr/lib/python2.7/dist-packages/pexpect/expect.py", line 104, in expect_loop
return self.timeout(e)
File "/usr/lib/python2.7/dist-packages/pexpect/expect.py", line 68, in timeout
raise TIMEOUT(msg)
pexpect.exceptions.TIMEOUT: Timeout exceeded.
<pexpect.pxssh.pxssh object at 0x7fa7eb01f490>
command: /usr/bin/ssh
args: ['/usr/bin/ssh', '-q', '-oRSAAuthentication=no', '-o', 'PubkeyAuthentication=no', '-l', 'admin', '10.16.206.119']
searcher: None
buffer (last 100 chars): 'ow\r\r\n\rN9K-119(config-if)# interface ethernet 1/16\r\r\n\rN9K-119(config-if)# no switchport mode trunk\r\r\n'
before (last 100 chars): 'ow\r\r\n\rN9K-119(config-if)# interface ethernet 1/16\r\r\n\rN9K-119(config-if)# no switchport mode trunk\r\r\n'
after: <class 'pexpect.exceptions.TIMEOUT'>
match: None
match_index: None
exitstatus: None
flag_eof: False
pid: 23594
child_fd: 5
closed: False
timeout: 5
delimiter: <class 'pexpect.exceptions.EOF'>
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000000
ignorecase: False
searchwindowsize: None
delaybeforesend: 0.05
delayafterclose: 0.1
delayafterterminate: 0.1
I have tired changing maxread value and timeout value, but the error still persist, I'm not sure whats happening here.