The cat plays a large part in reducing Nitrous Oxides in the exhaust. As suggested get it as hot as possible and if it still fails, it will need to be replaced.
Also, when was the last time the O2 sensor was replaced, I believe it is possible for a bad one to cause the hydrocarbon reading to be too high due to a rich mixture.
1999 Dodge Ram 2500 Cummins Diesel
2002 Harley-Davidson Fatboy
Merlin Extralight w/ Campy Record