WPs unable to connect when PostgreSQL is in read-only mode
search cancel

WPs unable to connect when PostgreSQL is in read-only mode

book

Article ID: 445661

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

In an environment using PostgreSQL, if the database cluster switches to read-only mode (e.g., during a DR test or failover event), the Automation Engine Work Processes (WPs) may disconnect or fail to stay active. The following errors are observed in the WP logs:

U00003590 UCUDB - DB error: '25006', 'ERROR: cannot execute SELECT FOR UPDATE in a read-only transaction', '0', 'org.postgresql.util.PSQLException'

U00003590 UCUDB - DB error: 'null', 'Unable to commit session null because the connection is already closed.', '0', 'java.sql.SQLException'

U00003367 No primary work process is registered in the database; next attempt in '10' seconds.

Environment

Automic Automation 24.x or 26.x with PostgreSQL as database

Cause

This is caused by a defect where the uc.msl (message library) does not contain the specific error code mapping for the PostgreSQL read-only state. Consequently, the Automation Engine interprets the error as a generic deadlock/rollback situation rather than a lost connection, preventing the expected "reconnect every 10 seconds" behavior.

Resolution

Workaround:

  •  To restore services manually:
    1. Verify the PostgreSQL database cluster status.
    2. Ensure the database is set to Read/Write (R/W) mode.
    3. Restart the Automation Engine processes (CPs and WPs).

Solution:

A problem has been identified and is being addressed under defect DE184381.

Tentative Fix: This issue is targeted to be fixed in Automation Engine 24.4.6