This error can occur when user has multiple licence codes inside the "keycodes" file which is located usually in C:\Program Files\ESRI\License10.5\sysgen\keycodes
- Manually deleting the wrong version codes from the keycodes file should fix the issue.
- Alternatively, deleting the keycodes file and running "Software Authorization for ArcGIS Server" tool again will generate a new file with the correct keys.
Make sure to restart ArcGIS Server service after amending or re-authorizing for the changes to take effect.
In my case Serj's comment fix my problem.