Page 1 of 1

RB3011: Config import fail's with "failure: cannot change builtin"

Posted: Wed Aug 07, 2019 4:34 pm
by 8cqv
Been going round in circles, maybe I am missing something stupid hoping someone can help.

I have an RB3011 that is running 6.44 where the config has been reset and I am trying to import and previous config export (config also exported at 6.44).

When I run import through winbox or with the reset-configuration run-after-reset=config.rsc it appears to work but when it comes back up half the config is missing.

I finally put a serial console on and run over serial, it fails after setting up the interfaces trying to set up what looks like a group of all interfaces with the error "failure: cannot change bullitin":
#line 95
/interface ethernet switch
#line 96
set 0 cpu-flow-control=yes mirror-source=none mirror-target=none name=switch1
#line 97
set 1 cpu-flow-control=yes mirror-source=none mirror-target=none name=switch2
#line 98
/interface ethernet switch port
#line 99
set 0 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 100
set 1 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 101
set 2 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 102
set 3 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 103
set 4 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 104
set 5 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 105
set 6 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 106
set 7 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 107
set 8 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 108
set 9 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 109
set 10 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 110
set 11 default-vlan-id=auto vlan-header=leave-as-is vlan-mode=disabled
#line 111
/interface list
#line 112..113
set [ find name=all ] comment="contains all interfaces" exclude="" include="" \
    name=all
failure: cannot change builtin
[admin@MikroTik] >
Line 112 where it fails onwards looks like this
/interface list
set [ find name=all ] comment="contains all interfaces" exclude="" include="" \
    name=all
set [ find name=none ] comment="contains no interfaces" exclude="" include="" \
    name=none
set [ find name=dynamic ] comment="contains dynamic interfaces" exclude="" \
    include="" name=dynamic
add comment=defconf exclude="" include="" name=WAN
add comment=defconf exclude="" include="" name=LAN
add exclude=dynamic include="" name=discover
add exclude="" include="" name=mactel
add exclude="" include="" name=mac-winbox
I am a bit stuck what is happenng here, the config file I am trying to import is from the same router at the same RoS level anyone help me why its failing?

I did reset-configuration no-defaults=yes, is it trying to set parameters on some default config? If so why is that not in the export file?!

Re: RB3011: Config import fail's with "failure: cannot change builtin"

Posted: Wed Aug 07, 2019 5:01 pm
by tdw
It looks like a bug - there seems little point the interface list builtins being exported to the config file if they cannot be imported or edited.

For now, before uploading to the Mikrotik edit the .rsc file and remove the offending lines
set [ find name=all ] comment="contains all interfaces" exclude="" include="" \
    name=all
set [ find name=none ] comment="contains no interfaces" exclude="" include="" \
    name=none
set [ find name=dynamic ] comment="contains dynamic interfaces" exclude="" \
    include="" name=dynamic

Re: RB3011: Config import fail's with "failure: cannot change builtin"

Posted: Wed Aug 07, 2019 5:15 pm
by sindy
I'm afraid there is a difference between the "default configuration" (which is just a template of user configuration, and you can prevent it from getting loaded) and "built-in configuration" which is there even if you remove any user configuration using reset-configuration with no-defaults=yes. The interface list all is a good example, as it always automatically contains all interfaces currently existing, without need to add them as /interface list member items. So it is actually a bug of the export function that when you do /export verbose, it creates those useless lines which then just cause trouble during import but would have no real effect even if they succeeded.

The proven way to recreate your configuration is to copy-paste it to the terminal window section by section, while for each new section, you paste the section header (such as /interface list) followed by the first "meaningful" line; if that first line is accepted, you may paste the rest of the lines beginning with the same keyword (set or add) within that section. When the keyword changes, try the first line with the new keyword alone, and if it succeeds, paste the rest.

If some line is rejected during this process, you have to analyse the response and the actual state to decide what next; in your case where the source and destination versions of RouterOS are identical, the only issues may be this one (changing a built-in configuration element) or trying to configure something non-existent on the target machine (such as if you'd be importing a configuration from the 3011 to something with just five Ethernet interfaces).

So in your case, just skip the set lines in /interface list section. You can try /interface list export verbose before even starting the import, and you'll see exactly these lines in the output.

Re: RB3011: Config import fail's with "failure: cannot change builtin"

Posted: Mon Aug 12, 2019 5:14 pm
by 8cqv
DOH, the subscription did not seem to take when I posted this and I just saw the replies, thanks.

I'll edit the file and try again, over serial so I can at least see where it gets to (over ssh/winbox I was losing connection and the point of failure).

Very frustrating it exports something that can't be imported...