You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the same issue as #1128 but with nxos_ssh.
Downgrading to netmiko 2.4.2 fixed the issue, but I think the logic has to be fixed here as well.
Setup
napalm version
3.0
Network operating system version
nxos
Steps to Reproduce the Issue
Error Traceback
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/paramiko/channel.py", line 699, in recv
out = self.in_buffer.read(nbytes, self.timeout)
File "/usr/local/lib/python3.7/dist-packages/paramiko/buffered_pipe.py", line 164, in read
raise PipeTimeout()
paramiko.buffered_pipe.PipeTimeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/netmiko/base_connection.py", line 550, in _read_channel_expect
new_data = self.remote_conn.recv(MAX_BUFFER)
File "/usr/local/lib/python3.7/dist-packages/paramiko/channel.py", line 701, in recv
raise socket.timeout()
socket.timeout
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
...
File "/usr/local/lib/python3.7/dist-packages/napalm/nxos_ssh/nxos_ssh.py", line 509, in is_alive
self._send_command(null)
File "/usr/local/lib/python3.7/dist-packages/napalm/nxos_ssh/nxos_ssh.py", line 447, in _send_command
return self.device.send_command(command)
File "/usr/local/lib/python3.7/dist-packages/netmiko/utilities.py", line 347, in wrapper_decorator
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/netmiko/base_connection.py", line 1389, in send_command
new_data = self.read_until_pattern(pattern=re.escape(cmd))
File "/usr/local/lib/python3.7/dist-packages/netmiko/base_connection.py", line 627, in read_until_pattern
return self._read_channel_expect(*args, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/netmiko/base_connection.py", line 561, in _read_channel_expect
"Timed-out reading channel, data not available."
netmiko.ssh_exception.NetmikoTimeoutException: Timed-out reading channel, data not available.
The text was updated successfully, but these errors were encountered:
ktbyers
changed the title
Latest 3.0 failing to connect nxos_ssh devices with Netmiko 3.1
nxos_ssh devices with Netmiko 3.1 fail on is_alive() call
May 12, 2020
I have wrapped all calls which checks if the connection is still alive.
def connection_alive(f):
""" decorator for all functions that require a working connection """
@wraps(f)
def wrapper(*args, **kwargs):
if "hostname" not in kwargs:
raise Exception("Supply a hostname.")
if kwargs['hostname'] not in CONNECTIONS:
raise Exception(
"There is no existing connection to %s." % kwargs['hostname'])
if not CONNECTIONS[kwargs['hostname']].is_alive():
raise Exception("No alive connection to %s." % kwargs['hostname'])
return f(*args, **kwargs)
return wrapper
Description of Issue/Question
This is the same issue as #1128 but with nxos_ssh.
Downgrading to netmiko 2.4.2 fixed the issue, but I think the logic has to be fixed here as well.
Setup
napalm version
Network operating system version
Steps to Reproduce the Issue
Error Traceback
The text was updated successfully, but these errors were encountered: