|
The error message 'Failed to save changes' appears when attempting to change Native/Allowed VLAN by navigating to WiFi & Switch Controller -> FortiSwitch Ports -> Modify Native/Allowed VLAN.

The following errors may be seen in httpsd debugs:
diagnose debug application httpsd -1 diagnose debug enable
[httpsd 13777 - 1713123551 info] api_cmdb_request_init_by_path[2644] -- new CMDB query (path='switch-controller',name='managed-switch')
[httpsd 13777 - 1713123551 info] api_cmdb_request_init_by_path[2676] -- querying CMDB entry (mkey='IDF2-L')
[httpsd 13777 - 1713123551 warning] api_cmdb_request_init_by_path[2679] -- unable to find 'IDF2-L' in table 'switch-controller.managed-switch'
[httpsd 13777 - 1713123551 info] handle_cli_req_v2[4296] -- returning to original vdom "root"
[httpsd 13777 - 1713123551 warning] api_return_http_result[1280] -- API error 404 raised
[httpsd 13777 - 1713123551 info] fweb_debug_final[351] -- Completed PUT request for "/api/v2/cmdb/switch-controller/managed-switch/IDF2-L/Bottom/ports/port1" (HTTP 404)
[httpsd 13776 - 1713123552 info] fweb_debug_init[508] -- New POST request for "/api/v2/monitor/system/debug" from "172.30.0.4:56709"
[httpsd 13776 - 1713123552 info] fweb_debug_init[510] -- User-Agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36"
[httpsd 13776 - 1713123552 info] fweb_debug_init[512] -- Handler "api_monitor_v2-handler" assigned to request
[httpsd 13776 - 1713123552 info] api_store_parameter[327] -- add API parameter 'messages' (type=array)
[httpsd 13776 - 1713123552 info] endpoint_process_req_vdom[1071] -- new API request (action='select',path='system',name='debug',vdom='root',user='admin)
[httpsd 13776 - 1713123552 error] JavaScript -- Failed to update entry: "[object Object]
The error 'unable to find 'IDF2-L' in table 'switch-controller.managed-switch'' indicates a mismatch in the switch name.
In this example, the switch name is identified as IDF2-L when performing the changes from GUI, but the correct name is IDF2-L/Top. This error can also occur if there is a mismatch in the Trunk's Group name. This issue has been resolved in v7.6.0.
Workaround:
- Modify the switch or trunk's group name by removing '/' from the name and modify the VLANs.
Or:
- Change the native and allowed VLANs via FortiGate CLI:
config switch-controller managed-switch
edit <switch-name>
config ports
edit <port-name>
set native-vlan <VLAN-ID>
set allowed-vlans <VLAN-IDs>
end
end
Another scenario that may cause the error 'failed to save changes' when changing 'native vlan' or 'allowed-vlans' is when there is a space on the FortiSwitch name. Unable to rename the FortiSwitch name. This can happen when the FortiGate was upgraded to v7.6.4. Configuring it on the CLI an error will be encountered.
config switch-controller managed-switch
(managed-switch) # edit "P3 Switch" The legal allowed characters are numbers (0-9), letters(a-z,A-z) and special characters - and _ node_check_object fail! for switch-id P3 Switch
diagnose debug reset
diagnose debug disable
diagnose debug application httpsd -1
Debug messages will be on for 30 minutes.
[httpsd 32714 - 1760708154 info] fweb_debug_init[593] -- New PUT request for "/api/v2/cmdb/switch-controller/managed-switch/P3 Switch/ports/port11" from "/tmp/httpsd.sock:0" [httpsd 32714 - 1760708154 info] fweb_debug_init[596] -- User-Agent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36" [httpsd 32714 - 1760708154 info] fweb_debug_init[601] -- Handler "api_cmdb_v2-handler" assigned to request [httpsd 32714 - 1760708154 info] api_access_check_for_http_authd_session[70] -- Session key request authorized for admin. [httpsd 32714 - 1760708154 info] api_store_parameter[306] -- add API parameter 'vdom' (type=string) ..... [httpsd 32714 - 1760708154 info] api_cmdb_request_init_by_path[3035] -- new CMDB query (path='switch-controller',name='managed-switch') [httpsd 32714 - 1760708154 info] api_cmdb_request_init_by_path[3067] -- querying CMDB entry (mkey='P3 Switch') [httpsd 32714 - 1760708154 info] api_cmdb_request_init_child[3122] -- new CMDB child query for 'switch-controller.managed-switch.ports':'P3 Switch' [httpsd 32714 - 1760708154 info] api_cmdb_request_init_child[3159] -- querying CMDB child entry (mkey='port11') [httpsd 32714 - 1760708154 info] handle_cli_req_v2[4710] -- new CMDB API request (vdom='root',user='admin') [httpsd 32714 - 1760708154 info] _api_cmdb_v2_config[2618] -- editing CLI object (append=0, auto_key=0, path=switch-controller, name=managed-switch, mkey=P3 Switch, flags=0) [httpsd 32714 - 1760708154 info] api_set_cmdb_attr[2588] -- 'port-name' [httpsd 32714 - 1760708154 warning] api_set_cmdb_attr[2562] -- node_set_object failed for node 'port-owner' (err=-651) ..... [httpsd 32714 - 1760708154 info] api_set_cmdb_attr[2588] -- 'vlan' [httpsd 32714 - 1760708154 info] api_set_cmdb_attr[2588] -- 'allowed-vlans-all' [httpsd 32714 - 1760708154 info] api_set_cmdb_attr[2588] -- 'vlan-name' [httpsd 32714 - 1760708154 info] api_set_cmdb_attr[2588] -- 'vlan-name' [httpsd 32714 - 1760708154 info] api_set_cmdb_attr[2588] -- 'type' [httpsd 32714 - 1760708154 info] api_set_cmdb_attr[2588] -- 'access-mode' [httpsd 32714 - 1760708154 warning] api_set_cmdb_attr[2562] -- node_set_object failed for node 'matched-dpp-policy' (err=-56) [httpsd 32714 - 1760708154 info] api_set_cmdb_attr[2588] -- 'matched-dpp-policy' [httpsd 32714 - 1760708154 warning] api_set_cmdb_attr[2562] -- node_set_object failed for node 'matched-dpp-intf-tags' (err=-56) ..... [httpsd 32714 - 1760708154 warning] api_set_cmdb_attr[2562] -- node_set_object failed for node 'mac-addr' (err=-651) ..... [httpsd 32714 - 1760708154 info] api_set_cmdb_attr[2588] -- 'max-bundle' [httpsd 32714 - 1760708154 warning] api_set_cmdb_attr[2562] -- node_set_object failed for node 'fallback-port' (err=-56) [httpsd 32714 - 1760708154 info] api_set_cmdb_attr[2588] -- 'fallback-port' [httpsd 32714 - 1760708154 info] cmdb_save_with_children[331] -- appended main node (nret=-651, is_new=0) [httpsd 32714 - 1760708154 error] cmdb_save_with_children[336] -- saving failed for main node: 'ports' (err=-651) [httpsd 32714 - 1760708154 error] cmdb_commit_from_json[2341] -- error saving request object to CLI (-651) [httpsd 32714 - 1760708154 error] _api_cmdb_v2_config[2654] -- error editing object (nret=-651) [httpsd 32714 - 1760708154 warning] api_return_http_result[1265] -- API error -651 raised [httpsd 32714 - 1760708154 info] handle_cli_req_v2[4732] -- returning to original vdom "root" [httpsd 32714 - 1760708154 info] fweb_debug_final[443] -- Completed PUT request for "/api/v2/cmdb/switch-controller/managed-switch/P3 Switch/ports/port11" (HTTP 500)
- Download the configuration file on the FortiGate. Technical Tip: How to download FortiGate configuration file & Debug log from GUI
- Edit the FortiSwitch Name on the configuration file without space. Save the file.

- Restore the configuration file. Select the admin account (top right) -> Configuration -> Restore -> Upload -> Select the configuration file -> Open -> Select OK. Restoring a configuration file will reboot the FortiGate.
Related article:
Troubleshooting Tip: FortiSwitch E flag 'error_reason':'The legal characters are numbers (0-9), lett...
|