[rancid] Rancid submits random characters after logon - causes config read failure

Per-Olof Olsson peo at chalmers.se
Fri Sep 12 20:03:08 UTC 2014


Hello

Have someone tested to extend the time, device and tty driver have to negotiate
window size at login, before expect start to analyze text?

Seems to work if I use "sleep 3"

*** hlogin_ORG  2014-09-12 21:38:09.543395741 +0200
--- hlogin      2014-09-12 21:39:58.679120629 +0200
...
***************
*** 361,367 ****
             send_user "\nError: unknown connection method: $prog\n"
             return 1
         }
!       sleep 0.3

         # This helps cleanup each expect clause.
         expect_after {
--- 404,410 ----
             send_user "\nError: unknown connection method: $prog\n"
             return 1
         }
!       sleep 3

         # This helps cleanup each expect clause.
         expect_after {
***************
...

clogin to HP-switches...
Anyhow, tests using "sleep 3" seems to eliminate window size echo, even for clogin to HPs.


/Peo


Neil Arnold wrote 2014-09-12 17:03:
> Hi Jon,
>
> Ok, that makes sense. I've tried the following:
>
> TERM="" hlogin 10.100.20.149
> Result: Logged in but can't issue any command and the following displayed in the console:  ^[[36;116R
>
> TERM="" clogin 10.100.20.149
> Result: Log in successful but  ^[[36;116R is automatically issued to the switch (different to the original string but still stalls
> the config grab)
>
>
> On 12 September 2014 15:56, Jon Lewis <jlewis at lewis.org <mailto:jlewis at lewis.org>> wrote:
>
>     With bash being my shell, I've just been doing TERM="" before using clogin on aristas.  After seeing heasley's response, I did
>     a little testing, and vt100 seems to work as well.  My native TERM was "screen" since I like to use screen, it results in
>     display similar to what you posted and an "n" spit out as if typed.
>
>
>     On Fri, 12 Sep 2014, Neil Arnold wrote:
>
>         Hi Jethro, I've tried the hlogon too. No luck I'm afraid.
>
>         John, this sounds like it could be the solution as the characters do look
>         like terminal output. Can you explain how I would go about clearing the
>         TERM environment and if this works, I'm assuming I would have to make a
>         seperate cron job running clogin with these new parameters just for these
>         problem switches?
>
>         Thanks again for you help with this.
>
>
>         On 12 September 2014 13:03, Jon Lewis <jlewis at lewis.org <mailto:jlewis at lewis.org>> wrote:
>
>             On Fri, 12 Sep 2014, Neil Arnold wrote:
>
>               Hi,
>
>
>                 I've got an issue with 3 HP Procurve switches. All are running a recent
>                 firmware version. The problem is that no config is being pulled from 3 HP
>                 switches. in my network, the others give up their config just fine. I've
>                 discovered the reason but I'm unsure of how to fix it.
>                 The issue is caused because rancid is issuing the following command to the
>                 switch after it logs on: ^[[46;148R
>
>                 I can see this by running /bin/clogin 10.100.20.149 and seeing that I get
>                 dropped to the following:
>
>                 HP_SWITCH_1# ^[[46;148R
>                 HP_SWITCH_1#
>
>                 So Rancid is issuing the manager username and password and then issuing
>                 ^[[46;148R which the switch doesn't understand, Rancid, having not
>                 received
>
>
>             I have similar problems with clogin and arista gear.  In this case, it's
>             solved by clearing the TERM environment variable before running clogin.
>
>             ------------------------------__------------------------------__----------
>               Jon Lewis, MCP :)           |  I route
>                                           |  therefore you are
>             _________ http://www.lewis.org/~jlewis/__pgp <http://www.lewis.org/~jlewis/pgp> for PGP public key_________
>
>
>
>     ------------------------------__------------------------------__----------
>       Jon Lewis, MCP :)           |  I route
>                                   |  therefore you are
>     _________ http://www.lewis.org/~jlewis/__pgp <http://www.lewis.org/~jlewis/pgp> for PGP public key_________
>
>
>
>
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>




More information about the Rancid-discuss mailing list