netmiko.ssh_exception.NetmikoTimeoutException #2200
Replies: 3 comments 1 reply
-
I would probably try setting: |
Beta Was this translation helpful? Give feedback.
-
Probably need to do: output = net_connect.send_config_from_file(config_file='19_config.txt', cmd_verify=False) There might be a separate issue where global_cmd_verify is not wired in for send_config_set/send_config_from_file. I need to possibly fix that. |
Beta Was this translation helpful? Give feedback.
-
Hello @ktbyers, I have two cisco routers and running an automation tool on them, I'm getting a Timed-out error intermittently on one of my routers. I have read through #212 and #1151. I am not changing the hostname (however configuring the same hostname again). Note: I am using Netmiko 2.1.1 Release. Error Stack: Can you please help me? Please let me know if you need more information. Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi Guys,
I am using the script to ssh to my router and send some commands from file using "send_config_from_file". The script works fine on PyCharm IDE on Windows, but fails on Ubuntu 20.04 - any ideas why?
My Script:
from netmiko import ConnectHandler
from getpass import getpass
IP_LIST = open('19_devices.txt')
for IP in IP_LIST:
RTR = {
'device_type': 'cisco_xe',
'ip': IP,
'username': 'admin',
'password': 'admin',
}
Error is:
Connecting to the device 10.10.10.10
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/paramiko/channel.py", line 699, in recv
out = self.in_buffer.read(nbytes, self.timeout)
File "/usr/local/lib/python3.8/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.8/dist-packages/netmiko/base_connection.py", line 569, in _read_channel_expect
new_data = self.remote_conn.recv(MAX_BUFFER)
File "/usr/local/lib/python3.8/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 "part20_ssh_to_multiple_devices_from_file_and_configure_from_file.py", line 16, in
output = net_connect.send_config_from_file(config_file='19_config.txt')
File "/usr/local/lib/python3.8/dist-packages/netmiko/base_connection.py", line 1790, in send_config_from_file
return self.send_config_set(cfg_file, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/netmiko/base_connection.py", line 1875, in send_config_set
new_output = self.read_until_pattern(pattern=re.escape(cmd.strip()))
File "/usr/local/lib/python3.8/dist-packages/netmiko/base_connection.py", line 651, in read_until_pattern
return self._read_channel_expect(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/netmiko/base_connection.py", line 579, in _read_channel_expect
raise NetmikoTimeoutException(
netmiko.ssh_exception.NetmikoTimeoutException: Timed-out reading channel, data not available.
Beta Was this translation helpful? Give feedback.
All reactions