Community discussions

MUM Europe 2020
 
User avatar
rwrocket
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 80
Joined: Mon Nov 24, 2014 8:08 am

How can I log failures importing configuration

Fri May 08, 2015 5:06 am

Title says it all.

I am frustrated with my backup restore script not working so I need to see where it fails in the import process.

I need to log errors to a file because when I import the configuration file I get disconnected from winbox so I never see the output in the terminal.
 
User avatar
PaulsMT
MikroTik Support
MikroTik Support
Posts: 283
Joined: Tue Feb 10, 2015 3:21 pm

Re: How can I log failures importing configuration

Fri May 08, 2015 2:01 pm

Do you have backup file, or .rsc file ?
 
User avatar
rwrocket
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 80
Joined: Mon Nov 24, 2014 8:08 am

Re: How can I log failures importing configuration

Tue May 12, 2015 6:03 am

I can send it to you but don't really want to attach it here for obvious reasons.

But I don't see why that really matters because I just want to know how to log errors when importing a config file
 
User avatar
PaulsMT
MikroTik Support
MikroTik Support
Posts: 283
Joined: Tue Feb 10, 2015 3:21 pm

Re: How can I log failures importing configuration

Tue May 12, 2015 9:47 am

If you are using rsc (export file) you can paste the file content in your terminal, and you will see if there are any errors.
 
User avatar
rwrocket
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 80
Joined: Mon Nov 24, 2014 8:08 am

Re: How can I log failures importing configuration

Tue May 12, 2015 10:20 am

If I do that all that happens is I am disconnected from winbox

And when I reconnect doesn't appear like any of the config has been written.

Can I send you my config ? I will try PM you.

Seems to me like the memory is filling up or something, it is quite a large config
 
User avatar
pukkita
Trainer
Trainer
Posts: 2986
Joined: Wed Dec 04, 2013 11:09 am
Location: Spain

Re: How can I log failures importing configuration

Tue May 12, 2015 12:17 pm

Connect to router MAC via WinBox (i.e. layer2), upload the file to the RB, then go to terminal and issue
/import verbose=yes file-name=YourExport.rsc
That way you should see where the error is.
Simplicity is the Ultimate Sophistication - Da Vinci
Getting the most out of this forum
 
User avatar
rwrocket
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 80
Joined: Mon Nov 24, 2014 8:08 am

Re: How can I log failures importing configuration

Wed May 13, 2015 2:22 am

Thanks
Connect to router MAC via WinBox (i.e. layer2), upload the file to the RB, then go to terminal and issue
/import verbose=yes file-name=YourExport.rsc
That way you should see where the error is.
Thanks Pukkita, making progress

Found a couple of errors in my config and fixed them but now I got to the point where it just drops the Winbox connection and I cannot get back in. (my config has no config changes to the port I am using to connect to the router and winbox is allowed on all interfaces)

Have not tried rebooting the router yet.

I might try to import my config verbosely from serial console and see what happens.
Last edited by rwrocket on Wed May 13, 2015 2:57 am, edited 1 time in total.
 
User avatar
skot
Long time Member
Long time Member
Posts: 586
Joined: Wed Nov 30, 2011 3:05 am

Re: How can I log failures importing configuration

Wed May 13, 2015 2:33 am

What I would do is look through the config and try to find the setting that is kicking you out. Then, just comment the line(s) out with pound signs #, and copy/paste the whole script into the terminal. It's probably an /interface related setting...
I don't need any karma... I have Ιησους Χριστος!
 
User avatar
chechito
Forum Guru
Forum Guru
Posts: 1747
Joined: Sun Aug 24, 2014 3:14 am
Location: Bogota Colombia
Contact:

Re: How can I log failures importing configuration

Wed May 13, 2015 2:46 am

when you paste the commands on terminal, look at the last command you can see pasted, that command or the following command its the source of your disconnection.

Or try pasting the config by pieces to find which contain the problematic command
Last edited by chechito on Wed May 13, 2015 8:29 am, edited 1 time in total.
 
User avatar
rwrocket
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 80
Joined: Mon Nov 24, 2014 8:08 am

Re: How can I log failures importing configuration

Wed May 13, 2015 3:17 am

Ok so I think I found what is causing the disconnect

set [ find default-name=ether12 ] l2mtu=1590

From what I can see, the ROS defaults for 6.28 on a CCR1036-12G-4S are 12mtu=1580

it must have previously been 1590 because I certainly did not change this but it is in my config file

Also this causes the script to stop asking for interface
/romon port
add disabled=no

Assume this may be a bug caused by the newly added ROMON. (I have ROMON disabled under tools)

Who is online

Users browsing this forum: No registered users and 13 guests