Discussion:
[rancid] Mikrotik issues ssh on 6.35.4
Wade Blackwell
2017-08-10 21:45:13 UTC
Permalink
Good afternoon from the Central Coast of Ca.

I'm new to both Rancid and Mikrotik and getting a successful
config pull from a MT 6.35.4 VM is proving difficult. I've read quite allot
today and tried most everything I read. The result is rancid can login via
ssh but pulls a zero byte config. First issue appeared to be a timeout issue
which I addressed in the config. Now the issue appears to be "missed
cmd(s)". Details below;



Rancid Verion 2.3.8

Server OS CentOS 6 (Vmware guest)

Mikrotik version 6.35.4 (Vmware guest)

Error messages (rounds 1-4) "missed cmd(s): system license print,system
routerboard print,export"

Group in rancid.conf "LIST_OF_GROUPS="CHC_Creston":

.cloginrc pertinent config changes below

#*****YOUR CONFIG HERE******

#

add noenable * {1}

add method 172.31.0.210 {ssh}

add user 172.31.0.210 {admin}

add password 172.31.0.210 {abc123} {}

add timeout 172.31.0.210 500

add sshcmd 172.31.0.210 {/usr/local/rancid/bin/mtrancid}

#

routers.up contains "172.31.0.210:mikrotik"

router.db contains "172.31.0.210:mikrotik:up"

configs directory shows the host with zero byte config;

[***@cre-util-01 configs]# pwd

/usr/local/rancid/var/CHC_Creston/configs



[***@cre-util-01 configs]# ll

total 4

-rw-r----- 1 rancid netadm 0 Aug 10 13:36 172.31.0.210

drwxr-x--- 2 rancid netadm 4096 Aug 10 13:36 CVS

[***@cre-util-01 configs]# more 172.31.0.210

[***@cre-util-01 configs]#



I must be missing something simple here as I see allot of
folks have been using rancid for a long time on the MT platform. Any
feedback on where I'm falling down would be great, thanks so much.



-W



Wade Blackwell

(D) 805.457.8825

<http://chc.bablam.com/> Creston Hills Consulting
heasley
2017-08-11 00:59:14 UTC
Permalink
Post by Wade Blackwell
Good afternoon from the Central Coast of Ca.
I'm new to both Rancid and Mikrotik and getting a successful
config pull from a MT 6.35.4 VM is proving difficult. I've read quite allot
today and tried most everything I read. The result is rancid can login via
ssh but pulls a zero byte config. First issue appeared to be a timeout issue
which I addressed in the config. Now the issue appears to be "missed
cmd(s)". Details below;
Rancid Verion 2.3.8
please upgrade to 3.6.2. We can't support 2.x any longer.
Post by Wade Blackwell
Server OS CentOS 6 (Vmware guest)
Mikrotik version 6.35.4 (Vmware guest)
Error messages (rounds 1-4) "missed cmd(s): system license print,system
routerboard print,export"
in the rancid FAQ S3 Q2 there is some guidance for failing collections.
Wade Blackwell
2017-08-15 23:48:30 UTC
Permalink
Thanks so much,
So I did perform a clean install of 3.6.2. Still getting the
following issues (I did change the router.db syntax to semicolons). Test
login succeeds and a manual run of gives me this;

-bash-4.2$ /usr/local/src/rancid-3.6.2/bin/mtrancid -d 172.31.0.210
executing mtlogin -t 90 -c"system package print detail without-paging;system
routerboard print;system license print;export" 172.31.0.210
sh: mtlogin: command not found
172.31.0.210: missed cmd(s): all commands
172.31.0.210: End of run not found

I broke up the stated commands and ran them individually and the only issue
I saw was the output from "system routerboard print" was "no". Rancid-run
still fails even through the .cloginrc test passes. It looks like CVS took
care of adding the device but the collection still times out. Pertinent
portion of .cloginrc is directly below and the rancid-run log is below that.
Thanks so much.

-------------begin .cloginrc-----------------
add noenable * {1}
add method 172.31.0.210 ssh
add user 172.31.0.210 WccRancid
add password 172.31.0.210 abc123
add timeout 172.31.0.210 500
#add sshcmd 172.31.0.210 {/usr/local/rancid/bin/mtrancid}
--------------end .cloginrc----------------
--------------begin log----------------
cvs add: in directory .:
cvs [add aborted]: there is no version here; do 'cvs checkout' first
cvs commit: cannot open CVS/Entries for reading: No such file or directory
cvs commit: nothing known about `172.31.0.210'
cvs [commit aborted]: correct above errors first!
Added 172.31.0.210

cvs status: cannot open CVS/Entries for reading: No such file or directory
cvs status: use `cvs add' to create an entry for 172.31.0.210
cvs add: in directory .:
cvs [add aborted]: there is no version here; do 'cvs checkout' first
cvs commit: cannot open CVS/Entries for reading: No such file or directory
cvs commit: nothing known about `172.31.0.210'
cvs [commit aborted]: correct above errors first!
cvs added missing router 172.31.0.210


Trying to get all of the configs.
172.31.0.210: missed cmd(s): all commands
172.31.0.210: End of run not found
172.31.0.210 mtlogin error: Error: TIMEOUT reached
#
=====================================
Getting missed routers: round 1.
172.31.0.210: missed cmd(s): all commands
172.31.0.210: End of run not found
172.31.0.210 mtlogin error: Error: TIMEOUT reached
#
=====================================
Getting missed routers: round 2.
172.31.0.210: missed cmd(s): all commands
172.31.0.210: End of run not found
172.31.0.210 mtlogin error: Error: TIMEOUT reached
#
=====================================
Getting missed routers: round 3.
172.31.0.210: missed cmd(s): all commands
172.31.0.210: End of run not found
172.31.0.210 mtlogin error: Error: TIMEOUT reached
#
=====================================
Getting missed routers: round 4.

cvs diff: in directory .:
cvs [diff aborted]: there is no version here; run 'cvs checkout' first
cvs commit: in directory .:
cvs [commit aborted]: there is no version here; run 'cvs checkout' first
-bash-4.2$ cvs checkout
cvs checkout: No CVSROOT specified! Please use the `-d' option
cvs [checkout aborted]: or set the CVSROOT environment variable.
--------------end log----------------

Wade Blackwell
(D) 805.457.8825
Creston Hills Consulting

-----Original Message-----
From: heasley [mailto:***@shrubbery.net]
Sent: Thursday, August 10, 2017 5:59 PM
To: Wade Blackwell <***@bablam.com>
Cc: rancid-***@shrubbery.net
Subject: Re: [rancid] Mikrotik issues ssh on 6.35.4
Post by Wade Blackwell
Good afternoon from the Central Coast of Ca.
I'm new to both Rancid and Mikrotik and getting a
successful config pull from a MT 6.35.4 VM is proving difficult. I've
read quite allot today and tried most everything I read. The result is
rancid can login via ssh but pulls a zero byte config. First issue
appeared to be a timeout issue which I addressed in the config. Now
the issue appears to be "missed cmd(s)". Details below;
Rancid Verion 2.3.8
please upgrade to 3.6.2. We can't support 2.x any longer.
Post by Wade Blackwell
Server OS CentOS 6 (Vmware guest)
Mikrotik version 6.35.4 (Vmware guest)
Error messages (rounds 1-4) "missed cmd(s): system license
print,system routerboard print,export"
in the rancid FAQ S3 Q2 there is some guidance for failing collections.
Dan Anderson
2017-08-16 02:38:14 UTC
Permalink
The "mtlogin command not found" message makes it seem like the PATH of the user running the command doesn't include the RANCID bin directory.

--
Dan
Post by Wade Blackwell
Thanks so much,
So I did perform a clean install of 3.6.2. Still getting the
following issues (I did change the router.db syntax to semicolons). Test
login succeeds and a manual run of gives me this;
-bash-4.2$ /usr/local/src/rancid-3.6.2/bin/mtrancid -d 172.31.0.210
executing mtlogin -t 90 -c"system package print detail without-paging;system
routerboard print;system license print;export" 172.31.0.210
sh: mtlogin: command not found
172.31.0.210: missed cmd(s): all commands
172.31.0.210: End of run not found
I broke up the stated commands and ran them individually and the only issue
I saw was the output from "system routerboard print" was "no". Rancid-run
still fails even through the .cloginrc test passes. It looks like CVS took
care of adding the device but the collection still times out. Pertinent
portion of .cloginrc is directly below and the rancid-run log is below that.
Thanks so much.
-------------begin .cloginrc-----------------
add noenable * {1}
add method 172.31.0.210 ssh
add user 172.31.0.210 WccRancid
add password 172.31.0.210 abc123
add timeout 172.31.0.210 500
#add sshcmd 172.31.0.210 {/usr/local/rancid/bin/mtrancid}
--------------end .cloginrc----------------
--------------begin log----------------
cvs [add aborted]: there is no version here; do 'cvs checkout' first
cvs commit: cannot open CVS/Entries for reading: No such file or directory
cvs commit: nothing known about `172.31.0.210'
cvs [commit aborted]: correct above errors first!
Added 172.31.0.210
cvs status: cannot open CVS/Entries for reading: No such file or directory
cvs status: use `cvs add' to create an entry for 172.31.0.210
cvs [add aborted]: there is no version here; do 'cvs checkout' first
cvs commit: cannot open CVS/Entries for reading: No such file or directory
cvs commit: nothing known about `172.31.0.210'
cvs [commit aborted]: correct above errors first!
cvs added missing router 172.31.0.210
Trying to get all of the configs.
172.31.0.210: missed cmd(s): all commands
172.31.0.210: End of run not found
172.31.0.210 mtlogin error: Error: TIMEOUT reached
#
=====================================
Getting missed routers: round 1.
172.31.0.210: missed cmd(s): all commands
172.31.0.210: End of run not found
172.31.0.210 mtlogin error: Error: TIMEOUT reached
#
=====================================
Getting missed routers: round 2.
172.31.0.210: missed cmd(s): all commands
172.31.0.210: End of run not found
172.31.0.210 mtlogin error: Error: TIMEOUT reached
#
=====================================
Getting missed routers: round 3.
172.31.0.210: missed cmd(s): all commands
172.31.0.210: End of run not found
172.31.0.210 mtlogin error: Error: TIMEOUT reached
#
=====================================
Getting missed routers: round 4.
cvs [diff aborted]: there is no version here; run 'cvs checkout' first
cvs [commit aborted]: there is no version here; run 'cvs checkout' first
-bash-4.2$ cvs checkout
cvs checkout: No CVSROOT specified! Please use the `-d' option
cvs [checkout aborted]: or set the CVSROOT environment variable.
--------------end log----------------
Wade Blackwell
(D) 805.457.8825
Creston Hills Consulting
-----Original Message-----
Sent: Thursday, August 10, 2017 5:59 PM
Subject: Re: [rancid] Mikrotik issues ssh on 6.35.4
Post by Wade Blackwell
Good afternoon from the Central Coast of Ca.
I'm new to both Rancid and Mikrotik and getting a
successful config pull from a MT 6.35.4 VM is proving difficult. I've
read quite allot today and tried most everything I read. The result is
rancid can login via ssh but pulls a zero byte config. First issue
appeared to be a timeout issue which I addressed in the config. Now
the issue appears to be "missed cmd(s)". Details below;
Rancid Verion 2.3.8
please upgrade to 3.6.2. We can't support 2.x any longer.
Post by Wade Blackwell
Server OS CentOS 6 (Vmware guest)
Mikrotik version 6.35.4 (Vmware guest)
Error messages (rounds 1-4) "missed cmd(s): system license
print,system routerboard print,export"
in the rancid FAQ S3 Q2 there is some guidance for failing collections.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
heasley
2017-08-16 15:19:57 UTC
Permalink
Post by Dan Anderson
The "mtlogin command not found" message makes it seem like the PATH of the user running the command doesn't include the RANCID bin directory.
correct. if you are going to run it manually, you must source the rancid.conf
or alter your environment to include the path that is in rancid.conf.
Post by Dan Anderson
Post by Wade Blackwell
--------------begin log----------------
cvs [add aborted]: there is no version here; do 'cvs checkout' first
cvs commit: cannot open CVS/Entries for reading: No such file or directory
cvs commit: nothing known about `172.31.0.210'
cvs [commit aborted]: correct above errors first!
Added 172.31.0.210
cvs status: cannot open CVS/Entries for reading: No such file or directory
cvs status: use `cvs add' to create an entry for 172.31.0.210
cvs [add aborted]: there is no version here; do 'cvs checkout' first
cvs commit: cannot open CVS/Entries for reading: No such file or directory
cvs commit: nothing known about `172.31.0.210'
cvs [commit aborted]: correct above errors first!
cvs added missing router 172.31.0.210
seems that your group directory was not initialized by using rancid-cvs or that
you are not using CVS and have not merged your existing rancid.conf and the new
one from 3.6.2.

Tim Warnock
2017-08-11 01:01:35 UTC
Permalink
add password 172.31.0.210 {abc123}
#add sshcmd 172.31.0.210 {/usr/local/rancid/bin/mtrancid}

Tried that?

If you're having to call mtrancid, do you have mikrotik in as a vendor?

https://forum.mikrotik.com/viewtopic.php?t=32676

-----Original Message-----
From: Rancid-discuss [mailto:rancid-discuss-***@shrubbery.net] On Behalf Of Wade Blackwell
Sent: Friday, 11 August 2017 7:45 AM
To: rancid-***@shrubbery.net
Subject: [rancid] Mikrotik issues ssh on 6.35.4

Good afternoon from the Central Coast of Ca.

I'm new to both Rancid and Mikrotik and getting a successful config pull from a MT 6.35.4 VM is proving difficult. I've read quite allot today and tried most everything I read. The result is rancid can login via ssh but pulls a zero byte config. First issue appeared to be a timeout issue which I addressed in the config. Now the issue appears to be "missed cmd(s)". Details below;



Rancid Verion 2.3.8

Server OS CentOS 6 (Vmware guest)

Mikrotik version 6.35.4 (Vmware guest)

Error messages (rounds 1-4) "missed cmd(s): system license print,system routerboard print,export"

Group in rancid.conf "LIST_OF_GROUPS="CHC_Creston":

.cloginrc pertinent config changes below

#*****YOUR CONFIG HERE******

#

add noenable * {1}

add method 172.31.0.210 {ssh}

add user 172.31.0.210 {admin}

add password 172.31.0.210 {abc123} {}

add timeout 172.31.0.210 500

add sshcmd 172.31.0.210 {/usr/local/rancid/bin/mtrancid}

#

routers.up contains "172.31.0.210:mikrotik"

router.db contains "172.31.0.210:mikrotik:up"

configs directory shows the host with zero byte config;

[***@cre-util-01 configs]# pwd

/usr/local/rancid/var/CHC_Creston/configs



[***@cre-util-01 configs]# ll

total 4

-rw-r----- 1 rancid netadm 0 Aug 10 13:36 172.31.0.210

drwxr-x--- 2 rancid netadm 4096 Aug 10 13:36 CVS

[***@cre-util-01 configs]# more 172.31.0.210

[***@cre-util-01 configs]#



I must be missing something simple here as I see allot of folks have been using rancid for a long time on the MT platform. Any feedback on where I'm falling down would be great, thanks so much.



-W



Wade Blackwell

(D) 805.457.8825

Creston Hills Consulting <http://chc.bablam.com/>
Loading...