Open jmarcedwards opened 7 months ago
I also tried this on a 2nd identical model Cisco CGR, and again, the 1st time logging in NO PROBLEM. The 2nd and 3rd times, it logged in, but missed the prompt and threw an AuthenticationException.
@jmarcedwards Can you post the full exception stack trace of a failure?
You might need to eliminate/replace the Context Manager in your code (if you are not seeing the full exception stack trace).
Description of Issue/Question
I've tried this with both ConnLogOnly and ConnectHandler with the same result.
It appears from the DEBUG output that NetMiko HAS LOGGED INTO the network device.
I can see the prompt in the DEBUG output log.
However, a NetMikeAuthenticationException is being thrown about 60% of the time, i.e., there are times when the login occurs properly. The reason that I know that the login is happening is that when I would try to run the code a 2nd time, a VALID AuthenticationError occurs, because the DEVICE IS IN A LOGIN STATE.
When I check manually the login, I am immediately jumped into the PROMPT, NOT the login prompt for the username.
So, it seems that NetMiko is MISSING the successful login attempt looking for the first prompt.
I have tried the auth_timeout, conn_timeout, blocking_timeout, timeout at "30 seconds" with no luck. I can manually test the login over the SERIAL connection, and the network device is responding with a prompt after entering the password in about 5 seconds or so.
And again, it seems to be hit or miss. About 40% of the time, the login is successful.
I'm trying to figure out WHICH timeout needs to be adjusted. Can someone please help?
Thanks, Marc
Setup
Netmiko version
netmiko==4.3.0
Netmiko device_type (if relevant to the issue)
(Paste
device_type
between quotes below)Steps to Reproduce the Issue
Error Traceback
(Paste the complete traceback of the exception between quotes below)
Relevant Python code
(Please try to essentialize your Python code to the minimum code needed to reproduce the issue) (Paste the code between the quotes below)