send_config_set problem: Timed-out reading channel, data not available.
See original GitHub issueThanks a lot @ktbyers for this excellent library and your work on this!
I have an issue when using send_config_set using a Cisco IOS 88x router. We got a template that has around 65 commands, they work fine on cli, and netmiko delivers all commands successfully to the router (yes, all commands are present in the running config).
But netmiko is stuck in waiting the router to be finished, this is the exception that I get:
` Traceback (most recent call last): File “/usr/local/lib/python3.7/site-packages/paramiko/channel.py”, line 699, in recv out = self.in_buffer.read(nbytes, self.timeout) File “/usr/local/lib/python3.7/site-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/site-packages/netmiko/base_connection.py”, line 541, in _read_channel_expect new_data = self.remote_conn.recv(MAX_BUFFER) File “/usr/local/lib/python3.7/site-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 “/Users/…/conf.py”, line 161, in <module> conn.send_config_set(tmpl1config, delay_factor=100, max_loops=1000) File “/usr/local/lib/python3.7/site-packages/netmiko/base_connection.py”, line 1726, in send_config_set new_output = self.read_until_pattern(pattern=re.escape(cmd.strip())) File “/usr/local/lib/python3.7/site-packages/netmiko/base_connection.py”, line 618, in read_until_pattern return self._read_channel_expect(*args, **kwargs) File “/usr/local/lib/python3.7/site-packages/netmiko/base_connection.py”, line 552, in _read_channel_expect “Timed-out reading channel, data not available.” netmiko.ssh_exception.NetmikoTimeoutException: Timed-out reading channel, data not available. `
I already tried several things:
- In the ConnectHandler, added ‘blocking_timeout’: 100
- In send_config_set added the options: delay_factor=5, delay_factor=100, max_loops=16, max_loops=1000
Cheers
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
You can also in
send_config_set
set the following argument to False:This will turn of that command verification and fallback to the old Netmiko 2.X behavior.
Of course, I am pretty interested to see why it is failing so it would be very helpful to look at your session_log and see why the command verification is not working 😃
hey, it works with cmd_verify=False 😃
About the script flow:
Maybe the problem is somewhere there? One long string? PrettyPrinter result of the substituted text: