Page 1 of 1

How can I log failures importing configuration

Posted: Fri May 08, 2015 5:06 am
by rwrocket
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.

Re: How can I log failures importing configuration

Posted: Fri May 08, 2015 2:01 pm
by PaulsMT
Do you have backup file, or .rsc file ?

Re: How can I log failures importing configuration

Posted: Tue May 12, 2015 6:03 am
by rwrocket
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

Re: How can I log failures importing configuration

Posted: Tue May 12, 2015 9:47 am
by PaulsMT
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.

Re: How can I log failures importing configuration

Posted: Tue May 12, 2015 10:20 am
by rwrocket
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

Re: How can I log failures importing configuration

Posted: Tue May 12, 2015 12:17 pm
by pukkita
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.

Re: How can I log failures importing configuration

Posted: Wed May 13, 2015 2:22 am
by rwrocket
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.

Re: How can I log failures importing configuration

Posted: Wed May 13, 2015 2:33 am
by skot
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...

Re: How can I log failures importing configuration

Posted: Wed May 13, 2015 2:46 am
by chechito
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

Re: How can I log failures importing configuration

Posted: Wed May 13, 2015 3:17 am
by rwrocket
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)