Error 21 can very commonly be a hardware issue with the device. Just as common, though, is connections to Apple's activation server may be being blocked:
"If you have installed software to perform unauthorized modifications to your iOS device, that software may have redirected connections to the update server (gs.apple.com) within the Hosts file. You may receive an error 1004, 1013, 3194, or "This device is not eligible for the requested build" in this circumstance...."
Even though this part of TS1275 on Apple's website doesn't reference this specific error, it might be good to check your hosts file for a blockage of gs.apple.com. If that's blocked, it can cause this issue. Usually, though, in my experience, an error 21 is a bad sign. If your hosts file looks fine on the Mac, follow 3cit's advice and try on another computer. If that fails, too, it's likely an unresolvable hardware issue with the phone. Unfortunately, sometimes they seem to work just fine until you try to restore them with the issue I'm thinking of.