[rancid] mtlogin error: Error TIMEOUT reached (2.3.8 deb)
Alan McKinnon
alan.mckinnon at gmail.com
Thu Mar 26 11:24:05 UTC 2015
On 26/03/2015 13:15, Lukasz Sokol wrote:
> Hi,
>
> How can I debug, what's given to expect as timeout during rancid-run ?
>
> (other than using & analyzing strace, possibly)
>
> TL;DR:
>
> still using the version from debian package on wheezy+backports,
>
> lukasz at george:~$ sudo apt-cache show rancid
> Package: rancid
> Version: 2.3.8-3
>
> rancid at george:~$ bin/mtrancid -V
> rancid 2.3.8
>
> On one router, while rancid-run, i get in the logs:
>
> myrouter mtlogin error: Error: TIMEOUT reached
> myrouter: missed cmd(s): system license print,system routerboard print,export,system package print detail without-paging
> myrouter: End of run not found
>
> and predictably no config is collected.
>
> So I split the cmd(s) to separate mtlogin -c invocations, slapped them into a script and ran it under time,
>
> revealing
>
> time ./myscript > /dev/null
>
> real 0m57.423s
> user 0m0.148s
> sys 0m0.060s
>
>
> Running each mtlogin -c command separately, reveals that in particular "export" command can take its time,
> interrupting its output for up to 40-45 seconds at a time.
>
> I have increased timeo and timeout settings in mtrancid and mtlogin, to 120s each, but the
> "TIMEOUT reached" in logs still appears.
>
> Neither command, when ran separately, is hanging forever, i.e. each one completes and exits successfully.
>
> I googled and found one occurrence on this m/l when someone asked, is the router having a lot or routes,
> but that, as far as I could follow, wasn't answered; in my case, the answer is YES, and NO I can't put any less on it.
>
> Hope this can still be helped ;)
This is a common problem, and there's no easy way to solve it.
Basically, mtrancid is scanning the output from the device line by line,
expecting to find the router's cli prompt followed by a command run. It
then processes the entire output until it finds the next prompt.
This works well until mtrancid gets some input it's not expecting, or
the input stops for whatever reason. rancid itself is in no position to
figure out what the problem is, so the closest you get is the "End of
run not found" message. Which essentially means "something went wrong",
no more and no less.
mtrancid -d <device name or ip>
usually gives enough info to figure out what is really going wrong
--
Alan McKinnon
alan.mckinnon at gmail.com
More information about the Rancid-discuss
mailing list