Troubleshooting Tip: Getting license invalid error when registering VM
Description
This article describes how to troubleshoot an issue when receiving a 400 error code upon uploading the license.
Scope
FortiGate.
Solution
If the error message 'Invalid license file' is received after uploading the correct VM license file.
This is an example of the errors in the update debug logs:
Â
2021-08-05 12:38:32 upd_pkg_verify_setup_rsp[1115]-Unexpected setup rsp code 400
2021-08-05 12:38:32 upd_act_setup_with_action[220]-Received invalid setup rspÂ
Ensure that the VM is registered under the correct FortiCare account associated with the license
Disable FortiGuard Anycast:
config system fortiguard
  set fortiguard-anycast disable
endIf it does not work with the configuration above, try enabling the UDP protocol:
config system fortiguard
   set protocol udp
  set port 8888
  set sdns-server-ip 200.91.112.220 208.91.112.220 173.243.140.53 210.7.96.53
endÂ
Check that the default authentication certificate is set to 'Fortinet_Factory' using the following command:
Â
config sys global
get | grep auth-cert
auth-cert: Fortinet_FactoryÂ
Verify internet connectivity and DNS resolution to the FortiGuard servers by running the following commands:
Â
execute ping service.fortiguard.net
execute ping update.fortiguard.net
execute ping guard.fortinet.net
execute ping fds1.fortinet.com
execute ping directregistration.fortinet.comÂ
Allow up to 4 hours for the changes to take effect, then check whether the license status has updated to valid.
If the issue persists after completing these steps, collect the debug logs and the output of the commands below and provide the information to Fortinet Support:
Â
diagnose debug disable
diagnose debug reset
diagnose debug application update -1
diagnose debug enable
execute update-nowÂ
Wait for 2-3 minutes before stopping the debugs:Â
Â
diagnose debug disable
diagnose debug resetÂ
Related article:
Technical Tip: FortiGate-VM license management, validation, and troubleshooting
