[rancid] clogin: not found
Manfred Mayer IT
manfred.mayer.it at rapunzel.de
Wed Jun 11 08:41:31 UTC 2014
Hello John,
I have expect 5.45. In my .cloginrc these switches are configured for autoenable, manually connecting with bin/clogin or bin/hlogin sets me to Enable-Prompt (hostname#).
I don't have too many Cisco devices, some only support telnet, these work perfectly. With those that support ssh I have a different problem, as I am unable to login whatsoever by "ssh admin at hostname". I suppose there's an openssh issue as the debug information says:
debug1: Local version string SSH-2.0-OpenSSH_5.9p1 Debian-5ubuntu1.4
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "hostname" from file "/usr/local/rancid/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
debug1: SSH2_MSG_KEXINIT sent
Read from socket failed: Connection reset by peer
Regards
Mana
-----Ursprüngliche Nachricht-----
Von: heasley [mailto:heas at shrubbery.net]
Gesendet: Mittwoch, 11. Juni 2014 02:29
An: Manfred Mayer IT
Cc: 'rancid-discuss at shrubbery.net'
Betreff: Re: [rancid] clogin: not found
Tue, Jun 10, 2014 at 11:49:47AM +0200, Manfred Mayer IT:
> Hello John,
>
> thanks for your help. After adding /usr/local/rancid/bin to the PATH, that error is gone and I went on to executing bin/rancid-run. Now I see these errors in the rancid-run logfile:
>
> Trying to get all of the configs.
> swledv05: missed cmd(s): write term
> swledv05: End of run not found
> ;
> swledv02: missed cmd(s): show tech transceivers
> swledv04: missed cmd(s): show tech transceivers,show module,show
> config status,show system-information,show systems
> swledv11: missed cmd(s): show config files couldn't compile regular
> expression pattern: parentheses () not balanced
> while executing
> "expect {
> -re $reprompt {}
> -re "\[\n\r]+" { exp_continue }
> }"
> (procedure "run_commands" line 9)
> invoked from within
> "run_commands $prompt $command"
> ("foreach" body line 161)
> invoked from within
> "foreach router [lrange $argv $i end] {
> set router [string tolower $router]
> send_user "$router\n"
>
> # device timeout
> set timeout [find t..."
> (file "/usr/local/rancid/bin/hlogin" line 615)
>
>
> I use the same entries in my router.db as on my old machine, but on the old system I don't get any errors in my logfile. For the "parentheses" error I found this thread (http://www.shrubbery.net/pipermail/rancid-discuss/2010-June/004987.html), but my hlogin already contains the mentioned line.
Would you tell me the version of expect that you have? what the device's prompt is? and does clogin work with your cisco/etc devices?
The regex is the same in clogin. it reduces the prompt match so that -x and -c can deal with prompts that change, like they do between cli & config modes on cisco.
I think it could be reduced to:
regsub -all {^(.{1,11}).*([#>])$} $reprompt {\1([^#>\r\n]+)?[#>]} reprompt
eliminating the stuff for the (enable)-junk in Catalyst-like prompts:
foo#(enable)
but hlogin is also used for AGM modules and SMC/Dell. I no longer have AGMs, but do not recall them having this type prompt. Going by stuff others have posted about SMC/Dell, I don't think it would affect those either.
That said, I do not know why it would fail for you, but work for my ciscos and HPs.
> Regards
> Mana
>
>
> -----Ursprüngliche Nachricht-----
> Von: John Heasley [mailto:heas at shrubbery.net]
> Gesendet: Freitag, 6. Juni 2014 16:26
> An: Manfred Mayer IT
> Betreff: Re: [rancid] clogin: not found
>
>
>
> > Am Jun 6, 2014 um 6:40 AM schrieb Manfred Mayer IT <manfred.mayer.it at rapunzel.de>:
> >
> > Hi all,
> >
> > I try to migrate my existing rancid-2.3.8 installation to a new host with Ubuntu 12.04. I downloaded ftp://ftp.shrubbery.net/pub/rancid/rancid-2.3.8.tar.gz and installed it to /usr/local/rancid. I copied the .cloginrc and rancid.conf to the new host and wanted to test with a new router.db first, containing only 6 HP Procurve switches (switchname:hp:up). I can login successfully to each switch with "bin/clogin switchname" and I also tried "bin/hlogin -f .cloginrc -c "show version" switchname" which gives me a "no page" output first, but then the version and a completed logout.
> >
> > But executing "bin/rancid switchname" results in the following:
> > sh: 1: clogin: not found
> > switchname: missed cmd(s): dir /all slavedisk2:,show rsp chassis-info,show capture,dir /all sec-slot2:,show diag,dir:
> > switchname: End of run not found
> > !
>
> The rancid bin dir is not hardcoded in *login, it uses and inherits your PATH, or rancid.conf's in the case of rancid-run.
> >
> > I found this existing thread http://www.shrubbery.net/pipermail/rancid-discuss/2008-November/003404.html but however I don't know what to do exactly to solve the problem.
> >
> > Any suggestions would be appreciated
> >
> > Regards
> > Mana
> >
> > Rapunzel Naturkost GmbH, Rapunzelstra?e 1, D-87764 Legau
> > Registergericht Memmingen HRB 14736 | Sitz der Gesellschaft: Legau
> > Ust Id Nr. DE 129088402
> > Gesch?ftsf?hrer: Joseph Wilhelm | Margit Epple | Andreas Wenning
> > Telefon: +49 (0)8330 / 529 - 0
> > _______________________________________________
> > Rancid-discuss mailing list
> > Rancid-discuss at shrubbery.net
> > http://www.shrubbery.net/mailman/listinfo/rancid-discuss
>
> Email secured by [Rapunzel IT]
>
> Rapunzel Naturkost GmbH, Rapunzelstraße 1, D-87764 Legau
> Registergericht Memmingen HRB 14736 | Sitz der Gesellschaft: Legau
> Ust Id Nr. DE 129088402
> Geschäftsführer: Joseph Wilhelm | Margit Epple | Andreas Wenning
> Telefon: +49 (0)8330 / 529 - 0
> _______________________________________________
> Rancid-discuss mailing list
> Rancid-discuss at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Email secured by [Rapunzel IT]
Rapunzel Naturkost GmbH, Rapunzelstraße 1, D-87764 Legau
Registergericht Memmingen HRB 14736 | Sitz der Gesellschaft: Legau
Ust Id Nr. DE 129088402
Geschäftsführer: Joseph Wilhelm | Margit Epple | Andreas Wenning
Telefon: +49 (0)8330 / 529 - 0
More information about the Rancid-discuss
mailing list