it is possible that any component can be faulty but there has to be reason for it.
your configuration must match, if you choose xtal in code, you better have xtal of right frequency connected, along with the capacitors.
if the outputs turn on, chances are they work but maybe they work way too fast.
if the led flickers 100s of times per second, it will look as if it was continuously on...
relay is slow electromechanical device and responds in some ~25ms.
so if you want relay to turn on and off, you should make sure it has time to do so.