In order to resolve a failed relationship between a FortiGate and FortiManager we needed to remove the FortiGate. In FortiManager this worked fine, however in FortiGate the relationship still persisted (under Security Fabric -> Settings -> Central Management).
If we attempted to disable the Central Management toggle we received the following error:
Failed to save FortiManager settings
In the CLI if we attempted to remove the FMG IP address we received the following error:
Please unregister-device from FortiManager first.
The resolution was to change the FMG IP address to 0.0.0.0 and exit the Central Management config. Then after re-entering the Central Management section again the FMG IP could be removed.
Fortigate # config system central-management
Fortigate (central-management) # unset fmg
FortiGate (central-management) # end
Please unregister-device from FortiManager first.
object set operator error, -582 discard the setting
Command fail. Return code -582
Fortigate #
FortiGate # config system central-management
FortiGate (central-management) # set fmg 0.0.0.0
Fortigate (central-management) # end
Fortigate #
Fortigate # config system central-management
Fortigate (central-management) # unset fmg
Fortigate (central-management) # end
Fortigate #