Discussion:
[rancid] clogin: not found
Manfred Mayer IT
2014-06-06 13:40:53 UTC
Permalink
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
!

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
Alan McKinnon
2014-06-06 23:49:35 UTC
Permalink
Post by Manfred Mayer IT
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.
sh: 1: clogin: not found
switchname: End of run not found
!
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
You probably do not have /usr/local/bin in your PATH when that command
is run.
The rancid devs (in common with the majority of software out there)
assume that since PATH is completely user-selectable, that you know how
to set and use it, so doesn't bother much with documenting it.

Please log in as the rancid user and post theoutput of:

which clogin
echo $PATH
--
Alan McKinnon
***@gmail.com
Manfred Mayer IT
2014-06-10 09:49:47 UTC
Permalink
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.

Regards
Mana


-----Ursprüngliche Nachricht-----
Von: John Heasley [mailto:***@shrubbery.net]
Gesendet: Freitag, 6. Juni 2014 16:26
An: Manfred Mayer IT
Betreff: Re: [rancid] clogin: not found
Post by Manfred Mayer IT
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.
sh: 1: clogin: not found
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.
Post by Manfred Mayer IT
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
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
heasley
2014-06-11 00:29:28 UTC
Permalink
Post by Manfred Mayer IT
Hello John,
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.
Post by Manfred Mayer IT
Regards
Mana
-----Ursprüngliche Nachricht-----
Gesendet: Freitag, 6. Juni 2014 16:26
An: Manfred Mayer IT
Betreff: Re: [rancid] clogin: not found
Post by Manfred Mayer IT
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.
sh: 1: clogin: not found
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.
Post by Manfred Mayer IT
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
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
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
Manfred Mayer IT
2014-06-11 08:41:31 UTC
Permalink
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 ***@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:***@shrubbery.net]
Gesendet: Mittwoch, 11. Juni 2014 02:29
An: Manfred Mayer IT
Cc: 'rancid-***@shrubbery.net'
Betreff: Re: [rancid] clogin: not found
Post by Manfred Mayer IT
Hello John,
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.
Post by Manfred Mayer IT
Regards
Mana
-----Ursprüngliche Nachricht-----
Gesendet: Freitag, 6. Juni 2014 16:26
An: Manfred Mayer IT
Betreff: Re: [rancid] clogin: not found
Post by Manfred Mayer IT
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.
sh: 1: clogin: not found
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.
Post by Manfred Mayer IT
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
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
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
'heasley'
2014-06-11 20:39:43 UTC
Permalink
Post by Manfred Mayer IT
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 only have an 2524 and debian with expect 5.45. I can not reproduce the
traceback. if it fails when you run the commands manually, I might be
able to find the problem if you send (to me, not the list, please) the
output of running it with expect debuggin. z.b.:

hlogin -d -t 90 -c'show version;show flash;show system-information;show system information;show module;show stack;show tech transceivers;show config files;show config status;write term' hostname 2>& debugoutput
Post by Manfred Mayer IT
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
Yes, probably a problem with the server. try -l.
Post by Manfred Mayer IT
Regards
Mana
-----Ursprüngliche Nachricht-----
Gesendet: Mittwoch, 11. Juni 2014 02:29
An: Manfred Mayer IT
Betreff: Re: [rancid] clogin: not found
Post by Manfred Mayer IT
Hello John,
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.
regsub -all {^(.{1,11}).*([#>])$} $reprompt {\1([^#>\r\n]+)?[#>]} reprompt
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.
Post by Manfred Mayer IT
Regards
Mana
-----Ursprüngliche Nachricht-----
Gesendet: Freitag, 6. Juni 2014 16:26
An: Manfred Mayer IT
Betreff: Re: [rancid] clogin: not found
Post by Manfred Mayer IT
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.
sh: 1: clogin: not found
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.
Post by Manfred Mayer IT
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
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
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
Loading...