[rancid] MikroTik missed cmd(s): system package print detail without-paging

IT-Info it-info at bugtusselwireless.com
Wed Jan 7 22:03:29 UTC 2015

Hi Heasley,

I appologize, but how do I apply this patch?  Does this need to be appended to the bin/mtlogin.in source file and then recompiled?  Can you clarify for me?


-----Original Message-----
From: heasley [mailto:heas at shrubbery.net] 
Sent: Wednesday, January 7, 2015 3:37 PM
To: IT-Info
Cc: rancid-discuss at shrubbery.net
Subject: Re: [rancid] MikroTik missed cmd(s): system package print detail without-paging

Wed, Jan 07, 2015 at 07:28:09PM +0000, IT-Info:
> I've got an issue specifically with MikroTik devices.  When RANCID runs, it skips a bunch of MikroTik devices with this type of error:
> mikrotik01: missed cmd(s): system package print detail without-paging
> If I log in and run rancid-run manually, sometimes it will work and sometimes it won't, but it never works from cron.  These MikroTik devices are those that have been replaced due to failure or other reason.  I delete the key in .ssh/known_keys, the new key is added upon next run, but then this error appears.  Since we've replaced many MikroTiks over the past 6 months, the list of MikroTik devices with this issue is growing - I've got about 20 now.
> I upgraded RANCID from 2.3.8 to 3.1, but that didn't help the issue.  I'm aware of the issue detailed at http://www.shrubbery.net/pipermail/rancid-discuss/2013-August/007010.html.  This issue is similar, but I don't know the solution and I can replicate it after physically replacing a MikroTik device.
> I can manually run the command that RANICID errors on without any issues, so it doesn't appear to be a timeout issue:
> $ bin/mtlogin -c "system package print detail without-paging" mikrotik01

Would you try this patch?  please lmk if it fixes the problem.  if it doesnt,
perhaps you can give me remote access to one.

Index: mtlogin.in
--- mtlogin.in	(revision 3005)
+++ mtlogin.in	(working copy)
@@ -457,6 +457,14 @@
 source_password_file $password_file
 set in_proc 0
 set exitval 0
+# if we have dont have a tty, we need some additional terminal settings
+if [catch {stty -echo} reason] {
+    # no tty, ie: cron
+    set spawnopts "-nottycopy"
+    set stty_init "cols 132"
+} else {
+    catch {stty echo} reason
 foreach router [lrange $argv $i end] {
     set router [string tolower $router]
     send_user "$router\n"

More information about the Rancid-discuss mailing list