I have an 8 year old AO Smith propane water heater, model #GPSH 50-101. The heater wont light by itself and shows an error code that the system is in lockout.If I unplug the unit from the wall and plug it back in it tries to light 3 times and shuts itself off and shows the same error code.If I unplug the 3 wires that go to hot surface ignitor and sensor and plug them back in,it will light and work great. Do I need to replace these parts or could it be something else? Plumber did not install a dirt leg, could this be the problem?
What's the manual recommend to do? Usually there is a definition of all error codes and recommendations of what to do/check, from the manufacturer, listed somewhere on the unit itself or in the manual.
Has any schedule maintenance ever been performed on it in 8 years? Like burner/igniter/sensor, taken apart and cleaned/vacummed really good? System flush etc. It may just need a really good cleaning. It's possible you may have a bad igniter/sensor, I don't know, just guessing. If regular maintenance has already been performed on hwh, check out what the manual recommends to do. There's probably a built in safety switch which automatically shuts down the system when somethings wrong to prevent damage to system or to prevent an unsafe condition. Stay tuned, let's see what the pro's recommend.
A drip/dirt leg is used to catch any debris and condensation in a gas line before it reaches critical components, ie. regulators. I don't think that is causing your problem. Some areas don't require one, perhaps your area is one of them. Your location is not posted, so I don't know. However, IMO, it just makes good sense to have them installed on any gas line for furnaces/hwh's, etc. Check your manual, see what the manufacturer recommends.
When you get a chance, please post a few pics of your hwh so we can better assist you. Thanks.