ktbyers / netmiko

Multi-vendor library to simplify Paramiko SSH connections to network devices
MIT License
3.59k stars 1.3k forks source link

Aruba os write memory timeout. #3510

Open hlehel00 opened 2 days ago

hlehel00 commented 2 days ago

Aruba os, connect.save_config and connect.send_command(write memory) runs into a timeout. (Aruba 6000 switches)

Netmiko version

4.4.0

Netmiko device_type (if relevant to the issue)

aruba_os

aruba = {
                'device_type': 'aruba_os',
                'host':   ip,
                'username': 'username',
                'password': 'password',
                }
connect=ConnectHandler(**aruba)

print("OK")
infohost = connect.find_prompt()
myhostname = infohost.strip('#$> ')
connect.send_command("copy running-config tftp://ip/"+myhostname+".cfg cli")
connect.send_command("write memory")
connect.disconnect

I tried aruba_osswitch and hp_procurve type and with configure timeouts etc.... same problem.

ktbyers commented 1 day ago

I am assuming that this is not Aruba CX switches?

You probably should use aruba_osswitch for the device_type (and not aruba_os which is for the Aruba wireless controller).

If you use aruba_osswitch and try either save_config or your above send_command what error do you see.

Can you post the full exception stack trace here?

hlehel00 commented 1 day ago

Its Aruba swtiches, i tried with aruba_osswitch device_type, and when i tried save_config, in the logs, there is no write memory command.

With send_command("write memory") i have timeout:

**netmiko.exceptions.ReadTimeout:

Pattern not detected: 'SWITCH#' in output.

Things you might try to fix this:

  1. Explicitly set your pattern using the expect_string argument.
  2. Increase the read_timeout to a larger value.

Meantime, i try it with send_command_timing and that working.

wr=connect.send_command_timing("write memory", strip_prompt=False, strip_command=False) wr+=connect.send_command_timing("\n", strip_prompt=False, strip_command=False)

ktbyers commented 1 day ago

Is the write memory command prompting you for something? I.E. do you have to confirm it in some way?