Pentair Pool Heater Error Code 21: How to Fix It

Hard 1-3 hours Medium Severity Verified June 2026
Error Code
21
Brand
Pentair
Product Type
pool_equipment
Severity
Medium
DIY Difficulty
Hard
Estimated Fix Time
1-3 hours
Pentair pool heater error code 21 indicates a problem with the main gas valve relay — the component responsible for signaling the gas valve to open and allow fuel to flow to the burner. When this relay fails or loses proper electrical continuity, the heater's control board cannot safely ignite the burner and shuts down as a precaution. This is a medium-severity issue that can often be diagnosed with basic tools, but because it involves both electrical components and a gas system, careful attention to safety is essential throughout the repair process.
Ad

Tools You'll Need

How to Fix Error Code 21

  1. Turn Off the Heater and Shut Off Gas Supply

    Never work on a gas appliance without first shutting off the gas supply. If you smell gas at any point during this repair, leave the area immediately, avoid using any electrical switches, and call your gas utility company from a safe distance.
  2. Record the Error Code and Inspect the Display

  3. Inspect and Reset the Heater Control Board

    Ensure power is fully disconnected at the breaker before touching any internal components. Even with the heater switched off locally, voltage may still be present on internal wiring if the breaker is not tripped.
  4. Test the Main Gas Valve Relay

    Perform all multimeter checks with power completely off. Double-check with a non-contact voltage tester that no live voltage is present before probing relay terminals.
  5. Test the Gas Valve Itself

    Do not attempt to disassemble the gas valve itself. Gas valve internal repair is not a DIY task and must be performed by a licensed technician.
  6. Replace the Faulty Component

    After restoring gas supply, always perform a leak test on every gas connection before powering the heater back on. If bubbles appear at any joint, tighten the fitting and retest before proceeding. If a leak cannot be stopped, call a licensed gas technician immediately.
  7. Clear the Error Code and Test Operation

Parts You May Need

Pool heater control board
Check Price on Amazon
Main gas valve relay
Check Price on Amazon
Main gas valve assembly
Check Price on Amazon
Wiring harness or repair connectors
Check Price on Amazon
Gas leak detector spray
Check Price on Amazon
Pool heater control board
Check Price on Amazon
Main gas valve relay
Check Price on Amazon
Main gas valve assembly
Check Price on Amazon
Wiring harness or repair connectors
Check Price on Amazon
Gas leak detector spray
Check Price on Amazon
Pool heater control board
Check Price on Amazon
Main gas valve relay
Check Price on Amazon
Main gas valve assembly
Check Price on Amazon
Wiring harness or repair connectors
Check Price on Amazon
Gas leak detector spray
Check Price on Amazon
Ad

When to Call a Professional

You should call a licensed pool equipment technician or gas appliance technician if: you detect a gas leak at any point during the repair; the gas valve itself needs replacement (gas valve work typically requires a licensed technician in most jurisdictions); you are uncomfortable working with electrical components inside the heater; the control board shows multiple error codes or visible burn damage; the error code persists after replacing the relay and testing the gas valve; or you do not have experience using a multimeter for electrical diagnostics. Because this repair involves both live electrical circuits and a natural gas or propane fuel system, professional help is strongly recommended if you have any doubt about your ability to complete the repair safely.

Frequently Asked Questions

What does error code 21 mean on a Pentair pool heater?
Error code 21 on a Pentair pool heater indicates a fault with the main gas valve relay. This relay is a small electrical switch on the control board that tells the main gas valve to open so the burner can light. When the relay fails or loses continuity, the heater cannot safely attempt ignition and displays code 21 to alert you to the problem.
Can I reset a Pentair heater error code 21 without fixing anything?
You can attempt a hard reset by turning off power at the breaker for 60 seconds and then restoring it. Occasionally, a temporary electrical glitch causes a false error code that clears after a reset. However, if the underlying relay or gas valve issue is real, error code 21 will return. A reset is a good first diagnostic step, but it is not a permanent fix if the hardware has actually failed.
Is it safe to run my pool heater with error code 21 active?
No. Error code 21 means the heater has detected a fault in the gas valve relay circuit and has shut down as a safety precaution. You should not attempt to bypass or override the error. The heater's safety system is preventing a potentially unsafe ignition attempt. Leave the heater off until the fault is diagnosed and repaired.
How much does it cost to fix Pentair pool heater error code 21?
Costs vary depending on the failed component. A replacement control board for a Pentair heater typically costs $150–$400 or more depending on the model. A replacement main gas valve assembly can range from $80–$250 for the part. If you hire a licensed pool or gas technician, expect to add $100–$200 or more in labor. Catching the problem early and identifying whether it is just the relay (a low-cost component) versus the entire board or gas valve can save significant money.
Does error code 21 appear on all Pentair pool heater models?
Error code 21 relating to the main gas valve relay appears across several Pentair heater model lines including the MasterTemp and Max-E-Therm series. However, error code numbering can differ between older and newer models or between natural gas and propane configurations. Always cross-reference the error code with the specific owner's manual or service guide for your exact heater model number to confirm the diagnosis before replacing any parts.