question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Aruba OS fails to make configuration changes (fixed in Netmiko >= 3.4.0)

See original GitHub issue

Good day,

First of all, thank you for providing the community with this module. Recently when I try to use the following methods/functions from ConnectHandler send_config_set and send_config_from_file I get the following traceback

Interactive SSH session established Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/paramiko/channel.py”, line 699, in recv out = self.in_buffer.read(nbytes, self.timeout) File “/usr/local/lib/python3.6/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.6/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.6/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 “prov_ap.py”, line 30, in <module> results = ssh_connect.send_config_from_file(base_config_cmd, cmd_verify=False) File “/usr/local/lib/python3.6/site-packages/netmiko/base_connection.py”, line 1642, in send_config_from_file return self.send_config_set(cfg_file, **kwargs) File “/usr/local/lib/python3.6/site-packages/netmiko/base_connection.py”, line 1704, in send_config_set output = self.config_mode(*cfg_mode_args) File “/usr/local/lib/python3.6/site-packages/netmiko/cisco_base_connection.py”, line 40, in config_mode return super().config_mode(config_command=config_command, pattern=pattern) File “/usr/local/lib/python3.6/site-packages/netmiko/base_connection.py”, line 1598, in config_mode output += self.read_until_pattern(pattern=re.escape(config_command.strip())) File “/usr/local/lib/python3.6/site-packages/netmiko/base_connection.py”, line 618, in read_until_pattern return self._read_channel_expect(*args, **kwargs) File “/usr/local/lib/python3.6/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.

It’s important to mention that when I use send_config_set to send one command it is processed successfully and the change is reflected on the network device. However, if I am looping through data and sending it to the device only the first command is processed and soon after the above error is displayed.

Session logging was enabled in the connection handler and it appears that the data is not being sent to the device as shown below.

cat output.txt (MM-03) *[mynode] # (MM-03) *[mynode] # (MM-03) *[mynode] #no paging (MM-03) *[mynode] # (MM-03) *[mynode] #configure term Enter Configuration commands, one per line. End with CNTL/Z

Therefore, I suffix each line in the config set with a newline; however, that did not resolve the issue, I have also sent cmd_verify=False but did not resolve the issue.

Any recommendation will be highly appreciated

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
EarlRamirezcommented, Sep 26, 2021

@ktbyers, thank you very much for your support.

0reactions
EarlRamirezcommented, Sep 25, 2021

@ktbyers after upgrading to the Netmiko v3.4.0 we no longer experience the error as shown in the test.log.

Read more comments on GitHub >

github_iconTop Results From Across the Web

netmiko | HP Aruba switch | Failed to enter configuration mode ...
I am using netmiko to work in different vendors network. For Cisco netmiko script is working with no errors. However, for HP Aruba...
Read more >
netmiko API documentation - GitHub Pages
Dynamically change Netmiko object's class to proper class. Generally used with terminal_server device_type when you need to redispatch after interacting ...
Read more >
Resolved Issues in ArubaOS 8.4.0.0 - Aruba Networks
Bug ID Component Reported Version Resolved in Version 149222 IPsec ArubaOS 8.0.0.0 ArubaOS 8.4.0.0 154096 AP Regulatory ArubaOS 8.2.0.0 ArubaOS 8.4.0.0 157199 AP‑Wireless ArubaOS 8.4.0.0 ArubaOS...
Read more >
netmiko - PyPI
Network automation to screen-scraping devices is primarily concerned with gathering output from show commands and with making configuration changes. Netmiko ...
Read more >
Python Netmiko for ArubaOS and HPE Comware - YouTube
Python Netmiko install & example script for Aruba 3810M & HPE Comware7.Coding, DevOps; all those good things!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found