Aruba 2530 exception Timed-out reading channel, data not available on send_config_set()
See original GitHub issueGreetings,
I’m running a script to configure a vlan on a switch based on a list of MACs, and for one of the switches I’ve been seeing a iregular behavior. Sometimes the script runs without raising exceptions and the configuration is applied, but sometimes it raises an error during the send_config_set(). I have a lab with a HP procurve 2620 and a Aruba 2530, and i’m using ‘hp_procurve’ as the device type for both. The exception only occurs on the Aruba switch.
I’ve tried changing the ‘global_delay_factor’ to 2 and 4, but have the same behavior.
Please find attached the exception trace and the session log of the device.
This is the code I’m executing:
sw = {
'ip':switch['IPAddress'] ,
'username': USERNAME,
'password': PASS,
'device_type': switch['device_type'],
'global_delay_factor':4,
'session_log':'session.log'
}
conn = ConnectHandler(**sw)
lldp = conn.send_command_timing("show lldp info remote")
logger.info(lldp)
showMac = conn.send_command_timing("show mac-address")
logger.info(showMac)
showTrunk = conn.send_command_timing("show trunks")
logger.info(showTrunk)
trunkDict = dict(re.findall('(\d+).*(Trk\d+)',showTrunk))
for mac in macs:
mac_lldp = mac.lower().replace("-", " ")
mac_cam = f'{mac.lower().replace("-", "")[0:6]}-{mac.lower().replace("-", "")[6:12]}'
if mac_lldp in lldp:
match = re.findall(f'(\d+)\s+\|\s+{mac_lldp}', lldp)
print(f'this MAC was scrapped from LLDP : {mac} | interface(s) {match}')
[ports.add(trunkDict[port]) if port in trunkDict else ports.add(port) for port in match]
elif mac_cam in showMac:
match = re.search(f'{mac_cam}\s+(\w*\d+)?', showMac)
print(f'this MAC was scrapped from CAM: {mac} | interface(s) {match.group(1)}')
if match.group(1) in trunkDict:
ports.add(trunkDict[match.group(1)])
else:
ports.add(match.group(1))
else:
logger.error("MAC Not Found on this Device. It might be temporarily down. Please refer to the logs to investigate further")
if ports != False:
print(f"Configuring vlan {H20_VLANID} on the following interfaces {','.join(ports)}")
conn.send_config_set([f"vlan {H20_VLANID}", f"name {H20_VLANNAME}", f'tagged ethernet {",".join(ports)}'])`
Kind regards,
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Proper setting for Aruba HP 2530-24G Switch (J9776A) for ...
Hi,. Configure: ip igmp querier on core but I suspect that ip pim command is available on Aruba 2530. Thansk!
Read more >Aruba 2530 Management and Configuration Guide for ...
Documentation, and Technical Data for Commercial Items are licensed to the U.S. ... NOTE: Because the Aruba 2530 Switch Series does not contain...
Read more >Netmiko "Timed-out reading channel, data not available. ...
I have faced with the similar error. When I have checked the configuration of the device through CLI, I have seen that the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi,
Good news! your solution also worked for me. Thanks for your help BapRx.
Sorry,
Didn’t have the time to further look into this, so I just used a while loop for retry that multiplies the delay_factor by two for each iteration that fails.
I’ll try to replicate your implementation and see if it fixes this. I might still leave the while loop just to make sure.
Best regards