1.Make sure that the fan connector is plugged securely into the CPU_Fan header.
2.Test if the CPU_Fan header is faulty by plugging in another fan, and seeing if the CPU Fan Error is thrown again. If it does get thrown again, it is likely the sensor on the motherboard that is the issue.
3.Make sure the fan speed is not too low. Go into the BIOS and increase the fan speed if it is low.
4.Use compressed air to clean the dust off the fan to clear out any obstructions.